nextmail share-links
Every command in this namespace, with its arguments, flags and examples.
Commands
Public links to the templates, forms and automations of the workspace, as the Share button makes them in the app: list what the workspace shares, with how often each page was opened and how often the item was copied, read the link of one item, make an item public or change whether people may copy it, and make it private again.
Every command here also takes the global flags, such as --json, --profile and --dry-run. See the global flags
nextmail share-links list
List one page of the public links of the workspace
lsUsage
nextmail share-links list [flags]
Returns one page of the templates, forms and automations this workspace shares at a public link, the newest link first, with how often each page was opened and how often the item was copied from it. Everything is private until it is shared, so an item that is not in the list has no link. Paging is keyset: --limit takes 1 to 100 and defaults to 50, and nextCursor goes back as --cursor while hasMore is true.
One read scope is enough, and each one reaches its own kind: templates:read lists the templates, forms:read the forms and automations:read the automations, and the kinds a key cannot read are left out. An app a member connected lists the templates of the workspace and the forms and automations that member made.
Add --all to walk every page: a table on a terminal, one JSON object per line when piped or with --ndjson, and one { items, hasMore, nextCursor } document with --json. --max <n> stops after that many items.
Flags
--kind <value>Only links to this kind of item:
template,formorautomation. Left out, every kind the scopes read.--limit <n>Rows per page, a whole number from 1 to 100. The server defaults to 50.
Default50--cursor <value>The
nextCursorfrom the previous page, passed back exactly as it came. It names the last link of that page, so one that names no link of this workspace is a 400invalid_cursor, and so is one whose link was made private since.--allFetch every page and stream the items as they arrive.
--max <n>Stop after this many items. Implies
--all.--ndjsonPrint every item as one JSON object per line. Implies
--all
Examples
nextmail share-links listnextmail share-links list --kind templatenextmail share-links list --all --max 100nextmail share-links list --all > share-links.ndjsonAlso available in
- API
GET /share-links- TypeScript
shareLinks.list()- Python
share_links.list()- Ruby
share_links.list- PHP
shareLinks->list- Go
ShareLinks.List- Java
shareLinks().list- C#
ShareLinks.ListAsync
nextmail share-links get
Read the public link of a template, form or automation
showviewUsage
nextmail share-links get <kind> <item-id> [flags]
Resolves with the public link of one item, with how often its page was opened and how often the item was copied from it. url is the page anyone with the link can open without an account, and token, its last part, is what shared.get and shared.copy take.
Reading it takes the read scope of its kind: templates:read, forms:read or automations:read. A private item has no link, so it answers 404 share_link_not_found, and set makes it public.
Arguments
<kind>RequiredWhat the item is:
template,formorautomation.<item-id>RequiredThe id of the item, as
templates.list,forms.listorautomations.listreturns it: atpl_,frm_oraut_id. A template is named by its id here, never by its slug.
Examples
nextmail share-links get form frm_8d2f6a1c9b3e47d0a5f1c2e9nextmail share-links get form frm_8d2f6a1c9b3e47d0a5f1c2e9 --jsonAlso available in
nextmail share-links set
Make a template, form or automation public
Usage
nextmail share-links set <kind> <item-id> [flags]
Shares one item at a public link, as Share does in the app, and resolves with the link. Anyone holding url can open the page without an account and try the item there: fill in the props of a template, type into a form or follow an automation step by step. With copyable on, anyone signed in can also copy it into their own workspace.
An item that is already public keeps its link and its counts, so the call is safe to repeat. --copyable changes whether people may copy it, and leaving it out keeps what it was, which is true for a new link, so a call with no body shares an item with the defaults.
The page shows what is live: the published version of a template, the published design of a form and the published flow of an automation, or the draft while nothing was published. A copy carries the design only, never the submissions, sends, runs or contacts the original collected, and never the audiences, addresses, forms or webhook endpoints it points at, which stay with you.
Arguments
<kind>RequiredWhat the item is:
template,formorautomation.<item-id>RequiredThe id of the item, as
templates.list,forms.listorautomations.listreturns it: atpl_,frm_oraut_id. A template is named by its id here, never by its slug.
Flags
--copyabletruelets anyone signed in copy the item into their own workspace from the page, andfalselets people only look at it. Left out, a new link is copyable and a link that already exists keeps what it had.--data <json|@file|->The whole
bodyas JSON, inline, from a file with @path, or - for standard input. Flags override its keys.
Examples
nextmail share-links set template tpl_3f9a1c7e5b2d48a6c0e4f1b9nextmail share-links set template tpl_3f9a1c7e5b2d48a6c0e4f1b9 --no-copyableAlso available in
nextmail share-links delete
Make a template, form or automation private
rmdelremoveUsage
nextmail share-links delete <kind> <item-id> [flags]
Takes the public link of one item down, as turning Share off does in the app, and resolves with the link that stopped working. The page stops working at once for everyone who has the link, and the copies already made stay in the workspaces that made them.
Making the item public again with set gives it a new link with its counts at zero, so the old url never works again. Deleting the template, form or automation itself takes its link down too.
Arguments
<kind>RequiredWhat the item is:
template,formorautomation.<item-id>RequiredThe id of the item, as
templates.list,forms.listorautomations.listreturns it: atpl_,frm_oraut_id. A template is named by its id here, never by its slug.
Examples
nextmail share-links delete automation aut_5c1e9a7b3d2f48e6a0b4c7d1nextmail share-links delete automation aut_5c1e9a7b3d2f48e6a0b4c7d1 --yes
Google Workspace