---
title: "List a document's content versions"
method: GET
path: "/v1/projects/{project_id}/documents/{document_id}/versions"
tags: ["Documents"]
---

# List a document's content versions

`GET /v1/projects/{project_id}/documents/{document_id}/versions`

## Request

- Base URL: `https://api.naturali.ai`
- URL: `https://api.naturali.ai/v1/projects/{project_id}/documents/{document_id}/versions`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.naturali.ai/authorize`, token URL `https://api.naturali.ai/token`, scopes: `mcp:access`)

Returns the document's archived states, newest first. A version is written on create and on every subsequent write that changes the content or its annotations, and a withdrawal is archived as a version carrying no content.

## Path parameters

- `document_id` string, required

## Query parameters

- `limit` integer
- `offset` integer

## Response `200`

List of document versions, newest first

- object
  - `data` DocumentVersion[], required
    - `id` string: Public ID of the archived version
    - `document_id` string: Public ID of the document this version belongs to
    - `version` integer: The archived version number
    - `config` object: The document's versioned surface as it stood at this version: its `content`, `title`, `path`, `metadata`, `tags` and chunk configuration. A full snapshot rather than a diff, because what a restore has to reproduce is what a run read — which is a read by version, and a diff chain would have to be replayed to answer it. A withdrawal is archived as a version too, carrying `withdrawn: true` and no content. Restoring one is refused; restore the version before it. Deliberately open rather than a fixed schema: an archive written by an earlier release of the runtime reflects the document surface **of its own time**, so it may carry fields the current API no longer documents.
    - `label` string, nullable: Optional human tag for this version, e.g. `pre-correction`. Set from the `version_label` of the write that archived it, or generated for a restore or a withdrawal.
    - `created_by_principal_type` 'user' | 'api_key' | 'agent' | 'automation' | 'approval' | 'system': What kind of principal acted. `user` and `api_key` are authenticated callers, and the id is the user's (`user_…`) or the key's own (`key_…`), so a record names which key acted rather than its owner. `agent` is an agent writing under its own identity (`agent_…`). `automation` is the task engine acting on a dispatch outcome and `approval` an approval resolution; neither carries an id. `system` is the platform itself, with an id naming the mechanism (`retention_sweep`, `zero_retention`).
    - `created_by_principal_id` string, nullable: Public id of that principal: the user (`user_…`), or for API key auth the key itself (`key_…`), so the record names which key acted.
    - `created_at` string, date-time
  - `total` integer, required
  - `limit` integer, required
  - `offset` integer, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Document not found

---

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