---
title: "Sharing"
description: "Public links to templates, forms and automations, and copies made from them."
url: "https://nextmail.sh/docs/mcp/tools/sharing"
area: "MCP server"
category: "Tools"
---

# Sharing

Public links to templates, forms and automations, and copies made from them.

## Sharing tools

| Tool | What it does |
| --- | --- |
| listShareLinks | Every template, form and automation that is public, newest link first, with its link and how often it was opened and copied. |
| getShareLink | Whether one item is public, and its link when it is. |
| setShareLink | Make an item public at a link anyone can open without an account, or change whether people may copy it. |
| deleteShareLink | Make an item private again. The link stops working at once, and copies already made stay. |
| getSharedItem | Read what a public link shows, from any workspace, before deciding to copy it. Takes the whole link or its token. |
| copySharedItem | Copy the item at a public link into this workspace as a new draft. |

> A copy carries the design only: never the sign-ups, sends, runs or contacts the original collected. The audiences, sender addresses, forms and webhook endpoints an automation points at are left empty, the templates it sends are copied with it, and the images a template shows are copied into the workspace.

> Each tool takes the scope of the kind it acts on, `templates:*`, `forms:*` or `automations:*`, and copying an automation that sends templates also takes `templates:write`. In the app’s chat, the three that change something ask first unless you asked for them.

## Reference

### `listShareLinks`

The templates, forms and automations of this workspace that are public, newest link first, each with its public link, whether people may copy it, and how often it was opened and copied. kind keeps one of the three. Kinds you cannot read are left out.

- No scope.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `kind` (`string`, one of `"template"`, `"form"`, `"automation"`)
- `cursor` (`string`, 1 to 128 characters): nextCursor from the previous page.

