The message to be added to a conversation
- Create conversation
Dixa API (beta)
Request
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.
If attachments are added to the message, they will be copied and stored in Dixa.
Supported channels are Chat, Messenger, Contact Form, Email, Sms (outbound only), Whatsapp (outbound and Markdown only).
Supported Markdown syntax for Markdown content: bold **text**, italic *text*, bold & italic ***text***, strikethrough ~text~, blockquote > Quoted text. \n Message about quoted text, ordered list List:\n1. Item\n2. Item\n3. Item, unordered list List:\n* Item\n* Item\n* Item, inline code This is `code`.
Whatsapp channel:
Only one attachment is allowed per WhatsApp message.
Supports the following file types for attachments: .jpg, .jpeg, .png, .pdf, .doc, .docx, .pptx, .xlsx
Only Outbound messages are supported for Sms and Whatsapp.
Internal email address registered for the integration with format: <email-address>@email.dixa.io
- Mock serverhttps://docs.dixa.io/_mock/openapi/dixa-api/beta/beta/conversations/{conversationId}/messages
- https://dev.dixa.io/beta/conversations/{conversationId}/messages
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://docs.dixa.io/_mock/openapi/dixa-api/beta/beta/conversations/{conversationId}/messages' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"content": {
"value": "I need some help!",
"_type": "Html"
},
"attachments": [
{
"url": "http://attachment.url",
"prettyName": "Filename"
}
],
"_type": "Inbound"
}'{ "data": { "content": { … }, "direction": "Outbound", "authorId": "bac5a02c-15b3-44da-ae1e-ab7b9db4aa89", "messageId": "87bac308-e49f-4134-84cc-96b868f1e1e4", "createdAt": "2021-06-09T08:18:37.284Z" } }
- Mock serverhttps://docs.dixa.io/_mock/openapi/dixa-api/beta/beta/conversations
- https://dev.dixa.io/beta/conversations
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.dixa.io/_mock/openapi/dixa-api/beta/beta/conversations \
-H 'Authorization: YOUR_API_KEY_HERE' \
-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 } }
Request
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.
The type of conversation to import
- Mock serverhttps://docs.dixa.io/_mock/openapi/dixa-api/beta/beta/conversations/import
- https://dev.dixa.io/beta/conversations/import
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.dixa.io/_mock/openapi/dixa-api/beta/beta/conversations/import \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"genericChannelName": "MyCustomChat",
"requesterId": "9c2a2cce-699f-4a72-89d9-fda5bc8dec8b",
"requesterConnectionStatus": "Connected",
"direction": "Inbound",
"messages": [
{
"content": {
"value": "My order hasn'\''t shipped",
"_type": "Text"
},
"attachments": [],
"createdAt": "2021-12-01T13:00:00.003Z",
"_type": "InboundImport"
},
{
"content": {
"value": "Our bad, sorry",
"_type": "Text"
},
"agentId": "cd4ceb58-bb3a-443c-9cd8-4f088feafe5b",
"attachments": [
{
"url": "https://en.wikipedia.org/wiki/Shipwreck#/media/File:Titanic_wreck_bow.jpg",
"prettyName": "shipwreck"
}
],
"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"
},
"closing": {
"closedAt": "2021-12-01T15:00:00.005Z",
"closedBy": "cd4ceb58-bb3a-443c-9cd8-4f088feafe5b"
},
"_type": "GenericConversationImport"
}'{ "data": { "id": 100, "partialErrors": [ … ] } }