Newer Version Available

This content describes an older version of this product. View Latest

Create Transcript

Creates a transcript during a call. Transcripts can be saved to a conversation. You can create transcripts using this API only for an ongoing call. If the call has ended, you can no longer create transcripts.

This endpoint is available in API version 49.0 and later.

URI
/telephony/v1/voiceCalls/{voiceCallId}/messages

voiceCallId : The unique identifier used to create the initial VoiceCall. This value corresponds to the vendorCallKey field on VoiceCall. In a transfer use case when there are multiple VoiceCall objects associated to a single call, use the vendorCallKey of the first VoiceCall created for the call. This value can only be the unique call identifier of the first contact for the conversation. This value cannot be a Salesforce voiceCallId.

Formats
JSON, XML
HTTP Methods
POST
Authentication
Authorization: Bearer token
Parameters
Property Name Type Description Required
participantId string

The value of the participant who uttered this text. This value must be a valid participant in the conversation and must correspond to the ParticipantKey of the participant created for the conversation. For the END_USER senderType, use the phone number of the caller. For HUMAN_AGENT, use the agent username. For VIRTUAL_AGENT, use the initialContactId of the call. This value is the same value used to create the first VoiceCall for the conversation.

Yes
messageId string The unique identifier for the message. This value has to be unique for the given conversation. Yes
startTime int64 The time when this particular utterance was uttered. Yes
endTime int64 The time when this particular utterance was ended. Yes
content string Actual text of the utterance. Yes
senderType string Valid values are:
  • END_USER—Customer
  • HUMAN_AGENT—Agent
  • VIRTUAL_AGENT—This value can be used when you have a conference between multiple agents and you want to create all agent-side utterances as one single agent since you have no way to distinguish between the different agents in the audio stream. The sender in this case must be the vendorCallKey of the first VoiceCall created for the conversation.
Yes
Example
Request:
1POST telephony/v1/voiceCalls/0LQRM0000006CSz/messages
2
3{
4  "participantId": "5324881f-1e84-4367-8930-f69a74b30ca6",
5  "messageId": "57904eb6-5352-4c5e-adf6-5f100572cf5d116",
6  "startTime": 1573503300,
7  "endTime": 1573503320,
8  "content": "Hello All",
9  "senderType": "VIRTUAL_AGENT"
10}
Response:
1{
2  "result": "Accepted"
3}