Skip to main content
POST
Send a message

Custom data

This endpoint accepts two independent custom_data objects, each merged into a different record:
  • Top-level custom_data — session-level attributes that belong to this conversation, such as an order ID, cart value, or routing flag. Merged into the chat session and returned by Get Session. Values can be strings, numbers, or booleans.
  • contact.custom_data — contact-level attributes that belong to the person, such as plan, region, or account tier. Merged into the contact. Values are strings.
Both merge into any existing data, so you only need to send the keys you want to add or update. Nested objects are rejected with a 400.
Session custom_data set through this endpoint is stored on the session but is not synced to a connected external ticketing system (e.g. Intercom or HubSpot).

Option taps

An agent reply sent from a macro with options carries them on the conversation.agent_response webhook as options, next to the reply’s message_id, and on the message’s event.options in session history. On API sessions your client renders them. When the customer taps one, send a contact message that names the tap in message.option_reply. The message is recorded with the option’s label as its text, and an option that isn’t on a message of this session is rejected with a 400:
Only the first tap on the session’s newest message with options counts, and only while the session is open. A tap on a workflow option runs the macro’s Macro Option Clicked workflows and the AI doesn’t reply; a text option is handled like any contact message. A tap that doesn’t count, and the same text sent without option_reply, is handled as a normal message. option_reply is rejected with a 400 when sender is agent.

Authorizations

Authorization
string
header
required

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

Path Parameters

session_id
string
required

The unique identifier of the chat session

Body

application/json
sender
enum<string>
required
Available options:
contact,
agent
message
object
required
contact
object
custom_data
object

Session-level custom data to merge into the chat session. Use contact.custom_data for contact-level attributes.

agent
object
should_take_over_session_from_ai
boolean
default:false

Response

Default Response

success
boolean
required
data
object
required