Create a scan report
Creates a report that cannot change later from exact source ids. Free: the scan was already paid for. Returns 202 with a task. Body: { scan_id (terminal scan, uuid, required), audit_id?, gsc_snapshot_id?, ga4_snapshot_id?, baseline_report_ids? }. 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.
/scan-reportsAuthorizationBearer token · headerrequiredAPI key sent as Authorization: Bearer <key>. A key belongs to one workspace, has scopes, and can be limited to some brands.
AuthorizationOAuth2 access token · headerrequiredOAuth 2.1 sign-in (authorization code with PKCE) used by AI assistants that connect through the Zaraftis MCP server. Discovery URLs are at https://api.zaraftis.com/api/auth.
Idempotency-KeystringrequiredA new value, such as a UUID, for each new request. Send the same value to retry a request safely; see https://docs.zaraftis.com/conventions#safe-retries-with-idempotency-key.
application/jsonscan_idstring<uuid>requiredaudit_idstring<uuid>gsc_snapshot_idstring<uuid>ga4_snapshot_idstring<uuid>baseline_report_idsstring<uuid>[]Accepted report creation (task reference)
AcceptedScanReportEnvelopebad_request or validation_failed
successbooleanrequirederrorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsobjectfield_errorsobject[]Show propertiesHide properties
objectfieldstringrequiredcodestringrequiredrequiredformattoo_smalltoo_largeunrecognized_keyinvalidmessagestringrequiredrequest_idRequestIdrequirednot_found: unknown id, or an id this key cannot see
successbooleanrequirederrorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsobjectfield_errorsobject[]Show propertiesHide properties
objectfieldstringrequiredcodestringrequiredrequiredformattoo_smalltoo_largeunrecognized_keyinvalidmessagestringrequiredrequest_idRequestIdrequiredconflict, duplicate_url, or idempotency_conflict
successbooleanrequirederrorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsobjectfield_errorsobject[]Show propertiesHide properties
objectfieldstringrequiredcodestringrequiredrequiredformattoo_smalltoo_largeunrecognized_keyinvalidmessagestringrequiredrequest_idRequestIdrequiredincomplete_evidence
successbooleanrequirederrorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsobjectfield_errorsobject[]Show propertiesHide properties
objectfieldstringrequiredcodestringrequiredrequiredformattoo_smalltoo_largeunrecognized_keyinvalidmessagestringrequiredrequest_idRequestIdrequired