Skip to main content
POST
/
v4
/
snippets
Create a snippet
curl --request POST \
  --url https://api.kit.com/v4/snippets \
  --header 'Content-Type: application/json' \
  --header 'X-Kit-Api-Key: <api-key>' \
  --data '
{
  "name": "Cat Fact of the Day",
  "snippet_type": "inline",
  "content": "Did you know, {{ subscriber.first_name }}? Cats can rotate their ears 180 degrees."
}
'
{
  "snippet": {
    "id": 31,
    "name": "Cat Fact of the Day",
    "snippet_type": "inline",
    "archived": false,
    "key": "cat-fact-of-the-day",
    "created_at": "2026-04-28T18:55:07Z",
    "updated_at": "2026-04-28T18:55:07Z",
    "content": "Did you know, {{ subscriber.first_name }}? Cats can rotate their ears 180 degrees.",
    "document": {
      "id": 107,
      "value": null,
      "value_html": null,
      "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

Body

application/json
name
string
required

Name of the snippet

snippet_type
enum<string>
required

Must be 'inline'

Available options:
inline
content
string
required

Liquid-enabled text content for the snippet

Response

Creates a new snippet

snippet
object
required