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

UpdateConversationSharingState updates the sharing state of a Conversation.

Request

If the Conversation does not exist, it returns a NOT_FOUND (404) error. If the conversation exists, but the source does not support the operation, it will throw FAILED_PRECONDITION error (HTTP status code 400)

Path
conversationstringrequired

Resource name of the Conversation.

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

Bodyapplication/jsonrequired
sharingStatestring(ConversationSharingState)

Conversation Sharing State.

  • SHARING_STATE_UNSPECIFIED: Default value. All conversations will be created with this sharing state value.
  • SHARING_STATE_SHARED: This conversation is shared with all managers. Conversation of OPERA_SYNTHETIC source can be changed to shared state.
Default "SHARING_STATE_UNSPECIFIED"
Enum"SHARING_STATE_UNSPECIFIED""SHARING_STATE_SHARED"
curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{conversation}:updateSharingState' \
  -H 'Content-Type: application/json' \
  -d '{
    "sharingState": "SHARING_STATE_UNSPECIFIED"
  }'

Responses

A successful response.

Bodyapplication/json
object(conversationUpdateConversationSharingStateResponse)

Response of [ConversationService.UpdateConversationSharingState][].

Response
application/json
{}

UpdateConversationSkill updates the skill this Conversation is associated with.

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
skillstring

The skill this Conversation is associated with. Unspecifying it or setting it to empty string will override the skill to empty string.

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

Responses

A successful response.

Bodyapplication/json
object(conversationUpdateConversationSkillResponse)

Response of [ConversationService.UpdateConversationSkill][].

Response
application/json
{}

UpdateConversationState updates the state of the 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
statestring(The state of the conversation)
  • STATE_UNSPECIFIED: Default value. It's valid to use it in StartConversationRequest and invalid to use it in UpdateConversationStateRequest.
  • LIVE: The conversation is open. Agents and visitors are likely to send new messages to the conversation. Agent assist features are turned on for this conversation.

The conversation's end_time is not populated in this state.

  • CLOSED: The conversation is closed. Agents and visitors are unlikely to send new messages to the conversation. Agent assist features are turned off for this conversation.

The conversation's end_time is populated in this state.

Default "STATE_UNSPECIFIED"
Enum"STATE_UNSPECIFIED""LIVE""CLOSED"
updateTimestring(date-time)(The timestamp of when the conversation state change occurred)

Only populate it when the platform provides accurate time for the state transition event. Otherwise, leave it unpopulated. See the documentation of [state][] field for how this timestamp is used.

curl -i -X POST \
  'https://{api-domain}.cresta.com/v1/{conversation}:updateState' \
  -H 'Content-Type: application/json' \
  -d '{
    "state": "STATE_UNSPECIFIED",
    "updateTime": "2019-08-24T14:15:22Z"
  }'

Responses

A successful response.

Bodyapplication/json
object(conversationUpdateConversationStateResponse)

Response of [ConversationService.UpdateConversationState][].

Response
application/json
{}