---
title: "nextmail shared"
description: "Every command in this namespace, with its arguments, flags and examples."
url: "https://nextmail.sh/docs/cli/reference/shared"
area: "CLI"
category: "Reference"
---

# nextmail shared

Every command in this namespace, with its arguments, flags and examples.

## Commands

### `nextmail shared get`

Read a template, form or automation shared at a public link

```bash
nextmail shared get <token> [flags]
```

Resolves with what the public page of a link shows, from any workspace, this one included: the name and description of the item, the name of the workspace that shares it, whether it may be copied, and its content. Of `template`, `form` and `automation`, the one `kind` names is set and the other two are null.

A template comes rendered with the sample values of its props, as `subject`, `html` and `text`, and `unfilled` names the props and slots that have no sample value, so they render empty. A form comes with its design and whether it asks people to confirm their address. An automation comes with its flow, its settings and the template each send step sends. The audiences, addresses, forms and webhook endpoints an automation points at are left empty, and the audience choices of a form keep their labels only, because those belong to the owner.

Reading it here does not count as a view of the page.

- Scopes: `templates:read`.
- Needs a sign-in.
- Aliases: `show`, `view`.

**Arguments**

- `<token>` (required): The token at the end of the public link: `token` on a `ShareLinkResource`, or the last part of its `url`.

**Examples**

```bash
nextmail shared get 9c4e2a7f1b6d3e8a0f5c2b7d4e1a9f36
```

Print the raw JSON

```bash
nextmail shared get 9c4e2a7f1b6d3e8a0f5c2b7d4e1a9f36 --json
```

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

### `nextmail shared copy`

Copy a shared template, form or automation into this workspace

```bash
nextmail shared copy <token> [flags]
```

Copies the item at a public link into this workspace as a new draft, as Copy to my workspace does on the page, and resolves with the copy. The copy counts in `copies` on the link, and it is an item of its own, so later changes on either side never reach the other.

A template whose name is taken here gets a number after it, and the images it shows are copied into this workspace. An automation brings the templates its send steps send, copied as new templates and listed in `templateIds`, and its steps send those copies.

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. Those stay with the owner and are left empty for you to fill in.

- Scopes: `templates:write`.
- Needs a sign-in.

**Arguments**

- `<token>` (required): The token at the end of the public link: `token` on a `ShareLinkResource`, or the last part of its `url`.

**Examples**

```bash
nextmail shared copy 9c4e2a7f1b6d3e8a0f5c2b7d4e1a9f36
```

Print the raw JSON

```bash
nextmail shared copy 9c4e2a7f1b6d3e8a0f5c2b7d4e1a9f36 --json
```

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).
