Skip to main content
PUT
/
v4
/
snippets
/
{id}
Update a snippet
curl --request PUT \
  --url https://api.kit.com/v4/snippets/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-Kit-Api-Key: <api-key>' \
  --data '
{
  "name": "Dog Fact of the Day"
}
'
{
  "snippet": {
    "id": 57,
    "name": "Dog Fact of the Day",
    "snippet_type": "inline",
    "archived": false,
    "key": "welcome-message",
    "created_at": "2023-02-17T11:43:55Z",
    "updated_at": "2026-04-28T18:55:11Z",
    "content": "Hello {{ subscriber.first_name }}",
    "document": {
      "id": 133,
      "value": null,
      "value_html": "content",
      "value_plain": null,
      "version": 1
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.kit.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Kit-Api-Key
string
header
required

Authenticate API requests via an API Key

Path Parameters

id
integer
required

Body

application/json
name
string

New name for the snippet

snippet_type
string

Cannot be changed — must match the existing type if provided

archived
boolean

Pass true to archive or false to restore the snippet

content
string

New Liquid-enabled text content

Response

Updates the snippet and returns its details

snippet
object
required