Add, move, or remove repeating section entries
Apply add/remove entry ops to the repeatable roster (2026-07-27 co-inspection repeatable-roster merge design).
Merge-safe replacement for the whole-array PUT: the inspection row is locked
(for update) so concurrent requests serialize, each op lands individually (set
semantics; replays no-op), the merged result is validated against the snapshot with the
same rules the delta PUT applies, and the FULL merged roster is returned for the client
to adopt. Two co-inspectors adding entries concurrently therefore both land, in arrival
order (array order = display order, unchanged).
Scope: a participant with a non-null participants.section_ids may only touch rosters of assigned sections (403 otherwise); an admin or an unscoped participant passes, still subject to the insp_inspector_update / insp_admin_write RLS on the update. The merged roster is written whole ($1::jsonb, computed under the lock), which is race-free here precisely because of the lock; the delta-merge SQL of the legacy PUT is not needed.
Authorization
OrgApiKey Organization API key. Send as Authorization: Bearer <key>. Create one in Admin > Settings > API keys.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://api.auditmark.io/v1/inspections/497f6eca-6276-4993-bfeb-53cbbbba6f08/section-instances/ops" \ -H "Content-Type: application/json" \ -d '{ "ops": [ { "action": "add", "key": "string", "id": 0 } ] }'null{ "detail": [ { "loc": [ "string" ], "msg": "string", "type": "string", "input": null, "ctx": {} } ]}