> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerodrift.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a Batch

> Follow a batch: status, counts by outcome and verdict, cost, and links to the results.

Returns a batch's status, its counts and cost, and, once it has ended, links to its results. Poll this until `status` is `ended` or `failed`. Read-only API keys are allowed.

## Path Parameters

**batch\_id** `string` *required*

The `batch_id` from [Create a Batch](https://docs.zerodrift.com/api-reference/batches/create-batch.md).

## Response

**status** `string`

`validating`, `in_progress`, `canceling`, `finalizing`, `ended` or `failed`. See [Follow the batch](https://docs.zerodrift.com/guides/audit-historical-messages.md#5-follow-the-batch).

**request\_counts** `object`

Messages by outcome: `processing`, `succeeded`, `errored`, `canceled`, `expired`.

**verdict\_counts** `object`

Checked messages by verdict: `approved`, `needs_changes`, `do_not_send`, and `flagged` (`needs_changes` + `do_not_send`). `other` counts any other verdict, such as `send with caution`, and appears only when it isn't zero. Updated as messages finish.

**total\_items** `integer`

Messages that run. With `skip_problem_rows`, this excludes `skipped_items`.

**skipped\_items** `integer`

Lines dropped by `skip_problem_rows`.

**cost** `object`

`estimate`: `units` and `amount`, set when the file is read. `actual`: what was billed, set when the batch ends.

**validation\_scope** `object`

The rules every message ran with, as resolved when the batch was created.

**metadata** `object | null`

The metadata you sent, unchanged.

**failure** `object | null`

Set when `status` is `failed`: `reason` (for example `invalid_input`, `pricing_unavailable`, `quota_exceeded`) and line-numbered `errors`.

**results\_url** `string | null`

A link to the results JSONL, one line per message. Valid until `results_url_expires_at`, an hour at most; get the batch again for a fresh link.

**files** `object`

Links to `jsonl`, `xlsx`, `workbook` (the audit workbook) and `pdf` (the audit report). Each is `{url, expires_at}` or `null`. `workbook` and `pdf` are set once `report_status` is `ready`.

**report\_status** `string | null`

Progress of the audit workbook and PDF report built after the batch ends: `pending`, `building`, `ready` or `failed`.

**files\_deleted\_at** `string | null`

When the input, results and reports are deleted: 14 days after the batch ends. After that, `results_url` and `files` are `null`. The batch record stays.

**created\_at, in\_progress\_at, finalizing\_at, ended\_at, expires\_at** `string`

When the batch reached each stage, and when it expires.

```bash cURL theme={null}
curl https://api.zerodrift.ai/api/v3/batches/BATCH_ID \
  -H "x-api-key: YOUR_API_KEY"
```

```json 200 Ended (example) theme={null}
{
  "api_version": "v3",
  "batch_id": "batch_3f2b8c1e9d0a4b7f8e6d5c4b3a291807",
  "status": "ended",
  "request_counts": { "processing": 0, "succeeded": 998, "errored": 2, "canceled": 0, "expired": 0 },
  "total_items": 1000,
  "skipped_items": 0,
  "verdict_counts": { "approved": 941, "needs_changes": 44, "do_not_send": 13, "flagged": 57 },
  "cost": {
    "currency": "USD",
    "estimate": { "units": 1000, "amount": "10.00" },
    "actual": { "units": 998, "amount": "9.98" }
  },
  "model_engine": "anchor_3_0",
  "metadata": { "name": "Q4 outbound review" },
  "validation_scope": { "rulepacks": ["finra-2210"], "rules": ["guarantee_of_returns", "mnpi_leak"] },
  "created_at": "2026-10-05T12:01:00Z",
  "expires_at": "2026-10-06T12:01:00Z",
  "in_progress_at": "2026-10-05T12:01:40Z",
  "finalizing_at": "2026-10-05T12:39:10Z",
  "cancel_initiated_at": null,
  "canceled_before_start": false,
  "ended_at": "2026-10-05T12:40:00Z",
  "files_deleted_at": "2026-10-19T12:40:00Z",
  "failure": null,
  "report_status": "ready",
  "results_url": "https://example-bucket.s3.amazonaws.com/batch-results/batch_3f2b8c1e9d0a4b7f8e6d5c4b3a291807/results.jsonl?X-Amz-Algorithm=...",
  "results_url_expires_at": "2026-10-05T13:45:00Z",
  "files": {
    "jsonl": { "url": "https://example-bucket.s3.amazonaws.com/...", "expires_at": "2026-10-05T13:45:00Z" },
    "xlsx": { "url": "https://example-bucket.s3.amazonaws.com/...", "expires_at": "2026-10-05T13:45:00Z" },
    "workbook": { "url": "https://example-bucket.s3.amazonaws.com/...", "expires_at": "2026-10-05T13:45:00Z" },
    "pdf": { "url": "https://example-bucket.s3.amazonaws.com/...", "expires_at": "2026-10-05T13:45:00Z" }
  }
}
```

```json 200 Failed theme={null}
{
  "api_version": "v3",
  "batch_id": "batch_e511e74dd1ea49ba8c5f4293a68427be",
  "status": "failed",
  "request_counts": { "processing": 0, "succeeded": 0, "errored": 0, "canceled": 0, "expired": 0 },
  "total_items": 0,
  "skipped_items": 0,
  "model_engine": "anchor_3_0",
  "metadata": { "name": "Docs sample audit" },
  "created_at": "2026-12-02T19:43:52Z",
  "expires_at": "2026-12-03T19:43:52Z",
  "in_progress_at": null,
  "ended_at": "2026-12-02T19:43:55Z",
  "files_deleted_at": "2026-12-16T19:43:55Z",
  "failure": {
    "reason": "pricing_unavailable",
    "errors": [
      { "code": "pricing_unavailable", "line": 0, "message": "pricing_unavailable: the customer has no billing account" }
    ]
  },
  "verdict_counts": { "approved": 0, "needs_changes": 0, "do_not_send": 0, "flagged": 0 },
  "cost": { "currency": "USD", "estimate": null, "actual": null },
  "report_status": null,
  "results_url": null,
  "files": { "jsonl": null, "xlsx": null, "workbook": null, "pdf": null }
}
```

## Errors

| Status | Code | Meaning |
| - | - | - |
| `400` | | `batch_id` is malformed. |
| `404` | `batch_not_found` | No batch with this ID is yours. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.