Audits
Restore a draft audit's sections and questions from a snapshot
Atomically replaces a DRAFT audit's sections and questions with a previously captured snapshot, used to cancel in-progress edits. Requires the Auditor or Audit Manager role.
Authorization
SupabaseBearer AuthorizationBearer <token>
Supabase user access token (Authorization: Bearer JWT)
In: header
Path Parameters
id*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/audits/497f6eca-6276-4993-bfeb-53cbbbba6f08/restore-structure" \ -H "Content-Type: application/json" \ -d '{ "sections": [ { "title": "string", "order_index": 0, "questions": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "question_text": "string", "question_type": "YES_NO", "is_required": true, "evidence_required": true, "response_options": [ "string" ], "order_index": 0 } ] } ] }'Empty
Empty
Empty
{ "message": "string"}