Auditmark

Save intake answers

PATCH
/inspections/{inspection_id}/intake

Persist inspector-captured start-of-inspection ("intake") values.

Shallow-merges body.values into inspections.intake jsonb (idempotent: a merge applied twice yields the same object). Org isolation + participant scope are enforced by the insp_inspector_update RLS policy (and insp_admin_write for admins) — the same path start_inspection / submit_response rely on; no service/elevated session is used. The jsonb value is passed as a Python dict (asyncpg jsonb codec) and cast $2::jsonb, not json.dumps'd.

Closed to field changes (AUD-370): refused with 409 inspection_closed under the predicate every other field write uses (inspection_lock.assert_inspection_open), for admins as well as inspectors. Start-section answers sit outside responses, so neither the response-lock trigger nor a correction session reaches them, and insp_inspector_update does not restrict by status: this check is the only thing between a finished report and a silent rewrite with no history.

Authorization

OrgApiKey
AuthorizationBearer <token>

Organization API key. Send as Authorization: Bearer <key>. Create one in Admin > Settings > API keys.

In: header

Path Parameters

inspection_id*Inspection Id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://api.auditmark.io/v1/inspections/497f6eca-6276-4993-bfeb-53cbbbba6f08/intake" \  -H "Content-Type: application/json" \  -d '{    "values": {}  }'
null
{  "detail": [    {      "loc": [        "string"      ],      "msg": "string",      "type": "string",      "input": null,      "ctx": {}    }  ]}