---
title: "List context_attachments for a document"
method: GET
path: "/documents/{document_id}/context-attachments"
tags: ["context-attachments"]
---

# List context_attachments for a document

`GET /documents/{document_id}/context-attachments`

Returns all attachments for the document in stable chronological order (by `attachment_id`, which is a UUIDv7 — the leading bytes encode the creation timestamp, so attachment_id order equals creation order for all practical purposes). Capped at 5 items per document, so no pagination is needed.

## Path parameters

- `document_id` string, uuid, required

## Response `200`

List of attachments (possibly empty)

- ContextAttachment[]
  - `attachment_id` string, uuid — UUIDv7 — chronologically sortable. Stable order for prompt assembly.
  - `workspace_id` string, uuid, required — Owning workspace; multi-tenant isolation key.
  - `document_id` string, uuid, required — Document this attachment travels with.
  - `type` 'author_note' | 'json_schema', required — Vocabulary label (see CreateRequest).
  - `name` string, required
  - `content_text` string, nullable — Set for inline (≤16KB) attachments. Mutually exclusive with s3_key — see the model_validator below.
  - `s3_key` string, nullable — Set for >16KB attachments stored on the FileStorageBackend. Mutually exclusive with content_text. The repository computes this; callers never set it via the create endpoint.
  - `mime_type` 'text/plain' | 'application/json' | 'application/schema+json', required — MIME type of the payload (text/plain | application/json | application/schema+json).
  - `byte_size` integer, required — Encoded UTF-8 byte size of the payload. Used for cap math at extract time.
  - `created_at` string, date-time

## Other responses

- `404` — Document not found in workspace
- `422` — Validation Error

---

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