Chatbots

Create end user

POST
/v1/endusers

Create an end user.

Authorization

ApiKeyAuth organization.member
headerAuthorization<token>

Scope: organization.member

Request Body

The end user's details

application/json
  1. body
displayName?string

The contact's display name

email?string

The contact's primary email address

phoneNumber?string

The contact's primary phone number

additionalEmails?array<string>

Additional email addresses for the contact

additionalPhoneNumbers?array<string>

Additional phone numbers for the contact

firstName?string

The contact's first name

lastName?string

The contact's last name

middleNames?array<string>

The contact's middle names

avatarUrl?string

The url from which to load the contact's avatar

externalId?string

Custom external identifier for the contact

Response Body

The created end user

application/json
  1. response
data*
Example Request
curl -X POST 'https://dev.dixa.io/v1/endusers' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "displayName": "Alice Brown",  "email": "alice@brown.com",  "phoneNumber": "+551155256325",  "additionalEmails": [    "alice@secondary.email"  ],  "additionalPhoneNumbers": [    "+5566778899"  ],  "firstName": "Alice",  "lastName": "Brown",  "middleNames": [],  "avatarUrl": "http://avatar.url",  "externalId": "#12345678"}'
{
"data": {
"id": "434ce9f5-14c8-4be1-a0a8-f755010deb9b",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Alice Brown",
"email": "alice@brown.com",
"phoneNumber": "+551155256325",
"additionalEmails": [
"alice@secondary.email"
],
"additionalPhoneNumbers": [
"+5566778899"
],
"firstName": "Alice",
"lastName": "Brown",
"middleNames": [],
"avatarUrl": "https://files.dixa.io/public/image_id",
"externalId": "#12345678",
"customAttributes": [
{
"id": "4baa78bc-4815-4122-9c99-f71cd742d37b",
"name": "My Attribute",
"identifier": "my_attribute",
"value": "My Attribute Value"
}
]
}
}

Get end user

GET
/v1/endusers/{userId}

Get an end user by id.

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

userId*string

The end user id

Formatuuid

Response Body

The end user

application/json
  1. response
data*
Example Request
curl -X GET 'https://dev.dixa.io/v1/endusers/{userId}' \  -H 'Authorization: <API token>'
{
"data": {
"id": "434ce9f5-14c8-4be1-a0a8-f755010deb9b",
"createdAt": "2020-12-16T09:41:43Z",
"displayName": "Alice Brown",
"email": "alice@brown.com",
"phoneNumber": "+551155256325",
"additionalEmails": [
"alice@secondary.email"
],
"additionalPhoneNumbers": [
"+5566778899"
],
"firstName": "Alice",
"lastName": "Brown",
"middleNames": [],
"avatarUrl": "https://files.dixa.io/public/image_id",
"externalId": "#12345678",
"customAttributes": [
{
"id": "4baa78bc-4815-4122-9c99-f71cd742d37b",
"name": "My Attribute",
"identifier": "my_attribute",
"value": "My Attribute Value"
}
]
}
}
GET
/v1/endusers/{userId}/conversations

Lists conversations requested by an end user.
Note: Custom attributes are not part of the response at this point. If you need to get custom attributes for a conversation use the GET /conversations/{conversationId} endpoint

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

userId*string
Formatuuid

Query Parameters

pageLimit?integer

Maximum number of results per page. May be used in combination with pageKey to change the number of results in between page requests.

Formatint32
pageKey?string

Base64 encoded form of pagination query parameters. Do not try to construct or change programmatically as the internal structure may change without notice.

Response Body

The list of conversations requested by an EndUser

application/json
  1. response
