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

UpdateConversationAudioPersistenceState updates the audio persistence state of a Conversation.

Request

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

Path
conversationstringrequired

Resource name of the Conversation.

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

Bodyapplication/jsonrequired
audioPersistenceStatestring(ConversationAudioPersistenceState)

The state of how the corresponding audio stream is persisted.

  • AUDIO_PERSISTENCE_STATE_UNSPECIFIED: Invalid state.
  • NOT_PERSISTED: The Audio is not persisted. For text conversations, this is always the state. For voice conversations, this is the state before the audio is uploaded.
  • PERSISTED: The Audio is persisted successfully.
  • PERSIST_FAILED: The Audio failed to persist.
Default "AUDIO_PERSISTENCE_STATE_UNSPECIFIED"
Enum"AUDIO_PERSISTENCE_STATE_UNSPECIFIED""NOT_PERSISTED""PERSISTED""PERSIST_FAILED"
persistedAudioUristring

The URI of the persisted audio. Must be populated if audio_persistence_state is set to PERSISTED.

audioAnalysisobject(conversationAudioAnalysis)

Audio energy analysis result. Can be used to render wave form.

audioDurationstring

The duration of the audio.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{conversation}:updateAudioPersistenceState' \
  -H 'Content-Type: application/json' \
  -d '{
    "audioPersistenceState": "AUDIO_PERSISTENCE_STATE_UNSPECIFIED",
    "persistedAudioUri": "string",
    "audioAnalysis": {
      "agentAudioEnergy": [
        0.1
      ],
      "visitorAudioEnergy": [
        0.1
      ]
    },
    "audioDuration": "string"
  }'

Responses

A successful response.

Bodyapplication/json
object(conversationUpdateConversationAudioPersistenceStateResponse)

Response of [ConversationService.UpdateConversationAudioPersistenceState][].

Response
application/json
{}

UpdateConversationDisplayName updates the display name for this conversation.

Request

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

Path
conversationstringrequired

Resource name of the Conversation.

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

Bodyapplication/jsonrequired
displayNamestringrequired

The display name of the Conversation.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{conversation}:updateDisplayName' \
  -H 'Content-Type: application/json' \
  -d '{
    "displayName": "string"
  }'

Responses

A successful response.

Bodyapplication/json
object(conversationUpdateConversationDisplayNameResponse)

Response of [ConversationService.UpdateConversationDisplayName][].

Response
application/json
{}

UpdateConversationLanguage updates the language code for this Conversation.

Request

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

Path
conversationstringrequired

Resource name of the Conversation.

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

Bodyapplication/jsonrequired
languageCodestringrequired

The language code for this Conversation.

It must be a valid IETF BCP-47 language codes, such as en-US or de-CH. It must be in the list of supported languages of the parent Profile. Cresta falls back to the Profile's default language if the conditions are not met.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{conversation}:updateLanguageCode' \
  -H 'Content-Type: application/json' \
  -d '{
    "languageCode": "string"
  }'

Responses

A successful response.

Bodyapplication/json
languageCodestring

The effective language code for the Conversation. It may be different from the language_code in the request if the requirements are not met.

Response
application/json
{ "languageCode": "string" }