Skip to main content

Data API Reference

Every endpoint, parameter and field of the Maya Data API, with the values a field can have. How to create a key and keep a copy of your conversations is in Exporting your conversation data.

Endpoints​

Every address starts with the API base URL, https://api.mayatravel.ai/v1, and needs your key in the Authorization: Bearer header.

EndpointWhat it returns
GET /conversationsConversations, up to 50 per page, oldest first: by created_at_utc without filters, and by updated_at_utc when you pass updated_after.
GET /conversations/{chat_uuid}One conversation with its messages. Answers 404 if it doesn't exist or belongs to another organisation.
GET /meThe organisation and permissions of your key, and the limits that apply. Use it to test a new key.

Parameters​

These apply to GET /conversations. Times are ISO 8601, for example 2026-09-30T14:22:05Z; a time without a zone counts as UTC.

ParameterTypeMeaning
cursorstringThe next_cursor from the previous page. Leave it out on the first call. It remembers your filters, so you can send it alone or together with the same filters; different filters are refused.
updated_aftertimestampOnly conversations whose updated_at_utc is on or after this moment. Conversations that changed in the last 30 minutes come in a later run.
created_aftertimestampOnly conversations with created_at_utc on or after this moment.
created_beforetimestampOnly conversations with created_at_utc before this moment.

Responses​

A page of conversations. Follow next_cursor until has_more is false. A page can hold fewer than 50 conversations, or none, and still have more after it.

{
"data": [ /* up to 50 conversations */ ],
"next_cursor": "eyJ2IjoxLCJjIjoiMjAyNi0wOS0zMFQxNDoyMjowNVoifQ",
"has_more": true
}

The answer from /me:

{
"organization": "example-travel",
"scopes": ["maya:export"],
"limits": { "conversations_per_minute": 500, "concurrent_requests": 1, "page_size": 50 }
}

An error, with a code to check and a message to read:

{ "error": { "code": "rate_limited", "message": "Limit of 500 conversations per minute reached. Try again in 12 seconds." } }
StatusWhen
400A parameter or the cursor is invalid.
401The key is missing, wrong or revoked.
403The key is not a conversation-export key, belongs to another environment, or its owner no longer has access to the organisation. Use a key from the API keys card, not AI Connections (MCP).
404The conversation doesn't exist for your organisation, or the address isn't an endpoint.
429The limit of 500 conversations a minute is reached, or another request for your organisation is still running. Retry-After says how many seconds to wait.
500, 503Something went wrong on the Maya side. Retry with the same cursor.

Conversation​

One record per conversation. Only real conversations are included: at least one message from the visitor. Test conversations and chat windows opened without a message are left out. A field marked "or null" can be empty.

Identity and Time​

FieldTypeMeaning
chat_uuidstringUnique id of the conversation, stable forever. The Maya chat widget sends the same value as chat_id with the events it reports to your analytics, so you can join conversations with your web analytics.
ga_client_idstring or nullThe GA4 client id of the visitor's browser, when Maya captured it. Use it to join conversations with your Google Analytics data.
created_at_utctimestampWhen the chat window was opened. This can be days before the first message.
updated_at_utctimestampWhen the conversation last changed: a new message, or Maya finished processing it. Use it with updated_after.
first_user_message_at_utctimestampWhen the visitor sent the first message. Use this to date a conversation.
last_message_at_utctimestamp or nullWhen the last message was sent. Empty when the exact message times aren't available.
duration_secondsinteger or nullSeconds from the visitor's first message to the last message. Empty when the exact message times aren't available.
timestamps_estimatedbooleantrue when the exact message times of this conversation aren't available. The messages are still in the right order (seq).

Where It Started​

FieldTypeMeaning
sitestring or nullThe website the conversation started on, for example www.example-travel.com.
entry_modestring or nullHow the chat was shown when the visitor sent the first message: popover, full-page or search.
entry_page_urlstring or nullThe page the visitor was on when they sent the first message. Missing for some conversations.

What Maya Made of It​

FieldTypeMeaning
chat_titlestring or nullA short title Maya writes once the conversation has gone quiet.
outcomestring or nullHow the conversation ended. See Values.
sentimentstring or nullpositive, neutral or negative.
topicslist of stringsTopics Maya assigned to the conversation.
countrieslist of stringsCountries the visitor mentioned or asked about.
placeslist of stringsRegions and cities the visitor mentioned or asked about.
knowledge_gapbooleanThe visitor asked at least one question Maya couldn't answer from your content.
flagged_inappropriatebooleanAt least one visitor message was flagged as inappropriate.
left_contact_detailsbooleanThe visitor left an email address in the chat. The details themselves are only in the message text.

Activity​

FieldTypeMeaning
user_messagesintegerMessages the visitor typed.
quick_reply_messagesintegerSuggested replies the visitor clicked.
assistant_answersintegerAnswers Maya gave.
recommendation_blocksintegerAnswers that came with recommendation cards. The cards themselves are not part of the API yet.

