{
  "opencollection": "1.0.0",
  "info": {
    "name": "Kit Accounts Snippets API",
    "version": "4.0"
  },
  "items": [
    {
      "info": {
        "name": "Snippets",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List snippets",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.kit.com/v4/snippets",
            "params": [
              {
                "name": "after",
                "value": "",
                "type": "query",
                "description": "To fetch next page of results, use `?after=<end_cursor>`"
              },
              {
                "name": "archived",
                "value": "",
                "type": "query",
                "description": "When `true`, returns only archived snippets. Defaults to `false`."
              },
              {
                "name": "before",
                "value": "",
                "type": "query",
                "description": "To fetch previous page of results, use `?before=<start_cursor>`"
              },
              {
                "name": "include_content",
                "value": "true",
                "type": "query",
                "description": "When `true`, includes both the `content` and `document` fields for each snippet in the response. Defaults to `false`."
              },
              {
                "name": "include_total_count",
                "value": "false",
                "type": "query",
                "description": "Set to `true` to include the `total_count` in the response. This option can cause slow responses; if paging through results, request it only on the first page and reuse the value for subsequent pages."
              },
              {
                "name": "per_page",
                "value": "",
                "type": "query",
                "description": "Number of results per page. Default 500, maximum 1000."
              },
              {
                "name": "snippet_type",
                "value": "",
                "type": "query",
                "description": "Filter snippets by type. Use `inline` for text snippets or `block` for rich-text block snippets."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "X-Kit-Api-Key",
              "value": "{{X-Kit-Api-Key}}",
              "placement": "header"
            }
          },
          "docs": "Returns every snippet on the account. Each snippet's `key` is the identifier used in Liquid — `{{ snippet.key }}` — when creating a broadcast or sequence email. See [Create a snippet](/api-reference/snippets/create-a-snippet) for how snippets work end-to-end.\n\n**Tip:** the heavier `content` and `document` fields are omitted by default to keep responses fast. Pass `include_content=true` when you need the body — for example, to render a preview or audit Liquid usage.\n\nFilter the result with `snipp"
        },
        {
          "info": {
            "name": "Create a snippet",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.kit.com/v4/snippets",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "X-Kit-Api-Key",
              "value": "{{X-Kit-Api-Key}}",
              "placement": "header"
            }
          },
          "docs": "Snippets are reusable pieces of email content you can drop into a broadcast or sequence email using Liquid: `{{ snippet.key }}`. Update the snippet once and every email that references it picks up the new content on next send.\n\nThere are two `snippet_type`s. **`inline`** snippets store plain-text content (with Liquid variable support like `{{ subscriber.first_name }}`) in the `content` field. **`block`** snippets store rich-text HTML — text, lists, images, buttons — in `document_attributes.value"
        },
        {
          "info": {
            "name": "Get a snippet",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.kit.com/v4/snippets/:id",
            "params": [
              {
                "name": "id",
                "value": "25",
                "type": "path"
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "X-Kit-Api-Key",
              "value": "{{X-Kit-Api-Key}}",
              "placement": "header"
            }
          },
          "docs": "Fetches a single snippet by `id`. Unlike [List snippets](/api-reference/snippets/list-snippets), this endpoint **always returns the full `content` and `document`** — no `include_content` flag needed.\n\nUse this when you have an `id` (e.g. stored from a prior create call) and need the current `key` and body — for example, to preview the resolved HTML or confirm a snippet still exists before referencing it as `{{ snippet.key }}` in a broadcast or sequence email. See [Create a snippet](/api-referenc"
        },
        {
          "info": {
            "name": "Update a snippet",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.kit.com/v4/snippets/:id",
            "params": [
              {
                "name": "id",
                "value": "60",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "X-Kit-Api-Key",
              "value": "{{X-Kit-Api-Key}}",
              "placement": "header"
            }
          },
          "docs": "Rename a snippet, replace its body, or archive/restore it. Updates apply on the next send of any email that references the snippet via `{{ snippet.key }}` — there's no per-email versioning, so a content change ripples to every broadcast or sequence email using that key.\n\nThe request body must match the existing `snippet_type`. For an **`inline`** snippet, send `content` (and optionally `name`, `archived`). For a **`block`** snippet, send `document_attributes.value_html` (and optionally `name`, `"
        }
      ]
    }
  ],
  "bundled": true
}