POST/content_snippets

Create a content snippet

Creates a content snippet for reuse by the AI agent and Copilot. Provide a title and the snippet content as either json_blocks or body_markdown; these content formats are mutually exclusive. Audience targeting and availability flags are optional.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 8 body fields
Intercom-Versionstringoptional
The Intercom API version to use. Defaults to 2.17 when omitted.
Allowed:1.01.11.21.31.42.02.12.22.32.42.52.6Default:2.17

Content snippet details. Provide a title and one of the mutually exclusive content fields, json_blocks or body_markdown.

titlestringrequired
The title of the content snippet.
json_blocksarray<object>optional
The content blocks that make up the body of the snippet. Mutually exclusive with `body_markdown`.
body_markdownstringoptional
The content of the snippet in markdown. An alternative to `json_blocks` — you can provide content as markdown instead of structured blocks. Mutually exclusive with `json_blocks`.
localestringoptional
The locale of the content snippet. Defaults to `en`.
Default:en
audience_idsarray<integer>optional
The list of audience IDs to target this content snippet to for Fin AI Agent. Pass an empty array or omit the field for no audience targeting. Unknown audience IDs return a `404` error with no partial commit.
ai_chatbot_availabilitybooleanoptional
Whether the content snippet should be available for AI Chatbot (Fin). Defaults to false.
Default:false
ai_copilot_availabilitybooleanoptional
Whether the content snippet should be available for AI Copilot. Defaults to false.
Default:false
ai_sales_agent_availabilitybooleanoptional
Whether the content snippet should be available for AI Sales Agent. Defaults to false.
Default:false

3 status codes
201Returns the created content snippet, including its generated identifier, content, locale, availability settings, audience IDs, and creation and update timestamps.
typestringoptional
String representing the object's type. Always has the value `content_snippet`.
idstringoptional
The unique identifier for the content snippet.
titlestringoptional
The title of the content snippet.
localestringoptional
The locale of the content snippet.
json_blocksarray<object>optional
The content blocks that make up the body of the snippet.
body_markdownstringoptional
The body of the content snippet in markdown.
chatbot_availabilityintegerdeprecatedoptional
Deprecated. Use ai_chatbot_availability instead. Whether this snippet is available for Fin (1 = on, 0 = off).
copilot_availabilityintegerdeprecatedoptional
Deprecated. Use ai_copilot_availability instead. Whether this snippet is available for Copilot (1 = on, 0 = off).
ai_chatbot_availabilitybooleanoptional
Whether the content snippet is available for AI Chatbot (Fin).
ai_copilot_availabilitybooleanoptional
Whether the content snippet is available for AI Copilot.
ai_sales_agent_availabilitybooleanoptional
Whether the content snippet is available for AI Sales Agent.
created_atintegeroptional
The time the snippet was created as a UNIX timestamp.
updated_atintegeroptional
The time the snippet was last updated as a UNIX timestamp.
audience_idsarray<integer>optional
The list of audience IDs this content snippet is targeted to for Fin AI Agent. Empty array means no audience targeting is set.
404Returned when an audience ID in `audience_ids` is unknown; no partial changes are committed.

One documented failure

  • parameter_invalid

    audience_ids contains unknown audience IDs: 999

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects
422Returned when the request fails validation.

One documented failure

  • validation_error

    The language is not currently supported for Fin

typestringrequired
The type is error.list
request_idstringoptional
errorsarray<object>required
An array of one or more error objects

Error handling

A 404 is returned when an audience_ids value does not identify a known audience. A 422 is returned when the request fails validation. title is required and must not exceed 255 characters; provide either json_blocks or body_markdown, but not both.