Skip to main content
POST
Create a macro
Write the body in any language. If translation languages are chosen (see Update macro settings), the new macro is translated into each of them in the background.
category is the macro’s group in Settings → Macros and the inbox macro picker. Omit allowed_team_ids, or send [], to show the macro to every agent. Look up valid {{variable}} names with List macro variables. Attachments cannot be set through the API.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
category
string
required

Group the macro belongs to: a section in Settings → Macros and in the inbox macro picker. "general" when it has none.

title
string
required
content
string
required

Macro body as HTML, limited to what every channel can carry:

,
, , , , , [blocked]

    /
      /
    1. and inline images as <img src="…"> pointing at a file uploaded for this organization. Other markup is dropped (its text is kept); escape literal < and & as HTML entities, and use
      or

      for line breaks. Reference variables with {{variable}} syntax.

    [blocked]
Maximum string length: 20000
options
object[]

Up to 3 options the customer can tap instead of typing, sent with the macro on channels that show them. Each label is up to 20 characters. type is text (the tap reaches the session as the customer's reply) or workflow (the tap runs the macro's Macro Option Clicked workflows and the AI doesn't reply). This is the full list: on update, pass an existing option's id to keep it (workflows branching on that id keep working); options left out are removed, [] removes all, and omitting the field leaves them untouched. A macro with options needs body text.

Maximum array length: 3
exclude_from_suggestions
boolean

When true, this macro is never suggested to agents. They can still search for it and use it. Defaults to false.

allowed_team_ids
string[]

Teams whose agents see this macro in the inbox. Empty = every agent. Admins with Macros settings access always see it. Org-wide macros only. Defaults to every agent.

Maximum array length: 50

Response

Default Response

id
string
required
org_id
string
required
category
string
required

Group the macro belongs to: a section in Settings → Macros and in the inbox macro picker. "general" when it has none.

title
string
required
content
string
required

Macro body as channel-safe HTML, with {{variable}} references.

attachments
object[]
required
options
object[]
required
user_id
number | null
required
created_by_user_id
number | null
required

Authenticated creator, when known. Read-only; null for legacy or integration-created macros.

overrides_saved_reply_id
string | null
required
exclude_from_suggestions
boolean
required
allowed_team_ids
string[]
required

Teams whose agents see this macro in the inbox. Empty = every agent. Admins with Macros settings access always see it. Org-wide macros only.

source_language
string | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required