Trip Details​

Filled in when the visitor mentioned them.

FieldTypeMeaning
adultsinteger or nullNumber of adults travelling.
childreninteger or nullNumber of children travelling.
babiesinteger or nullNumber of babies travelling.
travel_grouplist of stringsWho is travelling, as Maya understood it from the conversation.
departure_monthinteger or nullMonth of departure, from 1 to 12.
duration_nightsinteger or nullLength of the trip in nights.
themeslist of stringsHoliday themes the visitor was interested in, when your Maya setup recognises them.

Messages​

FieldTypeMeaning
messageslist of messagesEvery message in the conversation, in order. See Message.

Message​

One entry per message, from the visitor, Maya or one of your colleagues. The fixed greeting every chat opens with is left out.

FieldTypeMeaning
seqintegerPosition in the conversation, starting at 1. Always the right order.
created_at_utctimestampWhen the message was sent.
timestamp_estimatedbooleantrue when the exact time of this message isn't available. seq still gives the right order.
senderstringuser, assistant or human_agent. See Values.
message_typestringWhat kind of message this is. See Values.
contentstringThe full text, exactly as typed or answered. It can contain personal data the visitor typed.
page_urlstring or nullThe page the visitor was on. Visitor messages only.
widget_modestring or nullpopover, full-page or search. Visitor messages only.
knowledge_gapbooleanMaya couldn't answer this from your content.
flagged_inappropriatebooleanThis message was flagged as inappropriate.

Values​

Fields with a fixed set of values. New values can be added within v1, so treat a value you don't know as "other" instead of failing.

outcome​

ValueMeaning
resolved_by_aiMaya answered the visitor's question.
not_in_offeringMaya correctly told the visitor this isn't something you offer.
handed_to_colleagueThe conversation was handed over to one of your colleagues.
ai_could_not_helpMaya couldn't answer the question.
just_browsingThe visitor was looking around without a real question.

message_type​

ValueMeaning
typedThe visitor typed a message.
quick_replyThe visitor clicked a suggested reply.
ctaThe visitor clicked a call-to-action button, such as leaving their details.
answerAn answer from Maya.
human_answerA reply from one of your colleagues after a handover.
idle_messageA short follow-up Maya sent when the visitor went quiet.
thumbs_down_followupThe question Maya asks after a thumbs down.
inappropriate_noticeThe notice shown after a message was flagged as inappropriate.
daily_limit_reachedThe notice shown when a visitor reached the daily message limit.

sender​

ValueMeaning
userThe visitor.
assistantMaya.
human_agentOne of your colleagues, after a handover.

entry_mode and widget_mode​

ValueMeaning
popoverThe chat window that opens from the chat button on a page.
full-pageThe chat shown as a full page.
searchThe conversation started from Maya's search bar.

Example Conversation​

Shortened, with made-up values.

{
"chat_uuid": "6f1c2d9e-8a41-4b7f-9c3e-2d5a7b0e4f18",
"ga_client_id": "1234567890.1759241708",
"created_at_utc": "2026-09-30T14:21:48Z",
"updated_at_utc": "2026-09-30T14:41:12Z",
"first_user_message_at_utc": "2026-09-30T14:22:05Z",
"last_message_at_utc": "2026-09-30T14:29:51Z",
"duration_seconds": 466,
"timestamps_estimated": false,
"site": "www.example-travel.com",
"entry_mode": "popover",
"entry_page_url": "https://www.example-travel.com/greece/crete",
"chat_title": "Family hotel on Crete in May",
"outcome": "resolved_by_ai",
"sentiment": "positive",
"topics": ["Family holidays", "Beach hotels"],
"countries": ["Greece"],
"places": ["Crete"],
"user_messages": 3,
"quick_reply_messages": 1,
"assistant_answers": 4,
"recommendation_blocks": 2,
"knowledge_gap": false,
"flagged_inappropriate": false,
"left_contact_details": false,
"adults": 2,
"children": 2,
"babies": null,
"travel_group": ["family"],
"departure_month": 5,
"duration_nights": 7,
"themes": ["beach"],
"messages": [
{ "seq": 1, "created_at_utc": "2026-09-30T14:22:05Z", "timestamp_estimated": false,
"sender": "user", "message_type": "typed",
"content": "Do you have family hotels on Crete with a kids' pool, in May?",
"page_url": "https://www.example-travel.com/greece/crete", "widget_mode": "popover",
"knowledge_gap": false, "flagged_inappropriate": false },
{ "seq": 2, "created_at_utc": "2026-09-30T14:22:11Z", "timestamp_estimated": false,
"sender": "assistant", "message_type": "answer",
"content": "Yes! Here are three family hotels on Crete with a separate kids' pool …",
"page_url": null, "widget_mode": null,
"knowledge_gap": false, "flagged_inappropriate": false }
]
}