Snippets

List snippets

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 for how snippets work end-to-end.

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.

Filter the result with snippet_type (inline or block) and archived (defaults to false, set true to list only archived snippets).

get/v4/snippets

Request

  • Base URL
    https://api.kit.com
  • URL
    https://api.kit.com/v4/snippets
  • Auth
    • API key in header X-Kit-Api-Key
    • or OAuth 2
      Authorization code: https://api.kit.com/v4/oauth/authorize
      Token URL: https://api.kit.com/v4/oauth/token

Query parameters

afterunknown

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

archivedunknown

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

beforeunknown

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

include_contentboolean

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

include_total_countboolean

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_pageunknown

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

snippet_typeunknown

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

Changes

No recorded changes to this operation across all 2 revisions of this API.