Conversation Service

Our Conversation Service API comprehensively manages the entire lifecycle of conversations—enabling creation, updates (audio persistence, display name, language, sharing, skill, state, and metadata), retrieval, redaction or deletion of messages, tagging, event logging, batch operations, and final closure—providing robust end-to-end conversation management.

Languages
Servers
https://{api-domain}.cresta.com/

ConversationService

Operations

Redact a substring of a conversation message. Currently only cresta admins can redact a message.

Request

Path
namestringrequired

The resource name of the conversation message to be redacted. Format: customers/{customer_id}/profiles/{profile_id}/conversations/{conversation_id}/messages/{message_id}

Bodyapplication/jsonrequired
momentstring(The moment resource name, used for creating a moment annotation. The moment should be of type ENTITY Format: customers/{customer_id}/profiles/{profile_id}/moments/{moment_id})required
startIndexinteger(int32)required

The start byte index (including) of the text to be redacted.

endIndexinteger(int32)required

The end byte index (exclusive) of the text to be redacted.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{name=customers/*/profiles/*/conversations/*/messages/*}:redact' \
  -H 'Content-Type: application/json' \
  -d '{
    "moment": "string",
    "startIndex": 0,
    "endIndex": 0
  }'

Responses

A successful response.

Bodyapplication/json
conversationMessageobject(A message in a Conversation. Next ID: 22)
Response
application/json
{ "conversationMessage": { "name": "string", "legacyMessageId": 0, "text": "string", "textHtml": "string", "transcriptionInfo": { … }, "agent": "string", "speaker": "ROLE_UNSPECIFIED", "speakerInfo": { … }, "state": "STATE_UNSPECIFIED", "sequencePosition": 0, "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z", "audioStartOffset": "string", "audioEndOffset": "string", "originalEventData": {}, "usedSuggestionId": "string", "usedCoachSuggestionId": "string", "redaction": { … }, "botData": { … }, "isTransferred": true, "email": { … } } }

GetConversation returns the conversation given the conversation's resource name.

Request

Path
namestringrequired

Resource name of the conversation

Format: customers/{customer_id}/profiles/{profile_id}/conversations/{conversation_id}

curl -i -X GET \
  'https://{api-domain}.cresta.com/v1/{name=customers/*/profiles/*/conversations/*}'

Responses

A successful response.

Bodyapplication/json
conversationobject(Conversation is a session of chat/call messages. Next ID: 35)
Response
application/json
{ "conversation": { "name": "string", "agent": "string", "participants": [ … ], "agentInfo": { … }, "agentUserName": "string", "team": "string", "visitor": { … }, "conversationCorrelationId": "string", "skill": "string", "platformInfo": { … }, "startTime": "2019-08-24T14:15:22Z", "endTime": "2019-08-24T14:15:22Z", "audioPersistenceState": "AUDIO_PERSISTENCE_STATE_UNSPECIFIED", "persistedAudioUri": "string", "audioAnalysis": { … }, "persistedAudioDuration": "string", "legacyChatId": 0, "state": "STATE_UNSPECIFIED", "raiseHandState": "RAISE_HAND_STATE_UNSPECIFIED", "languageCode": "string", "channel": "CHANNEL_UNSPECIFIED", "source": "SOURCE_UNSPECIFIED", "metadata": { … }, "displayName": "string", "sharingState": "SHARING_STATE_UNSPECIFIED", "policyOverride": { … }, "usecase": "string", "createTime": "2019-08-24T14:15:22Z", "corruptionState": "CORRUPTION_STATE_UNSPECIFIED", "virtualAgent": "string", "ingestedByJob": "string", "transferInfo": { … }, "persistenceState": "PERSISTENCE_STATE_UNSPECIFIED", "multiLanguageMode": "MULTI_LANGUAGE_MODE_UNSPECIFIED" } }

Deletes a conversation and all its messages from the apps DB.

Request

If the conversation does not exist, it returns a NOT_FOUND (404) error.

Path
namestringrequired

The resource name of the conversation to be deleted.

curl -i -X DELETE \
  'https://{api-domain}.cresta.com/v1/{name=customers/*/profiles/*/conversations/*}'

Responses

A successful response.

Bodyapplication/json
object(Response of [ConversationService.DeleteConversation][])
Response
application/json
{}