---
title: "Create Snippet"
method: POST
path: "/snippets"
tags: ["Snippets"]
---

# Create Snippet

`POST /snippets`

Create a new snippet

## Request body

- SnippetInput
  - `identifier` string, required — A unique, newsletter-scoped slug used to reference the snippet inside email content (e.g. `{{ snippets.footer }}`). Must be unique per newsletter.
  - `name` string, required — A human-readable name for the snippet, shown in the Buttondown UI.
  - `content` string — The body of the snippet, substituted wherever the snippet is referenced. Interpreted according to `mode`.
  - `mode` 'fancy' | 'naked' | 'plaintext' — An enumeration.

## Response `201`

Created

- Snippet
  - `id` string, required — A unique TypeID associated with the object.
  - `creation_date` string, date-time, required — The date and time at which the object was first created.
  - `identifier` string, required — A unique, newsletter-scoped slug used to reference the snippet inside email content (e.g. `{{ snippets.footer }}`). Must be unique per newsletter.
  - `name` string, required — A human-readable name for the snippet, shown in the Buttondown UI.
  - `content` string, required — The body of the snippet, substituted wherever the snippet is referenced. Interpreted according to `mode`.
  - `mode` 'fancy' | 'naked' | 'plaintext', required — An enumeration.
  - `reference_count` integer — The number of emails that currently reference this snippet.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `409` — Conflict
- `422` — Unprocessable Entity
- `429` — Too Many Requests

---

[API](https://skmtc.net/buttondown/apis/buttondown-api.md) · [All operations](https://skmtc.net/buttondown/apis/buttondown-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/buttondown/buttondown-api/versions/3a702c095d22/schema)