data?array<||||||||||>
meta?
Example Request
curl -X GET 'https://dev.dixa.io/v1/endusers/{userId}/conversations' \  -H 'Authorization: <API token>'
{
"data": [
{
"id": 1,
"requesterId": "9deb936b-52e5-4c44-828d-4c8d48fe0c7e",
"channel": "WidgetChat",
"createdAt": "2020-12-16T09:41:43Z",
"direction": "Outbound",
"state": "Open",
"stateUpdatedAt": "2020-12-16T09:41:43Z",
"assignment": {
"agentId": "0e4d0ead-dc69-470a-9b3a-e7eb16a56453",
"assignedAt": "2020-12-16T11:00:34Z"
},
"queue": {
"id": "cd87b232-64c8-4ad5-b81a-6f9233352d97",
"queuedAt": "2020-12-16T10:40:40Z"
},
"browserInfo": {
"name": "Chrome 9",
"version": "91.0.4472.114",
"ipAddress": "127.0.0.1",
"originatingUrl": "http://localhost:3000/"
},
"language": "en",
"link": {
"parentId": 1234,
"_type": "SideConversation"
},
"_type": "ChatConversation"
}
]
}

Close conversation

PUT
/v1/conversations/{conversationId}/close

Mark a conversation as closed by providing its id.

Authorization

ApiKeyAuth conversation.reply
headerAuthorization<token>

Scope: conversation.reply

Path Parameters

conversationId*integer
Formatint64

Request Body

An optional agent/admin to close the conversation

application/json
  1. body
userId?string
Formatuuid

Response Body

The conversation was successfully closed

Example Request
curl -X PUT 'https://dev.dixa.io/v1/conversations/{conversationId}/close' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "userId": "5a556159-9c21-4f3e-a44f-d323deb80d16"}'

Empty

Followup conversation

PUT
/v1/conversations/{conversationId}/followup

Follow up a conversation by providing its id and expiration timestamp.

Authorization

ApiKeyAuth conversation.reply
headerAuthorization<token>

Scope: conversation.reply

Path Parameters

conversationId*integer
Formatint64

Request Body

A request to followup the conversation

application/json
  1. body
timestamp*string

A timestamp for when the followup should expire

Formatdate-time
userId?string

An optional agent/admin to followup the conversation

Formatuuid

Response Body

The conversation was successfully followed up

Example Request
curl -X PUT 'https://dev.dixa.io/v1/conversations/{conversationId}/followup' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "timestamp": "2025-01-08T08:31:25Z",  "userId": "5a556159-9c21-4f3e-a44f-d323deb80d16"}'

Empty

Transfer conversation

PUT
/v1/conversations/{conversationId}/transfer/queue

Transfer a conversation to a target queue.

Authorization

ApiKeyAuth conversation.reply
headerAuthorization<token>

Scope: conversation.reply

Path Parameters

conversationId*integer
Formatint64

Request Body

Transfer conversation request

application/json
  1. body
queueId*string

The target queue for the conversation transfer

Formatuuid
userId?string

An optional agent/admin to originate the transfer of the conversation

Formatuuid

Response Body

The conversation was successfully transferred to the target queue

Example Request
curl -X PUT 'https://dev.dixa.io/v1/conversations/{conversationId}/transfer/queue' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "queueId": "92f8d193-b26f-4a62-86a3-bb03ee0915e9",  "userId": "a53b25da-f676-4c52-acac-58c9280aa23d"}'

Empty

POST
/v1/conversations/{conversationId}/ratings/{ratingId}/submit

Create a rating result for a specific conversation.

Authorization

ApiKeyAuth conversation.satisfaction
headerAuthorization<token>

Scope: conversation.satisfaction

Path Parameters

conversationId*integer
Formatint64
ratingId*string

The ratingId parameter has to be the ID of the offer created via invoking the /conversations/{conversationId}/ratings/offer endpoint.

Request Body

The rating result to be created for a conversation

application/json
  1. body
userId?stringDeprecated

The userId property is no longer used so it's made optional to keep backwards compatibility. A null value can be provided instead of an actual ID.

ratingResult*||
comment?string
submittedAt?string
Formatdate-time

Response Body

The created conversation rating result

application/json
  1. response
