Integrations API

Message

GET
/v1/conversations/{csid}/messages

Authorization

headerAuthorization<token>

Path Parameters

csid*integer

Response Body

A list of messages

application/json
  1. response
data*array<>
curl -X GET 'https://example.com/v1/conversations/{csid}/messages' \  -H 'Authorization: <API token>'
{
"data": [
{
"id": "string",
"created_at": "2015-11-30T00:00:00:000Z",
"author_id": "string",
"channel": "widget_chat",
"direction": "widget_chat",
"attributes": {
"text": "string",
"to_emails": "string",
"cc_email": "string",
"from_email": "string",
"inline_images": "string",
"attachments": "string",
"direction": "string",
"a_phone_number": "string",
"b_phone_number": "string",
"is_automated_message": "string",
"is_auto_reply": "string"
}
}
]
}
POST
/v1/conversations/{csid}/messages/historical

Authorization

headerAuthorization<token>

Path Parameters

csid*integer

Request Body

The message to insert.

application/json
  1. body

Input object for creating historical messages. Required attributes depends on the channel chosen.

channel?Channel

The channel a conversation can be conducted on.

Value in"widget_chat""phone""voice_mail""email""contact_form""callback""facebook_messenger"
direction?Direction

The direction a conversation can be

Value in"outbound""inbound""internal"
from_email?EmailString

A regular email.

to_email?EmailString

A regular email.

text?string
author_id?StringId
attachments?array<>

A list of attachments.

Response Body

The message was createde

application/json
  1. response
data*
curl -X POST 'https://example.com/v1/conversations/{csid}/messages/historical' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{}'
{
"data": {
"id": "string",
"created_at": "2015-11-30T00:00:00:000Z",
"author_id": "string",
"channel": "widget_chat",
"direction": "widget_chat",
"attributes": {
"text": "string",
"to_emails": "string",
"cc_email": "string",
"from_email": "string",
"inline_images": "string",
"attachments": "string",
"direction": "string",
"a_phone_number": "string",
"b_phone_number": "string",
"is_automated_message": "string",
"is_auto_reply": "string"
}
}
}