Also available in: API [`GET /share-links`](https://nextmail.sh/docs/api/reference/sharing#get-share-links); TypeScript [`shareLinks.list()`](https://nextmail.sh/docs/sdk/reference/share-links#list), [`shareLinks.listAll()`](https://nextmail.sh/docs/sdk/reference/share-links#listAll), [`shareLinks.iterate()`](https://nextmail.sh/docs/sdk/reference/share-links#iterate); Python [`share_links.list()`](https://nextmail.sh/docs/python/reference/share-links#list), [`share_links.list_all()`](https://nextmail.sh/docs/python/reference/share-links#listAll), [`share_links.iterate()`](https://nextmail.sh/docs/python/reference/share-links#iterate); Ruby [`share_links.list`](https://nextmail.sh/docs/ruby/reference/share-links#list), [`share_links.list_all`](https://nextmail.sh/docs/ruby/reference/share-links#listAll), [`share_links.iterate`](https://nextmail.sh/docs/ruby/reference/share-links#iterate); PHP [`shareLinks->list`](https://nextmail.sh/docs/php/reference/share-links#list), [`shareLinks->listAll`](https://nextmail.sh/docs/php/reference/share-links#listAll), [`shareLinks->iterate`](https://nextmail.sh/docs/php/reference/share-links#iterate); Go [`ShareLinks.List`](https://nextmail.sh/docs/go/reference/share-links#list), [`ShareLinks.ListAll`](https://nextmail.sh/docs/go/reference/share-links#listAll), [`ShareLinks.Iterate`](https://nextmail.sh/docs/go/reference/share-links#iterate); Java [`shareLinks().list`](https://nextmail.sh/docs/java/reference/share-links#list), [`shareLinks().listAll`](https://nextmail.sh/docs/java/reference/share-links#listAll), [`shareLinks().iterate`](https://nextmail.sh/docs/java/reference/share-links#iterate); C# [`ShareLinks.ListAsync`](https://nextmail.sh/docs/csharp/reference/share-links#list), [`ShareLinks.ListAllAsync`](https://nextmail.sh/docs/csharp/reference/share-links#listAll), [`ShareLinks.IterateAsync`](https://nextmail.sh/docs/csharp/reference/share-links#iterate).

### `getShareLink`

Whether one template, form or automation is public, and if it is, its public link, whether people may copy it and how often it was opened and copied.

- No scope.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `kind` (`string`, required, one of `"template"`, `"form"`, `"automation"`)
- `itemId` (`string`, required, 1 to 128 characters)

Also available in: API [`GET /share-links/{kind}/{itemId}`](https://nextmail.sh/docs/api/reference/sharing#get-share-links-kind-itemid); TypeScript [`shareLinks.get()`](https://nextmail.sh/docs/sdk/reference/share-links#get); Python [`share_links.get()`](https://nextmail.sh/docs/python/reference/share-links#get); Ruby [`share_links.get`](https://nextmail.sh/docs/ruby/reference/share-links#get); PHP [`shareLinks->get`](https://nextmail.sh/docs/php/reference/share-links#get); Go [`ShareLinks.Get`](https://nextmail.sh/docs/go/reference/share-links#get); Java [`shareLinks().get`](https://nextmail.sh/docs/java/reference/share-links#get); C# [`ShareLinks.GetAsync`](https://nextmail.sh/docs/csharp/reference/share-links#get).

### `setShareLink`

Make a template, form or automation public at a link anyone can open without an account, as Share does in the app, or change whether people may copy it. copyable is true for a new link and left as it was when omitted. The page shows the published version, or the draft when 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 the owner and are left empty for you to fill in. The templates an automation sends are copied with it, and the images a template shows are copied into your workspace.

- No scope.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `kind` (`string`, required, one of `"template"`, `"form"`, `"automation"`)
- `itemId` (`string`, required, 1 to 128 characters)
- `copyable` (`boolean`)

Also available in: API [`PUT /share-links/{kind}/{itemId}`](https://nextmail.sh/docs/api/reference/sharing#put-share-links-kind-itemid); TypeScript [`shareLinks.set()`](https://nextmail.sh/docs/sdk/reference/share-links#set); Python [`share_links.set()`](https://nextmail.sh/docs/python/reference/share-links#set); Ruby [`share_links.set`](https://nextmail.sh/docs/ruby/reference/share-links#set); PHP [`shareLinks->set`](https://nextmail.sh/docs/php/reference/share-links#set); Go [`ShareLinks.Set`](https://nextmail.sh/docs/go/reference/share-links#set); Java [`shareLinks().set`](https://nextmail.sh/docs/java/reference/share-links#set); C# [`ShareLinks.SetAsync`](https://nextmail.sh/docs/csharp/reference/share-links#set).

### `deleteShareLink`

Make a template, form or automation private again: its public link stops working at once for everyone, and copies people already made stay theirs. Sharing it again gives a new link.

- No scope.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `kind` (`string`, required, one of `"template"`, `"form"`, `"automation"`)
- `itemId` (`string`, required, 1 to 128 characters)

Also available in: API [`DELETE /share-links/{kind}/{itemId}`](https://nextmail.sh/docs/api/reference/sharing#delete-share-links-kind-itemid); TypeScript [`shareLinks.delete()`](https://nextmail.sh/docs/sdk/reference/share-links#delete); Python [`share_links.delete()`](https://nextmail.sh/docs/python/reference/share-links#delete); Ruby [`share_links.delete`](https://nextmail.sh/docs/ruby/reference/share-links#delete); PHP [`shareLinks->delete`](https://nextmail.sh/docs/php/reference/share-links#delete); Go [`ShareLinks.Delete`](https://nextmail.sh/docs/go/reference/share-links#delete); Java [`shareLinks().delete`](https://nextmail.sh/docs/java/reference/share-links#delete); C# [`ShareLinks.DeleteAsync`](https://nextmail.sh/docs/csharp/reference/share-links#delete).

### `getSharedItem`

Read what a public link shows, from any workspace: the shared template, form or automation, who shares it and whether it may be copied, with its subject and props, its fields, or its trigger and steps. Use it before copySharedItem to tell the user what they would get.

- No scope.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `link` (`string`, required, 1 to 512 characters): The public link, or just the token at the end of it.

### `copySharedItem`

Copy the template, form or automation at a public link into this workspace as a new draft, as Copy to my workspace does on its page, and say where it landed. 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 the owner and are left empty for you to fill in. The templates an automation sends are copied with it, and the images a template shows are copied into your workspace.

- No scope.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `link` (`string`, required, 1 to 512 characters): The public link, or just the token at the end of it.

Also available in: API [`POST /shared/{token}/copy`](https://nextmail.sh/docs/api/reference/sharing#post-shared-token-copy); TypeScript [`shared.copy()`](https://nextmail.sh/docs/sdk/reference/shared#copy); Python [`shared.copy()`](https://nextmail.sh/docs/python/reference/shared#copy); Ruby [`shared.copy`](https://nextmail.sh/docs/ruby/reference/shared#copy); PHP [`shared->copy`](https://nextmail.sh/docs/php/reference/shared#copy); Go [`Shared.Copy`](https://nextmail.sh/docs/go/reference/shared#copy); Java [`shared().copy`](https://nextmail.sh/docs/java/reference/shared#copy); C# [`Shared.CopyAsync`](https://nextmail.sh/docs/csharp/reference/shared#copy).
