---
title: "Get chat messages"
method: GET
path: "/chat/completions/{completion_id}/messages"
tags: ["Chat"]
---

# Get chat messages

`GET /chat/completions/{completion_id}/messages`

## Request

- Base URL: `https://api.openai.com/v1`
- URL: `https://api.openai.com/v1/chat/completions/{completion_id}/messages`
- Auth: HTTP bearer

Get the messages in a stored chat completion. Only Chat Completions that
have been created with the `store` parameter set to `true` will be
returned.

## Path parameters

- `completion_id` string, required

## Query parameters

- `after` string
- `limit` integer
- `order` 'asc' | 'desc'

## Response `200`

A list of messages

- ChatCompletionMessageList: An object representing a list of chat completion messages.
  - `object` 'list', required: The type of this object. It is always set to "list".
  - `data` object[], required: An array of chat completion message objects.
    - `id` string, required
    - `role` 'user' | 'assistant' | 'tool' | 'system' | 'function' | 'developer', required
    - `content` string, nullable, required
    - `content_parts` object[], nullable, required
      - `type` 'text' | 'image_url' | 'input_audio' | 'file', required
      - `text` string, nullable
      - `image_url` object, nullable
        - `url` string, required
        - `detail` string, nullable
      - `input_audio` object, nullable
        - `data` string, required
        - `format` string, required
      - `file` object, nullable
        - `file_data` string, nullable
        - `filename` string, nullable
        - `file_id` string, nullable
    - `name` string, nullable
  - `first_id` string, nullable, required: The identifier of the first chat message in the data array.
  - `last_id` string, nullable, required: The identifier of the last chat message in the data array.
  - `has_more` boolean, required: Indicates whether there are more chat messages available.

## Other responses

- `400`: Invalid message pagination parameters.
- `404`: No stored chat completion was found with the specified ID.
- `429`: The request was rejected because a rate limit was exceeded.
- `500`: An internal error prevented the request from being completed.

## Changes

- **2026-10-06** `487892d3954e`: 4 info
  - added the optional property `error/misalignment/review_target` to the response with the `400` status
  - added the optional property `error/misalignment/review_target` to the response with the `404` status
  - added the optional property `error/misalignment/review_target` to the response with the `429` status
  - added the optional property `error/misalignment/review_target` to the response with the `500` status
- **2026-10-05** `7f654af7f94f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnistack-sh/apis/openai-api/changes/chat/completions/:completion_id/messages/get.md)

---

[API](https://skmtc.dev/omnistack-sh/apis/openai-api.md) - [All operations](https://skmtc.dev/omnistack-sh/apis/openai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omnistack-sh/apis/openai-api/revisions/0a26f104d35f?raw)
