Skip to main content
POST
Supersede a draft with a corrected draft

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
version
integer
required
Required range: x >= 1

Body

application/json
expected_revision
integer
required

The draft_revision of the draft being superseded, as last read. A stale value is refused 409 STALE_DRAFT_REVISION.

Required range: x >= 0
rules
object[]
required
Minimum array length: 1
change_reason
string
Maximum string length: 500
codification
object

Optional. When present, the stored rules are the ones codify() returns — including source_ref, which codify() derives from the declared clause and does not take from the caller — not the ones submitted. See packages/meshqu-core/src/codification.ts.

Response

Default Response

replaced
object
required

The closed version, rules omitted (unchanged; GET the version to read them).

draft
object
required