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.
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
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

Response

Default Response

id
string
required
org_id
string
required
category
string
required
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
overrides_saved_reply_id
string | null
required
exclude_from_suggestions
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required