---
title: "Get conversation messages"
method: GET
path: "/v1/{organization}/conversation/{conversation_id}/messages/"
tags: ["Conversation"]
---

# Get conversation messages

`GET /v1/{organization}/conversation/{conversation_id}/messages/`

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.

## Path parameters

- `organization` string, required
- `conversation_id` string, required — The identifier of the conversation.

## Query parameters

- `id` string[] — The IDs of the messages to retrieve.
- `message_type` MessageType[] — The type of messages to retrieve.
- `interaction_id` string[] — The IDs of the interactions to retrieve messages for.
- `limit` integer — The maximum number of messages to return. At most 500 messages can be returned in one request.
- `continuation_token` integer — The continuation token to use to retrieve the next set of messages.
- `sort_by` string[] — 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-name` string, 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-Protocol` string[]

## Response `200`

Succeeded.

- SrcAppEndpointsConversationGetConversationMessagesResponse
  - `messages` MessageInstance[], required — The retrieved messages.
    - `id` string, required
    - `interaction_id` string, required — The identifier of the interaction.
    - `created_at` string, date-time, required — The time at which this message was created.
    - `sender` string, required — A human-friendly name of the sender of the message.
    - `message` string, required — The text content of the message.
    - `format` 'text' | 'voice', required
    - `message_type` 'user-message' | 'agent-message' | 'agent-inner-thought' | 'external-event', required
  - `has_more` boolean, required — Whether there are more, earlier messages in the conversation to retrieve.
  - `continuation_token` integer, nullable, required — The continuation token to use to retrieve the next set of messages.

## Other responses

- `401` — Invalid authorization credentials.
- `403` — Missing required permissions.
- `404` — Specified organization or conversation is not found.
- `422` — Invalid request path parameter failed validation.
- `429` — The user has exceeded the rate limit of 20 requests per minute for this endpoint.
- `503` — The service is going through temporary maintenance.

---

[API](https://skmtc.net/amigo/apis/amigo-api.md) · [All operations](https://skmtc.net/amigo/apis/amigo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/amigo/amigo-api/revisions/f0f28319e448/schema)
