Update a snippet
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.
The 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, archived). Pass archived: true to archive, false to restore.
Warning: snippet_type is immutable. Sending a different value, or sending the body shape for the wrong type, returns a 422 with snippet_type cannot be changed.
See Create a snippet for the full snippet model and how key ties into Liquid.
Request
- Base URLhttps://api.kit.com
- URLhttps://api.kit.com/v4/snippets/{id}
- Auth
- API key in header X-Kit-Api-Key
- or OAuth 2Authorization code: https://api.kit.com/v4/oauth/authorizeToken URL: https://api.kit.com/v4/oauth/token
Path parameters
Request body
Response
Updates the snippet and returns its details
Changes
No recorded changes to this operation across all 2 revisions of this API.