---
title: "Load documents as text"
summary: "Load up to 200 documents as text into a batch you can check claims and drafts against, when you hold the text rather than the files."
category: "developer"
tags: ["attest", "reference", "batch", "documents", "text"]
updated: "2026-09-14T04:25:11.423Z"
url: "https://support.quorumtech.ch/articles/attest-load-text-batch"
markdown: "https://support.quorumtech.ch/articles/attest-load-text-batch.md"
---

# Load documents as text

`POST https://api.quorumtech.ch/attest/v1/batch`

Loads up to 200 documents, supplied as text, into a batch that later checks can run against.
Prefer `POST /attest/v1/batches` with the original files where you have them: parsing on the
server means a citation points at something the server actually read.

Batches live in memory only and age out on a timer. Delete a batch once the work is done.

Use this when the documents already exist as text in your system: extracted pages, transcripts, records. If you hold the original files, upload them instead, so the server parses them and each document gets a `fileHash` that proves what was checked.

Give each document an `id` you can recognise in citations (letters, digits, dot, dash and underscore, at most 64 characters) and a `title` for the explanations. `scope` describes what the evidence set covers, in a sentence, and helps the review tell an out-of-scope claim from an unsupported one. It describes the evidence, never the claims.

The batch lives in memory on one server and expires after six hours. Delete it when the work is done.

```json
{
  "name": "FY2025 reporting pack",
  "scope": "The group's FY2025 annual report and the Q4 trading update.",
  "documents": [
    {
      "id": "annual-report-2025",
      "title": "FY2025 Annual Report",
      "content": "Group revenue for FY2025 was CHF 94.0m, up from CHF 82.0m in the prior year. Operating margin improved to 18%. The auditor is KPMG Zurich."
    },
    {
      "id": "q4-trading-update",
      "title": "Q4 FY2025 trading update",
      "content": "Fourth-quarter revenue was CHF 26.1m. Headcount at year end was 412, up from 380."
    }
  ]
}
```

## Request

A JSON body with these fields:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no | At most 200 characters. |
| `scope` | string | no | What this evidence set covers. Describes the evidence, not the claims. At most 2,000 characters. |
| `documents` | object[] | yes | 1 to 200 items. |
| `documents[].id` | string | no | At most 64 characters. Pattern `^[A-Za-z0-9_.-]+$`. |
| `documents[].title` | string | no | At most 500 characters. |
| `documents[].publishedAt` | string | no | At most 64 characters. |
| `documents[].content` | string | yes |  |

## Example request

```bash
curl -X POST "https://api.quorumtech.ch/attest/v1/batch" \
  -H "Authorization: Bearer $QUORUM_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "name": "FY2025 reporting pack",
  "scope": "The group'\''s FY2025 annual report and the Q4 trading update.",
  "documents": [
    {
      "id": "annual-report-2025",
      "title": "FY2025 Annual Report",
      "content": "Group revenue for FY2025 was CHF 94.0m, up from CHF 82.0m in the prior year. Operating margin improved to 18%. The auditor is KPMG Zurich."
    },
    {
      "id": "q4-trading-update",
      "title": "Q4 FY2025 trading update",
      "content": "Fourth-quarter revenue was CHF 26.1m. Headcount at year end was 412, up from 380."
    }
  ]
}'
```

## Responses

### 201

The batch is loaded and ready to check against.

| Field | Type | Description |
| --- | --- | --- |
| `batchId` | string |  |
| `documents` | BatchDocument[] |  |
| `documents[].id` | string |  |
| `documents[].title` | string |  |
| `documents[].spans` | integer | How many citable spans the document parsed into. |
| `spans` | integer |  |
| `totalChars` | integer |  |
| `batchHash` | string |  |
| `createdAt` | string (date-time) |  |

## Errors

The body is `{ "error": { "code", "message" } }`; the full catalogue with what to do about each code is on the Errors page.

| Status | Codes | When |
| --- | --- | --- |
| 400 |  | The request does not match the schema. `error.issues` names each failing field. |
| 401 |  | The key is missing, not recognised, or revoked. |
| 402 | `payment_required`, `credits_exhausted`, `remaining`, `needed` | The workspace has no active API subscription (`payment_required`), or is prepaid and has no credits left for this request (`credits_exhausted`, with `remaining` and `needed`). Manage billing and add credits at https://developer.quorumtech.ch/billing. |
| 403 |  | The key is not scoped to Attest. |
| 413 |  | The batch exceeds the size the server holds in memory. |
| 429 | `rate_limited`, `claims_rate_limited`, `claim_budget_exhausted`, `monthly_cap_reached`, `cap` | Over the key's requests-per-minute limit (`rate_limited`), its claims-per-minute ceiling (`claims_rate_limited`), its claims-per-day budget (`claim_budget_exhausted`), or, for a postpaid workspace, its monthly credit cap (`monthly_cap_reached`, with `cap` and `resetsAt`). `Retry-After` says when to try again; the daily budget resets at midnight UTC and the cap on the first of the month. |

## Cost

Free. Loading documents costs no credits; the claims checked against the batch are charged when they are checked.
