---
title: List context documents
description: A repository's threat models and context documents.
url: https://www.hacktron.ai/docs/api/context-documents/list-context-documents
---

# List context documents

Returns what Hacktron knows about a repository's design and security, most recently updated first. Use the repository's id from [`GET /repos`](/docs/api/repos/list-repos). `kind` tells the documents apart:

| `kind` | Document |
| --- | --- |
| `threat_model` | The repository's [threat model](/docs/platform/context/threat-models). |
| `application_threat_model` | The threat model of an [application](/docs/platform/context/applications) the repository belongs to. |
| `document` | A context document your team uploaded for the repository. |

Read one with [`GET /context-documents/{id}`](/docs/api/context-documents/get-context-document). `readable` is `false` for a PDF, which this API doesn't return. Open it in Hacktron instead.

## Request

`GET /context-documents`

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?repository_id=<repository_id>" \
  -H "X-Api-Key: $HACKTRON_API_KEY"
```

```json title="Response 200 OK" showLineNumbers=false wrap=false
{
  "data": [
    {
      "id": "c0a8012e-7d4b-4f1a-9c3e-5b6a7d8e9f01",
      "name": "threat_model.md",
      "kind": "threat_model",
      "updated_at": "2026-11-03T16:40:12.000Z",
      "readable": true
    },
    {
      "id": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
      "name": "Link previews: security decisions",
      "kind": "document",
      "updated_at": "2026-10-21T11:05:37.000Z",
      "readable": true
    }
  ]
}
```

:::

### Query parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `repository_id` | string (uuid), required | Id from the repository list. |

## Responses

### 200 OK

| Field | Type | Description |
| --- | --- | --- |
| `data` | array of object, required | |
| `data[].id` | string (uuid), required | |
| `data[].name` | string, required | |
| `data[].kind` | string, required | One of `threat_model`, `application_threat_model`, or `document`. |
| `data[].updated_at` | string (date-time), required | |
| `data[].readable` | boolean, required | Whether the content is text this API returns; PDFs open in Hacktron. |
