---
title: "Get messages from session"
method: GET
path: "/session/{session_id}/messages"
tags: ["session"]
---

# Get messages from session

`GET /session/{session_id}/messages`

Get messages from session. Default format is openai. Can convert to acontext (original), anthropic, or gemini format.

## Path parameters

- `session_id` string, uuid, required

## Query parameters

- `limit` integer
- `cursor` string
- `with_asset_public_url` boolean
- `with_events` boolean
- `format` 'acontext' | 'openai' | 'anthropic' | 'gemini'
- `time_desc` boolean
- `edit_strategies` string
- `pin_editing_strategies_at_message` string

## Response `200`

OK

- object
  - `code` integer
  - `error` string
  - `msg` string
  - `data` ConverterGetMessagesOutput
    - `edit_at_message_id` string — Message ID where edit strategies were applied
    - `events` ModelSessionEvent[] — Session events within the messages time window
      - `created_at` string
      - `data` object
      - `id` string
      - `project_id` string
      - `session_id` string
      - `type` string
      - `updated_at` string
    - `has_more` boolean — Whether there are more messages
    - `ids` string[] — Message IDs corresponding to items
    - `items` unknown
    - `metas` object[] — User-provided metadata for each message (same order as items/ids)
    - `next_cursor` string — Cursor for pagination
    - `public_urls` object — Asset public URLs (only for acontext format)
    - `this_time_tokens` integer — Token count for returned messages

## Changes

- **2026-03-15** `39a157a0bcb0` — 1 info
  - added the new optional `query` request parameter `with_events`
- **2026-01-11** `1b05535cdb65` — 1 info
  - added the new optional `query` request parameter `pin_editing_strategies_at_message`
- **2025-12-08** `844d99a8badd` — 1 info
  - added the new optional `query` request parameter `edit_strategies`
- **2025-11-12** `a1c1bcb0e2ee` — 3 warning
  - deleted the `query` request parameter `edit_strategies`
  - deleted the `query` request parameter `pin_editing_strategies_at_message`
  - deleted the `query` request parameter `with_events`

[Change history](https://skmtc.dev/memodb-io/apis/acontext-api/changes/session/:session_id/messages/get.md)

---

[API](https://skmtc.dev/memodb-io/apis/acontext-api.md) · [All operations](https://skmtc.dev/memodb-io/apis/acontext-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/memodb-io/acontext-api/revisions/c8775333b1ed/schema)
