messages

Message List

List your organization's messages

get/messages/

Request

  • Base URL: https://api.mainstay.com
  • URL: https://api.mainstay.com/messages/
  • Auth: API key in header Authorization

Query parameters

sincestring

Return all messages created since this date.<br />Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

beforestring

Return all messages created before this date.<br />Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ

admithub_contact_idstring

Return all messages associated with a specific contact by their AdmitHub ID<br />Can be found in the URL when viewing a contact or a contact's conversations in Mascot<br />https://mascot.admithub.com/contacts/admithub-contact-id OR https://mascot.admithub.com/conversations/admithub-contact-id

admithub_idstring

Filter messages based on the AdmitHub ID of the message<br />Find individual <code>admithub_id</code>s in API response from /messages/

contact_crm_idstring

Filter messages based on the CRM ID of the contact associated with the message

test_userstring

Filter messages based on the <code>test_user</code> status of the sender.<br />Must set <code>include_test_user=true</code> with this filter to include test users.

include_test_userstring

If <u>true</u>, include messages from test contacts. Otherwise, these messages are excluded from results.<ul><li>Possible true values: True, true, 1</li><li>Possible false values: False, false, 0</li><li>Default value: False</li><ul>

pageinteger

A page number within the paginated result set.

Response

OK

admithub_idstring required

AdmitHub message ID

admithub_contact_idstring required

Associated AdmitHub contact ID

incomingboolean required

<code>true</code> if message incoming to AdmitHub; <code>false</code> if outgoing from AdmitHub

createdstring date-time required

Message created date (UTC)

campaign_idstring required

ID of message's associated campaign, if applicable

campaign_namestring required

Name of message's associated campaign, if applicable

script_idstring required

ID of message's associated script, if applicable

script_namestring required

Name of message's associated script, if applicable

bodystring required

Message body

contact_crm_idstring required

CRM ID of associated contact

contact_first_namestring required

First name of associated contact

contact_last_namestring required

Last name of associated contact

channelstring required

Channel of communication: web, twilio, facebook, or unknown

outgoing_source'AI' | 'Live Chat' | 'Campaign Script' | 'Other' nullable required

Source of outgoing message: Bot via AI, Human via Live Chat, or Script via Campaign. Other if response from global dialog or intro message.Incoming messages will have no value for this field.

live_chat_user_emailstring nullable required

For messages with <code>outgoing_source</code> Live Chat, email of Mainstay platform user who sent message. <code>null</code> for messages from AI, Campaign Script, other outgoing sources.

understanding_topicstring nullable required

If set, the topic string associated with this understanding

Changes

No recorded changes to this operation across all 1 revision of this API.