---
title: "Get messages"
method: GET
path: "/messages"
---

# Get messages

`GET /messages`

Returns a list of messages representing the conversation history with the agent.

## Response `200`

OK

- MessagesResponseBody
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `messages` Message[], required — List of messages
    - `content` string, required — Message content. The message is formatted as it appears in the agent's terminal session, meaning that, by default, it consists of lines of text with 80 characters per line.
    - `id` integer, required — Unique identifier for the message. This identifier also represents the order of the message in the conversation history.
    - `role` 'agent' | 'user', required
    - `time` string, date-time, required — Timestamp of the message

## Other responses

- `default` — Error

## Changes

- **2025-10-13** `e6147f7bdb93` — 1 breaking
  - the response property `errors` became nullable for the status `default`

[Change history](https://skmtc.dev/coder/apis/agentapi/changes/messages/get.md)

---

[API](https://skmtc.dev/coder/apis/agentapi.md) · [All operations](https://skmtc.dev/coder/apis/agentapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/coder/agentapi/revisions/b33e590af299/schema)
