Save Messages
POST https://{{axpAPIDomain}}/api/digital/transcript/command/v1/accounts/:accountId/engagements/:engagementId/dialogs/:dialogId/transcripts
Save transcript of a dialog that captures messages exchanged between different participants. Currently, only plain text messages are supported. Messages are saved in the order they are present in the request. If a message could not be saved, subsequent messages in the request will be discarded. In this case the 'status' in the response is set to PARTIALSUCCESS along with list of messages that were saved successfully. If all messages were saved successfully then 'status' in the response is set to COMPLETESUCCESS.
Request Body
{"channelId"=>"MESSAGING", "messages"=>[{"body"=>{"elementText"=>{"text"=>"I want to order some coffee"}}, "messageTimestamp"=>"2024-04-11T18:21:44.408Z", "senderParticipantId"=>"05570159", "senderParticipantType"=>"CUSTOMER"}, {"body"=>{"elementText"=>{"text"=>"That sounds like a great choice! What type of coffee are you interested in? We have a variety of options like espresso, cappuccino, latte, or maybe something else?"}}, "messageTimestamp"=>"2024-04-11T18:21:45.408Z", "senderParticipantId"=>"8252111c-4798-4fbf-bef7-44ddc671b2b0", "senderParticipantType"=>"BOT"}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string | ||
appkey | string |
RESPONSES
status: OK
{"status":"PARTIAL_SUCCESS","accountId":"ABCDEF","engagementId":"830ef0ed-3557-41d6-a0bb-60e27db9a8d5","dialogId":"09989172961713382496","savedMessages":[{"messageId":"e1e3d642-4200-4c1f-b010-b8ac46957ebd","providerMessageId":"bafba69d-5220-4cb8-9f02-82fe4f57f825","senderParticipantId":"05570159","senderParticipantType":"CUSTOMER","messageTimestamp":"2024-04-11T18:21:44.408Z"}]}