Conversation

Get conversation messages

Changed on

Retrieve messages in a conversation, sorted in the specified order, up to the specified limit.

Permissions

This endpoint is impacted by the following permissions:

  • Only messages that the authenticated user has Conversation.GetMessage permission on will be returned.
get/v1/{organization}/conversation/{conversation_id}/messages/

Request

Path parameters

organizationstring required
conversation_idstring required

The identifier of the conversation.

Query parameters

idstring[]

The IDs of the messages to retrieve.

message_typeMessageType[]

The type of messages to retrieve.

interaction_idstring[]

The IDs of the interactions to retrieve messages for.

limitinteger

The maximum number of messages to return. At most 500 messages can be returned in one request.

continuation_tokeninteger

The continuation token to use to retrieve the next set of messages.

sort_bystring[]

The field to sort the messages by. Supported fields are interaction_id and created_at. Specify a + before the field name to indicate ascending sorting and - for descending sorting. Multiple fields can be specified to break ties.

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[]

Response

Succeeded.

has_moreboolean required

Whether there are more, earlier messages in the conversation to retrieve.

continuation_tokeninteger nullable required

The continuation token to use to retrieve the next set of messages.

Changes

    • breaking

      for the query request parameter message_type, default value was changed from external-event user-message agent-message to agent-message external-event user-message

    • breaking

      for the query request parameter message_type, default value was changed from agent-message user-message external-event to external-event user-message agent-message