---
title: "Get conversation messages"
method: GET
path: "/chat/conversations/{id}/messages"
---

# Get conversation messages

`GET /chat/conversations/{id}/messages`

## Request

- Base URL: `https://api.closedloop.sh`
- URL: `https://api.closedloop.sh/chat/conversations/{id}/messages`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/closedloop/apis/closedloop-ai-api/docs/chat/conversations/:id/messages/get.ts> (a function with typed inputs; its response is checked against the schema)

Get messages from a conversation

## Path parameters

- `id` string, uuid, required

## Query parameters

- `limit` integer

## Response `200`

List of messages

- object
  - `data` Message[]
    - `id` string, uuid
    - `content` string
    - `role` 'user' | 'assistant'
    - `created_at` string, date-time

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/closedloop/apis/closedloop-ai-api.md) - [All operations](https://skmtc.dev/closedloop/apis/closedloop-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/closedloop/apis/closedloop-ai-api/revisions/20e04ae722ee?raw)
