Import conversation
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.
ApiKeyAuth conversation.importAuthorization<token>Scope: conversation.import
The type of conversation to import
application/json- body
genericChannelName*stringThe conversation channel. Currently supported values are 'email' and 'genericapimessaging'. See payload examples for each case.
requesterId*stringuuidrequesterConnectionStatus?stringvalues: [Connected, Disconnected]
direction*stringvalues: [Inbound, Outbound]
messages?array<|>createdAt*stringdate-timeassignment?externalId?stringclosing?Triggers the closing of the conversation
attributes?unknownA set of dynamic attributes that are specific to the conversation channel, but not limited to it. See channel specific examples for your use case.
The id of the imported conversation
application/json- 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"}'