---
search:
  tags:
    - Exports
    - POST
seo:
  description: >-
    Writes a scan report to a JSON or JSONL file in the background. Free. Body:
    { report_id,… Reference for the POST /exports endpoint in the Zaraftis
    Public API.
sidebar:
  label: Create an export
  badge: POST
title: Create an export
type: openapi-operation
---
Writes a scan report to a JSON or JSONL file in the background. Free. Body: &#123; report_id, format: report_json|observations_jsonl &#125;. An unknown report id answers 404. Returns 202 with the task and export references; a retry with the same Idempotency-Key does not create a second export. Only an explicit export request writes a file; the completed file's facts (byte_size, record_count, content_checksum, 7-day expiry) ride GET /v1/exports/&#123;export_id&#125;, and downloads ride GET /v1/exports/&#123;export_id&#125;/download.

`POST /exports`

**Request body** (`application/json`, required)

- `report_id` (string<uuid>, required)
- `format` (string, required)

Request body example:

```json
{
  "report_id": "5ed7905a-4735-4cf7-b1ab-521e066fb971",
  "format": "report_json"
}
```

**Responses**

- `202` — Accepted export (task + export references)
- `400` — bad\_request or validation\_failed
- `404` — not\_found: unknown id, or an id this key cannot see
- `409` — conflict, duplicate\_url, or idempotency\_conflict
- `422` — incomplete\_evidence