data*
Example Request
curl -X POST 'https://dev.dixa.io/v1/conversations/{conversationId}/ratings/{ratingId}/submit' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "userId": "d3cf6f15-1497-4e71-92f2-9b3b228352bd",  "ratingResult": {    "value": 4,    "_type": "Csat"  },  "comment": "Best customer service ever!",  "submittedAt": "2024-03-11T16:39:30Z"}'
{
"data": {
"ratingId": "33cf4e5e-9ce9-461c-b668-be9b712b717c",
"userId": "4c5f7efa-0822-4b75-bdf5-907fa7336e0c",
"ratingResult": {
"value": 5,
"_type": "Csat"
},
"comment": "Excellent customer service!",
"submittedAt": "2024-03-11T16:39:30Z"
}
}
POST
/v1/conversations/{conversationId}/ratings/offer

Create a rating offer for a specific conversation.

Authorization

ApiKeyAuth conversation.satisfaction
headerAuthorization<token>

Scope: conversation.satisfaction

Path Parameters

conversationId*integer
Formatint64

Request Body

The rating offer to be created for a conversation

application/json
  1. body
userId*string
agentId*string

Please note that providing agentId that is not part of the conversation may skew metrics in Intelligence

ratingType*string

The type of numeric rating. E.g.: 'Csat', 'ThumbsUpOrDown', 'Nps'.

offeredAt?string
Formatdate-time

Response Body

The created conversation rating offer

application/json
  1. response
data*
Example Request
curl -X POST 'https://dev.dixa.io/v1/conversations/{conversationId}/ratings/offer' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "userId": "b0323b42-c428-4afa-970e-20bf5bdeeec4",  "agentId": "eeb3bbe5-0355-4ac1-8af5-20d42a3db24b",  "ratingType": "Csat",  "offeredAt": "2024-03-11T16:39:30Z"}'
{
"data": {
"id": "2f0122db-0824-44d7-b39a-e1f722b8c38c",
"userId": "7a65c963-b3ca-4bd4-996e-bdbcaa620219",
"agentId": "db7f0b41-b779-4726-a673-07b2a59a550d",
"ratingType": "Csat",
"offeredAt": "2024-03-11T16:39:30Z"
}
}

Create conversation

POST
/v1/conversations

Create a conversation. For inbound messages the author is assumed to be the requester of the conversation (end user). For outbound messages the author is specified using the agentId field.

Authorization

ApiKeyAuth conversation.reply
headerAuthorization<token>

Scope: conversation.reply

Request Body

The conversation to create

application/json
  1. body
requesterId*string
Formatuuid
direction*string

values: [Inbound, Outbound]

contactEndpointId*string
queueId*string
Formatuuid

Response Body

The id of the created conversation

application/json
  1. response
data*
Example Request
curl -X POST 'https://dev.dixa.io/v1/conversations' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "requesterId": "9c2a2cce-699f-4a72-89d9-fda5bc8dec8b",  "emailIntegrationId": "my-integration@email.dixa.io",  "subject": "order #123",  "message": {    "content": {      "value": "My order hasn'\''t shipped",      "_type": "Text"    },    "attachments": [],    "_type": "Inbound"  },  "language": "en",  "_type": "Email"}'
{
"data": {
"id": 100
}
}

Import conversation

POST
/v1/conversations/import

Import a previously created conversation into Dixa. For inbound messages the author is assumed to be the requester of the conversation (end user), unless the specific channel supports overriding the message author through its attributes. For outbound messages the author is specified using the agentId field.

Authorization

ApiKeyAuth conversation.import
headerAuthorization<token>

Scope: conversation.import

Request Body

The type of conversation to import

application/json
  1. body
genericChannelName*string

The conversation channel. Currently supported values are 'email' and 'genericapimessaging'. See payload examples for each case.

requesterId*string
Formatuuid
requesterConnectionStatus?string

values: [Connected, Disconnected]

direction*string

