Message object

A message object is created whenever either Ada (an AI Agent or scripted bot) or a chatter sends a message. All messages are associated with a conversation by a conversation_id.

Attributes

AttributeDescriptionTypev1.0v1.1v1.2-1.3v1.4
_idThe unique ID of the message.String
answer_idInternal ID of the Answer that triggered the message (for example 627d28a9bd9ca9e5337b9763). Null if the message was not sent by an Ada bot.String
answer_titleThe title of the answer in the builder interface.String
chatter_idA reference to the chatter object to which the message belongs.String
conversation_idA reference to the conversation object to which the message belongs.String
date_createdThe timestamp indicating when the message was originally created.UTC Timestamp
in_response_toThe message ID of the message that this message was in response to.String
link_was_clickedIndicates whether the chatter clicked a link in an Answer. Values are true or false.Boolean
message_dataAn object containing the message content. The message text is in the body property of the object.JSON Dictionary
recipientThe recipient of the message. A unique ID if it is a chatter, or Ada if the recipient is an AI Agent or scripted bot.String
record_last_updatedThe timestamp indicating when the record was uploaded to the API.UTC Timestamp
reviewIndicates whether the answer was given a thumbs up or thumbs down.Integer
senderThe sender of the message. A unique ID if it is a chatter, or Ada if the recipient is an AI Agent or scripted bot.String

Message data examples

Below are some examples of the message_data returned in a message object.

Greeting

JSON
1"message_data": {
2 "_type": "greeting",
3 "external_chat_id": "<uuid_v4_id>",
4 "reviewable_message": false
5}

Text

JSON
1"message_data": {
2 "_type": "text",
3 "body": "Hi there 👋 Nice to meet you! I’m Ada the chatbot 🤖",
4 "has_variables": false,
5 "reviewable_message": false
6}

Picture

JSON
1"message_data": {
2 "_type": "picture",
3 "alt_text": "Picture of a Ada art waving \"hello\"",
4 "has_variables": false,
5 "pic_url": "https://static.ada.support/images/4d096cfc-2518-4811-8443-e8c063262082.gif",
6 "reviewable_message": false
7}

Quick Reply

JSON
1"message_data": {
2 "_type": "quick_replies",
3 "has_variables": false,
4 "is_forced": false,
5 "quick_replies": [
6 {
7 "button_type": "suggestion",
8 "label": "Pricing",
9 "target": "<mongodb_12_byte_object_id>"
10 },
11 {
12 "button_type": "suggestion",
13 "label": "Calculate your savings",
14 "target": "<mongodb_12_byte_object_id>"
15 },
16 {
17 "button_type": "suggestion",
18 "label": "Request a Demo",
19 "target": "<mongodb_12_byte_object_id>"
20 },
21 {
22 "button_type": "suggestion",
23 "label": "How can Ada help me? ",
24 "target": "<mongodb_12_byte_object_id>"
25 },
26 {
27 "button_type": "suggestion",
28 "label": "How does Ada work with support teams?",
29 "target": "<mongodb_12_byte_object_id>"
30 },
31 {
32 "button_type": "suggestion",
33 "label": "Download our Forrester Report",
34 "target": "<mongodb_12_byte_object_id>"
35 }
36 ],
37 "reviewable_message": false
38}

Trigger

JSON
1"message_data": {
2 "_type": "trigger",
3 "body": "Ask something else",
4 "button_type": "suggestion",
5 "external_chat_id": "<uuid_v4_id>",
6 "reviewable_message": false
7}

Meta

