Messages

Add message

Add a message to 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.
Supported channels are Chat, Messenger, Contact Form, Email, Sms(outbound only).

SecurityApiKeyAuth
Request
path Parameters
conversationId
required
integer <int64>
Request Body schema: application/json
required

The message to be added to a conversation

One of:

For Sms only Outbound messages are supported.

Array of objects (File)
required
Html (object) or Text (object) (Content)
externalId
string

Client generated identifier for external reference

integrationEmail
string

Internal email address registered for the integration with format: <email-address>@email.dixa.io

Responses
200

The added message

400

Invalid value for: path parameter conversationId, Invalid value extracted from request context, Invalid value for: body, Invalid input for Message, Failure to download attachment, Duplicate externalId, Unsupported ConversationChannel

404

An entity in this request could not be found

500

Internal failure during request processing

post/v1/conversations/{conversationId}/messages
Request samples
application/json
{
  • "content": {
    • "value": "I need some help!",
    • "_type": "Html"
    },
  • "attachments": [],
  • "_type": "Inbound"
}
Response samples
application/json
{
  • "data": {
    • "content": {
      • "value": "An amazing message",
      • "_type": "Html"
      },
    • "direction": "Outbound",
    • "authorId": "bac5a02c-15b3-44da-ae1e-ab7b9db4aa89",
    • "messageId": "87bac308-e49f-4134-84cc-96b868f1e1e4",
    • "createdAt": "2021-06-09T08:18:37.284Z"
    }
}

Anonymize message

Request the anonymization of a single message in a conversation.

SecurityApiKeyAuth
Request
path Parameters
conversationId
required
integer <int64>

the id of the conversation in which the message belongs

messageId
required
string <uuid>

the id of the message to anonymize

Responses
202

The message's anonymization request status

400

Invalid value for: path parameter conversationId, Invalid value for: path parameter messageId, Invalid value extracted from request context

404
409
500
patch/v1/conversations/{conversationId}/messages/{messageId}/anonymize
Request samples
curl -i -X PATCH \
  'https://dev.dixa.io/v1/conversations/{conversationId}/messages/{messageId}/anonymize' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "data": {
    • "id": "b165fdaa-51d6-44b0-bfcd-5f431d623fa7",
    • "entityType": "MessageAnonymizationType",
    • "_type": "Message",
    • "initiatedAt": "2021-12-01T12:46:36.581Z[GMT]",
    • "targetEntityId": "10749_1b9adc49-62f7-4056-a9c0-c18c1f25afdb",
    • "requestedBy": "4c7af391-b7fd-4560-9d82-b3464eef8776"
    }
}

List messages

Get all messages for a particular conversation by providing the conversation id. Note that messages in ContactForm conversations can have attributes of "_type": "EmailAttributes" if they are created through a webform, or "_type": "ContactFormAttributes" when created through a chat widget.

SecurityApiKeyAuth
Request
path Parameters
conversationId
required
integer <int64>
Responses
200

List of messages for a conversation sorted from oldest to newest

400

Invalid value for: path parameter conversationId, Invalid value extracted from request context

404

An entity in this request could not be found

get/v1/conversations/{conversationId}/messages
Request samples
curl -i -X GET \
  'https://dev.dixa.io/v1/conversations/{conversationId}/messages' \
  -H 'Authorization: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "data": [
    • {
      • "id": "11b95893-0514-4606-a5d8-1880172b3a55",
      • "authorId": "41646d42-edc0-493e-ac7b-814d9ff40a2e",
      • "externalId": "13244",
      • "createdAt": "2021-12-01T12:46:36.581Z[GMT]",
      • "attributes": {}
      }
    ]
}