values: [Inbound, Outbound]

messages?array<|>
createdAt*string
Formatdate-time
assignment?
externalId?string
closing?

Triggers the closing of the conversation

attributes?unknown

A set of dynamic attributes that are specific to the conversation channel, but not limited to it. See channel specific examples for your use case.

Response Body

The id of the imported conversation

application/json
  1. response
data*
curl -X POST 'https://dev.dixa.io/v1/conversations/import' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "genericChannelName": "genericapimessaging",  "requesterId": "9c2a2cce-699f-4a72-89d9-fda5bc8dec8b",  "requesterConnectionStatus": "Connected",  "direction": "Inbound",  "messages": [    {      "content": {        "value": "Hi, I need help with my order",        "_type": "Text"      },      "attachments": [],      "createdAt": "2021-12-01T13:00:00.003Z",      "_type": "InboundImport"    },    {      "content": {        "value": "Sure — what seems to be the problem?",        "_type": "Text"      },      "agentId": "cd4ceb58-bb3a-443c-9cd8-4f088feafe5b",      "attachments": [],      "createdAt": "2021-12-01T14:00:00.004Z",      "_type": "OutboundImport"    }  ],  "createdAt": "2021-12-01T11:00:00.001Z",  "assignment": {    "agentId": "cd4ceb58-bb3a-443c-9cd8-4f088feafe5b",    "assignedAt": "2021-12-01T12:00:00.002Z"  },  "_type": "GenericConversationImport"}'
{
"data": {
"id": 100,
"partialErrors": [
{
"message": "The conversation could not be assigned"
},
{
"message": "Invalid attachment url in message. externalId: 42"
}
]
}
}

Claim conversation

PUT
/v1/conversations/{conversationId}/claim

Claim a conversation for a given agent. To avoid taking over assigned conversations, set the force paremeter to false

Authorization

ApiKeyAuth conversation.claim
headerAuthorization<token>

Scope: conversation.claim

Path Parameters

conversationId*integer
Formatint64

Request Body

application/json
  1. body
agentId*string

The id of the agent who is claiming the conversation

Formatuuid
force?boolean

Set as false to avoid taking over the conversation if it is already assigned to an agent

Response Body

The conversation was successfully claimed

Example Request
curl -X PUT 'https://dev.dixa.io/v1/conversations/{conversationId}/claim' \  -H 'Authorization: <API token>' \  -H 'Content-Type: application/json' \  -d '{  "agentId": "5a556159-9c21-4f3e-a44f-d323deb80d16",  "force": false}'

Empty

Get queue availability

GET
/v1/queues/{queueId}/availability

Get availability of supported channels for a given queue. Currently supported channels are adachat, kindlychat, digitalgeniuschat, genericapimessaging.

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

queueId*string
Formatuuid

Response Body

The availability of supported channels for a given queue

application/json
  1. response
data?array<|>
Example Request
curl -X GET 'https://dev.dixa.io/v1/queues/{queueId}/availability' \  -H 'Authorization: <API token>'
{
"data": [
{
"channelAvailability": {
"genericChannelName": "adachat",
"availability": "NotAvailable",
"queueSize": 10,
"_type": "GenericChannel"
},
"_type": "Success"
},
{
"error": {
"channel": "kindlychat",
"message": "Could not get availability for channel",
"_type": "UnexpectedError"
},
"_type": "Failure"
}
]
}
GET
/v1/queues/conversation-position/{csid}

Get the approximate position of a given conversation in its current queue.

Authorization

ApiKeyAuth
headerAuthorization<token>

Path Parameters

csid*integer
Formatint64

Response Body

The position of the conversation in the queue

application/json
  1. response
data*
Example Request
curl -X GET 'https://dev.dixa.io/v1/queues/conversation-position/{csid}' \  -H 'Authorization: <API token>'
{
"data": {
"position": 10,
"queuedAt": "2021-12-01T13:00:00.003Z"
}
}