Skip to main content
POST
Delete the caller's own drafts that a just-written review record consumed

Authorizations

Authorization
string
header
required

MeshQu API key passed as a bearer token: Authorization: Bearer mqu_…. Mint one in the console (Settings → API keys).

X-MeshQu-Tenant-Id
string
header
required

Tenant UUID for multi-tenant isolation. Required on all authenticated routes — validated before authentication (middleware/tenant.ts), so a missing or non-UUID header returns 400 (MISSING_TENANT_ID / INVALID_TENANT_ID) before the API key is checked.

Path Parameters

id
string<uuid>
required

Policy id. The submission must belong to it, or the request is a 404.

submissionId
string<uuid>
required

The sealed submission the note is about. This is the review IDENTITY — not the policy version, which is a mutable container that yields many sealed subjects over time.

Body

application/json

Deletes the caller's own drafts that a just-written review record consumed. RECORDS that the owner is done with these notes now that they have become part of an immutable record. DOES NOT ESTABLISH anything about the record itself — it is already written and immutable by the time this route is ever called, and this route cannot touch it.

Deletes the caller's own drafts that a just-written review record consumed. RECORDS that the owner is done with these notes now that they have become part of an immutable record. DOES NOT ESTABLISH anything about the record itself — it is already written and immutable by the time this route is ever called, and this route cannot touch it.

review_record_id
string<uuid>
required

The id POST …/review-record returned. Read-only: this route reads meshqu.review_records to confirm the record exists for THIS submission and that every id below is really one of its items — it never writes to that table, and nothing about the record changes because of this call.

ids
string[]
required

The draft ids to delete — the same ids the reviewer submitted as finding/correction item ids, because contract §5 fixes them as one and the same string. Every id must name an item of the record above, or the request is refused 422 naming the one that does not, and NOTHING is deleted — not the ids that did resolve, either.

Minimum array length: 1
Required string length: 1 - 200
Pattern: ^[A-Za-z0-9._:-]{1,200}$

Response

The named drafts are gone. Nothing in the review record they became is touched — this route never writes to meshqu.review_records — and a draft NOT named here (one the reviewer did not submit, or already discarded) is untouched too.

The named drafts are gone. Nothing in the review record they became is touched — this route never writes to meshqu.review_records — and a draft NOT named here (one the reviewer did not submit, or already discarded) is untouched too.

review_record_id
string<uuid>
required
ids
string[]
required

The ids that were actually deleted, as the DELETE reported them — NOT an echo of the request. Every id the request named either resolved to a draft of the record (and was removed) or named no existing draft at all (already consumed by an earlier call, or separately discarded by its owner), in which case it is absent here. There is no partial refusal: an id that is not an item of the record is 422 and nothing is deleted. Order is the database's, not the request's.

deleted
integer
required

The length of ids above — the same answer counted, never a second one.

Required range: x >= 0