---
title: "List Context History"
method: GET
path: "/api/v1/contexts/{context_id}/history"
tags: ["contexts"]
---

# List Context History

`GET /api/v1/contexts/{context_id}/history`

## Path parameters

- `context_id` string, uuid, required

## Query parameters

- `limit` integer
- `page_token` string, uuid, nullable
- `order` string
- `order_by` string

## Response `200`

Successful Response

- PaginatedResultContextHistoryItem
  - `items` ContextHistoryItem[], required
    - `id` string, uuid
    - `data` union, required
      - ArtifactOutput — Represents a file, data structure, or other resource generated by an agent during a task.
        - `artifactId` string, required
        - `description` string, nullable
        - `extensions` string[], nullable
        - `metadata` object, nullable
        - `name` string, nullable
        - `parts` PartOutput[], required
          - union
            - TextPart — Represents a text segment within a message or artifact.
              - …
            - FilePart — Represents a file segment within a message or artifact. The file content can be provided either directly as bytes or as a URI.
              - …
            - DataPart — Represents a structured data segment (e.g., JSON) within a message or artifact.
              - …
      - MessageOutput — Represents a single message in the conversation between a user and an agent.
        - `contextId` string, nullable
        - `extensions` string[], nullable
        - `kind` 'message'
        - `messageId` string, required
        - `metadata` object, nullable
        - `parts` PartOutput[], required
          - union
            - TextPart — Represents a text segment within a message or artifact.
              - …
            - FilePart — Represents a file segment within a message or artifact. The file content can be provided either directly as bytes or as a URI.
              - …
            - DataPart — Represents a structured data segment (e.g., JSON) within a message or artifact.
              - …
        - `referenceTaskIds` string[], nullable
        - `role` 'agent' | 'user', required — Identifies the sender of the message. `user` for the client, `agent` for the service.
        - `taskId` string, nullable
    - `created_at` string, date-time
    - `context_id` string, uuid, required
    - `kind` 'message' | 'artifact', required
  - `total_count` integer, required
  - `has_more` boolean
  - `next_page_token` string, uuid, nullable, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/i-am-bee/apis/agentstack-server.md) · [All operations](https://skmtc.net/i-am-bee/apis/agentstack-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/i-am-bee/agentstack-server/revisions/7d68b3f8bf7f/schema)
