latestOpenAPI 3.1.02026-08-221163801019.2 KB

f0f28319e448

Conversation

Create a conversation

Create a new conversation and start it. The user must not have any unfinished conversations that belong to the same service.

Permissions

This endpoint requires the following permissions:

  • Conversation:CreateConversation for the new conversation.

This endpoint may be impacted by the following permissions:

  • CurrentAgentActionEvents are only emitted if the authenticated user has the Conversation:GetInteractionInsights permission.
post/v1/{organization}/conversation/

Path parameters

organizationstring required

Query parameters

response_format'text' | 'voice' required

The format of the response that will be sent to the user.

The format of the response that will be sent to the user.

current_agent_action_typestring

A regex for filtering the type of the current agent action to return. By default, all are returned. If you don't want to receive any events, set this to a regex that matches nothing, for instance ^$.

A regex for filtering the type of the current agent action to return. By default, all are returned. If you don't want to receive any events, set this to a regex that matches nothing, for instance ^$.

Headers

x-mongo-cluster-namestring nullable

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.

Sec-WebSocket-Protocolstring[]

Request body

service_idstring required

The identifier of the service to create a conversation in.

service_version_set_namestring

The version set of the service to use. If not provided, the release version set is used.

initial_messagestring
initial_message_type'user-message' | 'external-event' nullable

The type of the initial_message. Can only be specified if initial_message is provided.

tagsobject

A list of tags for the conversation. The key can only contain alphanumeric characters, underscores, or spaces. The value can only contain up to 100 characters.

Response

Succeeded. The response will be a stream of events in JSON format separated by newlines. The server will transmit an event as soon as one is available, so the client should respond to the events as soon as one arrives, and keep listening until the server closes the connection.