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).
The message to be added to a conversation
For Sms only Outbound messages are supported.
The added message
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
An entity in this request could not be found
Internal failure during request processing
{- "content": {
- "value": "I need some help!",
- "_type": "Html"
}, - "_type": "Inbound"
}
{- "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"
}
}
Request the anonymization of a single message in a conversation.
The message's anonymization request status
Invalid value for: path parameter conversationId, Invalid value for: path parameter messageId, Invalid value extracted from request context
curl -i -X PATCH \ 'https://dev.dixa.io/v1/conversations/{conversationId}/messages/{messageId}/anonymize' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "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"
}
}
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.
List of messages for a conversation sorted from oldest to newest
Invalid value for: path parameter conversationId, Invalid value extracted from request context
An entity in this request could not be found
curl -i -X GET \ 'https://dev.dixa.io/v1/conversations/{conversationId}/messages' \ -H 'Authorization: YOUR_API_KEY_HERE'
{- "data": [
- {
- "id": "11b95893-0514-4606-a5d8-1880172b3a55",
- "authorId": "41646d42-edc0-493e-ac7b-814d9ff40a2e",
- "externalId": "13244",
- "createdAt": "2021-12-01T12:46:36.581Z[GMT]",
- "attributes": {
- "emailContent": {
- "content": {
- "value": "Hello",
- "_type": "Text"
}, - "_type": "Regular"
}, - "from": {
- "email": "some-help@email.dixa.io",
- "name": "Help"
}, - "to": [
- {
- "email": "someone@somecompany.com",
- "name": "Some One"
}
], - "cc": [ ],
- "bcc": [ ],
- "isAutoReply": false,
- "inlineImages": [ ],
- "attachments": [
], - "direction": "Outbound",
- "originalContentUrl": {
}, - "_type": "EmailAttributes"
}
}
]
}