---
search:
  tags:
    - Scan reports
    - POST
seo:
  description: >-
    Creates a report that cannot change later from exact source ids. Free: the
    scan was… Reference for the POST /scan-reports endpoint in the Zaraftis
    Public API.
sidebar:
  label: Create a scan report
  badge: POST
title: Create a scan report
type: openapi-operation
---
Creates a report that cannot change later from exact source ids. Free: the scan was already paid for. Returns 202 with a task. Body: &#123; scan_id (terminal scan, uuid, required), audit_id?, gsc_snapshot_id?, ga4_snapshot_id?, baseline_report_ids? &#125;. Every included source is an exact id: an unknown or inaccessible id answers 404; a same-workspace source that belongs to a different brand or carries no usable result answers 422 incomplete_evidence with details.unavailable_source_ids; a baseline whose scan is not strictly earlier answers 409. An identical selection stored before this request returns the existing report instead of creating a duplicate; the completed task identifies the resulting report_id. Exact source-ID validation occurs before the task is accepted.

`POST /scan-reports`

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

- `scan_id` (string<uuid>, required)
- `audit_id` (string<uuid>)
- `gsc_snapshot_id` (string<uuid>)
- `ga4_snapshot_id` (string<uuid>)
- `baseline_report_ids` (string<uuid>[])

Request body example:

```json
{
  "scan_id": "9a59f0f5-5572-476d-a7fc-c960ef43a5af",
  "audit_id": "78c04fa6-cfb4-46a0-9aa5-3681ba4f3897",
  "gsc_snapshot_id": "7e81950b-220f-48de-8e3c-3254eb376afb",
  "ga4_snapshot_id": "94516159-0fec-4a5a-96b0-837506fe3d40",
  "baseline_report_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}
```

**Responses**

- `202` — Accepted report creation (task reference)
- `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