JSON
1"message_data": {
2 "_type": "meta",
3 "meta_message_data": {
4 "id": "5f8a7d080afd19b55945c8ab",
5 "name": "last_answer_id",
6 "new_value": "62322580b151ff975f1eb495",
7 "old_value": "619d95c0c063a5bf2b1efb7c",
8 "scope": "meta"
9 },
10 "meta_message_type": "variable_change"
11}
JSON
1"message_data": {
2 "_type": "meta",
3 "meta_message_type": "generative_reply",
4 "meta_message_data": {
5 "article_ids": ["6232257fb197d1ff65ea92fe", "60cb3ef9b72ebfacb39408da"],
6 "status": "success"
7 }
8}
JSON
1"message_data": {
2 "_type": "meta",
3 "meta_message_type": "event",
4 "meta_message_data": {
5 "event_type": "handoff",
6 "event_subtype": "handoff_requested",
7 "event_data": {
8 "triggered_by": "5dbaef7283d791f585563d84"
9 },
10 "response_id": "6216a263c0c9f28ed7a16c1d"
11 }
12}
JSON
1"message_data": {
2 "_type": "meta",
3 "meta_message_type": "kb_article_click",
4 "meta_message_data": {
5 "article_id": "622bacf18d48fea09fe32fc8",
6 "message_id": "5d8a7d080afd19b55945c8ab"
7 }
8}
JSON
1"message_data": {
2 "_type": "meta",
3 "meta_message_type": "business_event",
4 "meta_message_data": {
5 "event_key": "ada:message_received:campaign_key",
6 "meta": {
7 "campaign_key": "welcome_campaign"
8 },
9 "value": 0.0,
10 "response_id": "654952d3e90767ff49713fbf"
11 }
12}
JSON
1"message_data": {
2 "_type": "meta",
3 "meta_message_type": "engagement",
4 "meta_message_data": {}
5}
JSON
1"message_data": {
2 "_type": "meta",
3 "meta_message_type": "trigger_campaign",
4 "meta_message_data": {
5 "campaign_key": "welcome_campaign"
6 }
7}
JSON
1"message_data": {
2 "_type": "meta",
3 "meta_message_type": "ab_test",
4 "meta_message_data": {
5 "meta": {
6 "ab_test_variable_id": "654952d3e90767ff49713fb2"
7 },
8 "response_id": "619d95c0c063a5bf2b1efb64"
9 }
10}
JSON
1"message_data": {
2 "_type": "meta",
3 "meta_message_type": "action_integration_action_invoke",
4 "meta_message_data": {
5 "integration": "zendesk",
6 "action_id": "create_ticket"
7 }
8}
JSON
1"message_data": {
2 "_type": "meta",
3 "meta_message_type": "proactive_conversation_opened",
4 "meta_message_data": {
5 "proactive_conversation_key": "welcome_campaign",
6 "proactive_conversation_id": "60cb3ef9b72ebfacb39408da"
7 }
8}
JSON
1"message_data": {
2 "_type": "link",
3 "alt_text": "This is a link",
4 "generate_link_preview": true,
5 "has_variables": false,
6 "is_handoff": false,
7 "link_description": "",
8 "link_icon": "",
9 "link_text": "",
10 "new_window": true,
11 "raw_url": "https://www.example.com/",
12 "reviewable_message": false,
13 "title": "",
14 "url": "https://www.example.com"
15}

Web Window

JSON
1"message_data": {
2 "_type": "web_window",
3 "has_forced_quick_replies": true,
4 "has_variables": false,
5 "is_handoff": false,
6 "locked": false,
7 "raw_url": "https://www.example.com",
8 "reviewable_message": true,
9 "window_button_label": "Open me",
10 "window_height": 568,
11 "window_title": "Webwindow",
12 "window_url": "https://www.example.com",
13 "window_width": 320
14}
JSON
1"message_data": {
2 "_type": "sms_consent_asked"
3}

CSAT Prompt

The sms_text field is only included when the survey is sent via SMS.

JSON
1"message_data": {
2 "_type": "csat_shown",
3 "survey_type": "end_chat",
4 "sms_text": "Take a survey: https://app.ada.support/..."
5}

CSAT Result

JSON
1"message_data": {
2 "_type": "csat",
3 "is_positive": true,
4 "score": 5,
5 "style": "NUMERIC",
6 "survey_type": "proactive"
7}

Tool selection

When an AI Agent selects a tool during a conversation, a separate message is created with _type: "tool_call". Tools currently include configured Handoffs and Actions. The tool_name field identifies which tool was selected, and arguments and result capture the inputs and outputs.

Common fields on every tool selection message:

FieldDescriptionType
_typeAlways tool_call.String
tool_nameIdentifies the tool that was selected. A sanitized name derived from the configured Handoff or Action on the AI Agent.String
tool_call_idUnique identifier for this tool selection.String
argumentsThe inputs the AI Agent provided to the tool. The shape depends on tool_name. May be omitted or empty for tools that take no parameters.Object
resultThe outcome of the tool. Includes status (succeeded, failed, or processing), error_message, and return_values. The shape of return_values depends on tool_name.Object
timestampUnix timestamp (seconds) when the tool selection was logged.Number

Naming conventions for tool_name

For Handoffs and Actions configured on the AI Agent, the tool_name is the entity’s name lowercased, with spaces replaced by underscores, non-alphanumeric characters stripped, and truncated to 64 characters. For example, a Handoff named Billing Support produces a tool_name of billing_support.

Examples

The AI Agent selected a Handoff during the conversation. return_values contains the Handoff’s id and name.

In this example, the Handoff is named Billing Support.

JSON
1"message_data": {
2 "_type": "tool_call",
3 "reviewable_message": false,
4 "has_variables": false,
5 "tool_name": "billing_support",
6 "tool_call_id": "69f0881860712c866dc4d772",
7 "result": {
8 "status": "succeeded",
9 "error_message": null,
10 "return_values": {
11 "id": "69f0881860712c866dc4d772",
12 "name": "billing_support"
13 }
14 },
15 "timestamp": 1777371160.413301
16}

