Conversation

Create a conversation

Changed on

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/

Request

Path parameters

organizationstring required

Query parameters

response_format'text' | 'voice' required

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 ^$.

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.

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.

is_testboolean

Whether the conversation is test traffic, such as an automated test harness's session, rather than a real user's. It can't be changed once the conversation is created.

A test conversation gets no post-session analysis when it finishes: no memory extraction, user models or metrics, and no post-processing webhooks, so the user's later conversations recall nothing from it. Metrics can still be evaluated on demand with EvaluateMetrics. Its usage is tagged as test traffic. Everything else runs as in any other conversation, its tools included, so a tool that acts on an external system still does.

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.

Changes