---
title: "Update snippets"
method: PUT
path: "/v1/snippets"
tags: ["Snippets"]
---

# Update snippets

`PUT /v1/snippets`

In your payload, you'll pass a `name` and `value`. Snippet names are unique. If the snippet `name` does not exist, we'll create a new snippet. If the `name` exists, we'll update the existing snippet.

## Request body

- SnippetRequest — Request body for creating or updating a snippet. Only `name` and `value` are accepted; `updated_at` is returned in responses only.
  - `name` string, required — The name of the snippet, must be unique. Trimmed of leading and trailing whitespace before storage.
  - `value` string, required — The contents of the snippet (plain text or Liquid). Trimmed of leading and trailing whitespace before storage. Max length is environment-specific (default 16000).

## Response `200`

Returns an array of `snippets`.

- object
  - `snippet` Snippet — describes a piece of reusable content. You must provide a name for the snippet and the `value`—the content that appears in messages that use the snippet.
    - `name` string, required — The name of the snippet, must be unique.
    - `value` string, required — The contents of the snippet.
    - `updated_at` integer — The last date-time the snippet was updated.

## Other responses

- `400` — The request is malformed.
- `429` — Your request is over the 10-per-second limit.

---

[API](https://skmtc.dev/customer/apis/customer-io-journeys-api-reference.md) · [All operations](https://skmtc.dev/customer/apis/customer-io-journeys-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/customer/customer-io-journeys-api-reference/revisions/4b391af7cb06/schema)
