> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Snippets

> Saved snippets and hashtag groups your team drops into posts.

> [!NOTE]
>
> Each route needs its `snippets` permission: `snippets:read` to list, `snippets:create`, `snippets:update` and `snippets:delete` to change them. The same permission gates the matching [MCP tool](/docs/mcp/tools-reference.md#snippets). See [Permissions](/docs/essentials/authentication.md#permissions).

A snippet is text a workspace keeps to reuse in posts: a sign-off, a call to action, a shop link. A hashtag group is a snippet of the `hashtags` kind, such as `#haldencoffee #springmenu`. In the app, both are under the **Snippets** button in the post composer. Every plan has snippets, Free included.

| Method | Path | What it does | MCP tool |
| - | - | - | - |
| GET | [`/snippets`](/docs/api-reference/snippets/list) | Every snippet, by kind, then name. | `list-snippets` |
| POST | [`/snippets`](/docs/api-reference/snippets/create) | Save a snippet or a hashtag group. | `create-snippet` |
| PUT | [`/snippets/{id}`](/docs/api-reference/snippets/update) | Rename it, change its text or its kind. | `update-snippet` |
| DELETE | [`/snippets/{id}`](/docs/api-reference/snippets/delete) | Delete it. | `delete-snippet` |

## The snippet object

| Field | Type | Description |
| - | - | - |
| `id` | integer | The snippet's id. |
| `workspace_id` | integer | The workspace it belongs to. |
| `kind` | string | `snippet` (any saved text) or `hashtags` (a hashtag group). |
| `name` | string | The short name shown in the list. |
| `body` | string | The text that goes into the post. |
| `created_by` | integer or null | The id of the person who saved it. `null` once that person's account is deleted; the snippet stays. |
| `created_at` | string | When it was saved (ISO 8601). |
| `updated_at` | string | When it last changed (ISO 8601). |

```json theme={null}
{
  "id": 301,
  "workspace_id": 12,
  "kind": "hashtags",
  "name": "Spring menu tags",
  "body": "#haldencoffee #springmenu #leedscoffee",
  "created_by": 7,
  "created_at": "2030-03-01T10:12:00+00:00",
  "updated_at": "2030-03-01T10:12:00+00:00"
}
```

## Rules

* `kind` is `snippet` or `hashtags`.
* `name` is 1 to 80 characters. Spaces at the start and end are dropped before it is counted and saved. Names need not be unique.
* `body` is 1 to 5,000 characters. Spaces and line breaks at the start and end are dropped too.
* A workspace keeps at most 500 snippets, both kinds together. Saving one more is refused with `422` and the message `This workspace has 500 saved snippets, the most it can keep. Delete one to save another.`
* Lists are ordered by `kind`, then `name`.

## Roles

The person who owns the key also needs a role that allows it in the snippet's workspace: every role can read snippets, and owners, managers, content managers and content creators can create, edit and delete them (the same roles as labels). If not, the request is refused with `403`.

A snippet of a workspace the key's person is not in is answered with `404`, as if it did not exist.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.