Skip to main content
GET
/
v4
/
snippets
List snippets
curl --request GET \
  --url https://api.kit.com/v4/snippets \
  --header 'X-Kit-Api-Key: <api-key>'
{
  "snippets": [
    {
      "id": 5,
      "name": "Welcome message",
      "snippet_type": "inline",
      "archived": false,
      "key": "welcome-message",
      "created_at": "2023-02-17T11:43:55Z",
      "updated_at": "2023-02-17T11:43:55Z",
      "content": "Hello {{ subscriber.first_name }}",
      "document": {
        "id": 81,
        "value": null,
        "value_html": "content",
        "value_plain": null,
        "version": 1
      }
    }
  ],
  "pagination": {
    "has_previous_page": false,
    "has_next_page": false,
    "start_cursor": "WzVd",
    "end_cursor": "WzVd",
    "per_page": 500
  }
}

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

Query Parameters

after
any | null

To fetch next page of results, use ?after=<end_cursor>

archived
any | null

When true, returns only archived snippets. Defaults to false.

before
any | null

To fetch previous page of results, use ?before=<start_cursor>

include_content
boolean

When true, includes both the content and document fields for each snippet in the response. Defaults to false.

include_total_count
boolean

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.

per_page
any | null

Number of results per page. Default 500, maximum 1000.

snippet_type
any | null

Filter snippets by type. Use inline for text snippets or block for rich-text block snippets.

Response

Returns a paginated list of all snippets for your account

snippets
object[]
required
pagination
object
required