The AI Agent invoked an Action during the conversation. arguments contains the input parameters the AI Agent generated for the Action. result.return_values contains the parsed response body and result.status_code is the HTTP status code.

In this example, the Action is named Get Order Status.

JSON
1"message_data": {
2 "_type": "tool_call",
3 "reviewable_message": false,
4 "has_variables": false,
5 "tool_name": "get_order_status",
6 "tool_call_id": "69f077583280e2e5a851ec86",
7 "arguments": {
8 "order_id": "ORD-48291"
9 },
10 "result": {
11 "status": "succeeded",
12 "error_message": null,
13 "return_values": {
14 "status": "shipped",
15 "tracking_number": "1Z999AA10123456784",
16 "estimated_delivery": "2026-05-12"
17 },
18 "status_code": 200
19 },
20 "timestamp": 1777366872.74277
21}

Responses

Below are some examples of the data returned in message objects.

Get all messages created within 1 week of created_since (v2)

{
"data": [
{
"_id": "623225807973ea81fb74577f",
"answer_id": "6216a263c0c9f28ed7a16c1d",
"answer_title": "Ada Interact > Welcome Message",
"chatter_id": "6232257fb197d1ff65ea92fe",
"conversation_id": "62322580b151ff975f1eb495",
"date_created": "2024-03-16T17:59:28.356000+00:00",
"in_response_to": null,
"link_was_clicked": false,
"message_data": {
"_type": "picture",
"alt_text": "",
"has_variables": false,
"pic_url": "https://static.ada.support/images/a76040d4-f431-4956-8984-b7fc3c6a635b.svg",
"reviewable_message": false
},
"recipient": "6232257fb197d1ff65ea92fe",
"record_last_updated": "2024-07-31T13:56:44.423229+00:00",
"review": 0,
"sender": "ada"
},
{
"_id": "623225807973ea81fb745780",
"answer_id": "6216a263c0c9f28ed7a16c1d",
"answer_title": "Ada Interact > Welcome Message",
"chatter_id": "6232257fb197d1ff65ea92fe",
"conversation_id": "62322580b151ff975f1eb495",
"date_created": "2022-03-16T17:59:28.393000+00:00",
"link_was_clicked": false,
"message_data": {
"_type": "text",
"body": "👋 Welcome to Ada Interact! ",
"has_variables": false,
"reviewable_message": false
},
"recipient": "6232257fb197d1ff65ea92fe",
"record_last_updated": "2024-07-31T13:56:44.423229+00:00",
"review": 0,
"sender": "ada"
},
{
"_id": "623225807973ea81fb745781",
"answer_id": "6216a263c0c9f28ed7a16c1d",
"answer_title": "Ada Interact > Welcome Message",
"chatter_id": "6232257fb197d1ff65ea92fe",
"conversation_id": "62322580b151ff975f1eb495",
"date_created": "2022-03-16T17:59:28.426000+00:00",
"link_was_clicked": false,
"message_data": {
"_type": "text",
"body": "If you're curious about any of the reports that Mike mentions, click \"Read the reports\" or just type in 'get the reports'. ",
"has_forced_quick_replies": false,
"has_variables": false,
"reviewable_message": false
},
"recipient": "6232257fb197d1ff65ea92fe",
"record_last_updated": "2024-07-31T13:56:44.423229+00:00",
"review": 0,
"sender": "ada"
},
{
"_id": "623225807973ea81fb745782",
"answer_id": "6216a263c0c9f28ed7a16c1d",
"answer_title": "Ada Interact > Welcome Message",
"chatter_id": "6232257fb197d1ff65ea92fe",
"conversation_id": "62322580b151ff975f1eb495",
"date_created": "2022-03-16T17:59:28.455000+00:00",
"link_was_clicked": false,
"message_data": {
"_type": "quick_replies",
"has_variables": false,
"is_forced": false,
"quick_replies": [
{
"button_type": "suggestion",
"label": "Read the reports ",
"target": "6220f0840fffbae023fa47f0"
},
{
"button_type": "suggestion",
"label": "Get a demo of our newest features",
"target": "62312ec34abadc6df54df263"
},
{
"button_type": "suggestion",
"label": "Need a little pick me up?",
"target": "6226319838a50cf76ce74553"
},
{
"button_type": "suggestion",
"label": "Having issues with the stream?",
"target": "60c8d235b4499cfc9ca3e070"
}
],
"reviewable_message": false
},
"recipient": "6232257fb197d1ff65ea92fe",
"record_last_updated": "2024-07-31T13:56:44.423229+00:00",
"review": 0,
"sender": "ada"
}
],
"meta": {
"next_page_uri": "https://<bot-handle>.ada.support/api/v2/export/messages?created_since=2024-03-15T14%3A01%3A01.563000%2B00%3A00&created_to=2024-09-22T00%3A00%3A00%2B00%3A00&page_size=100"
}
}