Integrations API

Conversations

Create a conversation

Deprecated
POST
/v1/conversations

Authorization

headerAuthorization<token>

Request Body

The conversation to create. Only callback and contact form conversations are currently supported.

application/json
  1. body

Response Body

The conversation was created

application/json
  1. response
data*
curl -X POST 'https://example.com/v1/conversations' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "channel": "widget_chat",  "direction": "outbound",  "queue_id": "string",  "requester_id": "string",  "endpoint_id": null}'
{
"data": {
"id": 0,
"created_at": "2015-11-30T00:00:00:000Z",
"requester_id": "string",
"channel": "widget_chat",
"direction": "outbound",
"queued_at": "2015-11-30T00:00:00:000Z",
"queue_id": "string",
"status": "open",
"status_updated_at": "2015-11-30T00:00:00:000Z",
"attributes": {},
"assigned_to": "string",
"assigned_at": "2015-11-30T00:00:00:000Z"
}
}

Get a single conversation by csid

Deprecated
GET
/v1/conversations/{csid}

Authorization

headerAuthorization<token>

Path Parameters

csid*integer

Response Body

A single conversation

application/json
  1. response
data*
curl -X GET 'https://example.com/v1/conversations/{csid}' \  -H 'Authorization: <API token>'
{
"data": {
"id": 0,
"created_at": "2015-11-30T00:00:00:000Z",
"requester_id": "string",
"channel": "widget_chat",
"direction": "outbound",
"queued_at": "2015-11-30T00:00:00:000Z",
"queue_id": "string",
"status": "open",
"status_updated_at": "2015-11-30T00:00:00:000Z",
"attributes": {},
"assigned_to": "string",
"assigned_at": "2015-11-30T00:00:00:000Z"
}
}
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"
}
}
}
GET
/v1/conversations/{csid}/notes

Authorization

headerAuthorization<token>

Path Parameters

csid*integer

Response Body

A list of internal notes

application/json
  1. response
data*array<>
curl -X GET 'https://example.com/v1/conversations/{csid}/notes' \  -H 'Authorization: <API token>'
{
"data": [
{
"id": "string",
"created_at": "2015-11-30T00:00:00:000Z",
"requester_id": "string",
"text": "string"
}
]
}
GET
/v1/conversations/{csid}/activitylog

Authorization

headerAuthorization<token>

Path Parameters

csid*integer

Response Body

A list of activitylog events

application/json
  1. response
data*array<>
curl -X GET 'https://example.com/v1/conversations/{csid}/activitylog' \  -H 'Authorization: <API token>'
{
"data": [
{
"id": "string",
"conversation_id": 0,
"activity_timestmap": "2015-11-30T00:00:00:000Z",
"activity_type": "tag_added",
"author": {
"id": "string",
"name": "string",
"email": "string",
"phone_number": "string"
},
"attributes": {
"tag_name": "string"
}
}
]
}

Get a list of activitylog events

Deprecated
GET
/v1/conversations/activitylog

Authorization

headerAuthorization<token>

Query Parameters

csids?array<>

a list of conversation ids associated with events

Response Body

A list of activitylog events

application/json
  1. response
data*array<>
paging?
curl -X GET 'https://example.com/v1/conversations/activitylog' \  -H 'Authorization: <API token>'
{
"data": [
{
"id": "string",
"conversation_id": 0,
"activity_timestmap": "2015-11-30T00:00:00:000Z",
"activity_type": "tag_added",
"author": {
"id": "string",
"name": "string",
"email": "string",
"phone_number": "string"
},
"attributes": {
"tag_name": "string"
}
}
],
"paging": {
"cursors": {
"after": "string",
"before": "string"
},
"next_page": "string",
"prev_page": "string"
}
}
POST
/v1/anonymization_request

Authorization

headerAuthorization<token>

Request Body

Entity info to schedule anonymization

body*CreateAnonymizationRequestInputapplication/json

Response Body

Scheduled anonymization

application/json
  1. response
data?ScheduleAnonymizationResponse
curl -X POST 'https://example.com/v1/anonymization_request' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "entity_id": "string",  "entity_type": "user"}'
{
"data": {
"id": "string",
"target_entity_id": "string",
"entity_type": "user",
"initiated_at": "string",
"requested_by": "string",
"processed_at": "string"
}
}
GET
/v1/anonymization_request/{requestId}

Authorization

headerAuthorization<token>

Path Parameters

requestId*string

Response Body

Anonymization request

application/json
  1. response
data?ScheduleAnonymizationResponse
curl -X GET 'https://example.com/v1/anonymization_request/{requestId}' \  -H 'Authorization: <API token>'
{
"data": {
"id": "string",
"target_entity_id": "string",
"entity_type": "user",
"initiated_at": "string",
"requested_by": "string",
"processed_at": "string"
}
}