---
title: Get a context document
description: Read a threat model or context document.
url: https://www.hacktron.ai/docs/api/context-documents/get-context-document
---

# Get a context document

Returns a threat model or context document with its text. Use an id from [`GET /context-documents`](/docs/api/context-documents/list-context-documents).

- `content` holds up to 40,000 characters, and `truncated` is `true` when the document is longer.
- A PDF returns empty `content` with `readable` set to `false`. Open it in Hacktron instead.
- `updated_at` says how current the document is. A threat model changes with triage feedback and new context, not with every code change.

## Request

`GET /context-documents/{id}`

Send an [API key](/docs/api/authentication) with the `read` scope in the `X-Api-Key` header.

:::examples

```bash title="Request" wrap=false
curl "https://api.hacktron.ai/v1/context-documents/<id>" \
  -H "X-Api-Key: $HACKTRON_API_KEY"
```

```json title="Response 200 OK" showLineNumbers=false wrap=false
{
  "id": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
  "name": "Link previews: security decisions",
  "kind": "document",
  "updated_at": "2026-10-21T11:05:37.000Z",
  "readable": true,
  "content": "# Link previews\n\nThe preview service fetches only public http and https URLs...",
  "truncated": false
}
```

:::

### Path parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `id` | string, required | |

## Responses

### 200 OK

| Field | Type | Description |
| --- | --- | --- |
| `id` | string (uuid), required | |
| `name` | string, required | |
| `kind` | string, required | One of `threat_model`, `application_threat_model`, or `document`. |
| `updated_at` | string (date-time), required | |
| `readable` | boolean, required | Whether the content is text this API returns; PDFs open in Hacktron. |
| `content` | string, required | Markdown or text content. |
| `truncated` | boolean, required | Whether the content was cut at its limit. |
