curl -i -X POST \
'https://{api-domain}.cresta.com/v1/{parent=customers/*/profiles/*/conversations/*}/messages:batchUpsert' \
-H 'Content-Type: application/json' \
-d '{
"conversationMessages": [
{
"name": "string",
"text": "string",
"textHtml": "string",
"transcriptionInfo": {
"transcriptionWords": [
{
"word": "string",
"confidence": 0.1,
"startOffset": "string",
"endOffset": "string"
}
],
"languages": [
{
"languageCode": "string",
"confidence": 0.1
}
],
"transcribedLanguage": "string"
},
"agent": "string",
"speaker": "ROLE_UNSPECIFIED",
"speakerInfo": {
"displayName": "string",
"platformSpeakerId": "string"
},
"state": "STATE_UNSPECIFIED",
"sequencePosition": 0,
"createTime": "2019-08-24T14:15:22Z",
"originalEventData": {},
"usedSuggestionId": "string",
"usedCoachSuggestionId": "string",
"redaction": {
"ranges": [
{
"textStartOffset": 0,
"textEndOffset": 0,
"audioStartOffset": "string",
"audioEndOffset": "string",
"redactedText": "string"
}
],
"state": "STATE_UNSPECIFIED",
"maskedText": "string"
},
"botData": {
"legacyId": "string",
"legacyConversationMessageId": "string",
"version": "string",
"intentName": "string",
"isSelfServiced": true,
"isBounced": true,
"isTransfer": true,
"isBotMessage": true,
"isProactive": true,
"isAutomatedWidgetEvent": true,
"audioUri": "string"
},
"email": {
"subject": "string",
"body": "string",
"bodyFormat": "BODY_FORMAT_UNSPECIFIED",
"fromParticipant": {
"platformParticipantId": "string",
"emailAddress": "string",
"displayName": "string",
"speakerRole": "ROLE_UNSPECIFIED",
"occurrence": {
"emailFrom": true,
"emailTo": true,
"emailCc": true,
"emailBcc": true,
"agent": true
}
},
"toParticipants": [
{
"platformParticipantId": "string",
"emailAddress": "string",
"displayName": "string",
"speakerRole": "ROLE_UNSPECIFIED",
"occurrence": {
"emailFrom": true,
"emailTo": true,
"emailCc": true,
"emailBcc": true,
"agent": true
}
}
],
"ccParticipants": [
{
"platformParticipantId": "string",
"emailAddress": "string",
"displayName": "string",
"speakerRole": "ROLE_UNSPECIFIED",
"occurrence": {
"emailFrom": true,
"emailTo": true,
"emailCc": true,
"emailBcc": true,
"agent": true
}
}
],
"bccParticipants": [
{
"platformParticipantId": "string",
"emailAddress": "string",
"displayName": "string",
"speakerRole": "ROLE_UNSPECIFIED",
"occurrence": {
"emailFrom": true,
"emailTo": true,
"emailCc": true,
"emailBcc": true,
"agent": true
}
}
],
"replyTo": "string",
"attachments": [
{
"uri": "string",
"size": "string",
"mimeType": "string",
"displayName": "string",
"description": "string"
}
]
}
}
],
"skipUpdate": true,
"syncStatus": "MESSAGE_SYNC_STATUS_UNSPECIFIED"
}'