curl --request POST \
--url https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-MeshQu-Tenant-Id: <api-key>' \
--data '
{
"expected_revision": 1,
"rules": [
{
"code": "<string>",
"name": "<string>",
"rule_type": "presence",
"condition": {
"required_fields": [
"<string>"
],
"forbidden_fields": [
"<string>"
],
"min_length": {}
},
"severity": "low",
"description": "<string>",
"is_active": true,
"when": {
"field": "<string>",
"equals": "<string>",
"case_sensitive": true
},
"source_ref": {
"document": "<string>",
"section": "<string>",
"url": "<string>"
},
"replaces_rule_code": "<string>"
}
],
"change_reason": "<string>"
}
'import requests
url = "https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede"
payload = {
"expected_revision": 1,
"rules": [
{
"code": "<string>",
"name": "<string>",
"rule_type": "presence",
"condition": {
"required_fields": ["<string>"],
"forbidden_fields": ["<string>"],
"min_length": {}
},
"severity": "low",
"description": "<string>",
"is_active": True,
"when": {
"field": "<string>",
"equals": "<string>",
"case_sensitive": True
},
"source_ref": {
"document": "<string>",
"section": "<string>",
"url": "<string>"
},
"replaces_rule_code": "<string>"
}
],
"change_reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"X-MeshQu-Tenant-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-MeshQu-Tenant-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
expected_revision: 1,
rules: [
{
code: '<string>',
name: '<string>',
rule_type: 'presence',
condition: {required_fields: ['<string>'], forbidden_fields: ['<string>'], min_length: {}},
severity: 'low',
description: '<string>',
is_active: true,
when: {field: '<string>', equals: '<string>', case_sensitive: true},
source_ref: {document: '<string>', section: '<string>', url: '<string>'},
replaces_rule_code: '<string>'
}
],
change_reason: '<string>'
})
};
fetch('https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_revision' => 1,
'rules' => [
[
'code' => '<string>',
'name' => '<string>',
'rule_type' => 'presence',
'condition' => [
'required_fields' => [
'<string>'
],
'forbidden_fields' => [
'<string>'
],
'min_length' => [
]
],
'severity' => 'low',
'description' => '<string>',
'is_active' => true,
'when' => [
'field' => '<string>',
'equals' => '<string>',
'case_sensitive' => true
],
'source_ref' => [
'document' => '<string>',
'section' => '<string>',
'url' => '<string>'
],
'replaces_rule_code' => '<string>'
]
],
'change_reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-MeshQu-Tenant-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede"
payload := strings.NewReader("{\n \"expected_revision\": 1,\n \"rules\": [\n {\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"rule_type\": \"presence\",\n \"condition\": {\n \"required_fields\": [\n \"<string>\"\n ],\n \"forbidden_fields\": [\n \"<string>\"\n ],\n \"min_length\": {}\n },\n \"severity\": \"low\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"when\": {\n \"field\": \"<string>\",\n \"equals\": \"<string>\",\n \"case_sensitive\": true\n },\n \"source_ref\": {\n \"document\": \"<string>\",\n \"section\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"replaces_rule_code\": \"<string>\"\n }\n ],\n \"change_reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-MeshQu-Tenant-Id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede")
.header("Authorization", "Bearer <token>")
.header("X-MeshQu-Tenant-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 1,\n \"rules\": [\n {\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"rule_type\": \"presence\",\n \"condition\": {\n \"required_fields\": [\n \"<string>\"\n ],\n \"forbidden_fields\": [\n \"<string>\"\n ],\n \"min_length\": {}\n },\n \"severity\": \"low\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"when\": {\n \"field\": \"<string>\",\n \"equals\": \"<string>\",\n \"case_sensitive\": true\n },\n \"source_ref\": {\n \"document\": \"<string>\",\n \"section\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"replaces_rule_code\": \"<string>\"\n }\n ],\n \"change_reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-MeshQu-Tenant-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_revision\": 1,\n \"rules\": [\n {\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"rule_type\": \"presence\",\n \"condition\": {\n \"required_fields\": [\n \"<string>\"\n ],\n \"forbidden_fields\": [\n \"<string>\"\n ],\n \"min_length\": {}\n },\n \"severity\": \"low\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"when\": {\n \"field\": \"<string>\",\n \"equals\": \"<string>\",\n \"case_sensitive\": true\n },\n \"source_ref\": {\n \"document\": \"<string>\",\n \"section\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"replaces_rule_code\": \"<string>\"\n }\n ],\n \"change_reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"replaced": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"policy_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"draft_revision": 1,
"is_active": true,
"status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"change_reason": "<string>",
"ratified_by": "<string>",
"ratified_at": "2023-11-07T05:31:56Z",
"submitted_by": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"rejected_by": "<string>",
"rejected_at": "2023-11-07T05:31:56Z",
"rejection_reason": "<string>",
"closed_at": "2023-11-07T05:31:56Z",
"closed_by": "<string>",
"closed_reason": "<string>",
"codification_record": {
"schema": "meshqu-codification-record/v1",
"source": {
"document": "<string>",
"url": "<string>"
},
"clauses": [
{
"unit_id": "<string>",
"locator": "<string>",
"text": "<string>"
}
],
"ledger": [
{
"unit_id": "<string>",
"disposition": "mapped",
"note": "<string>"
}
],
"counts": {
"clauses": 123,
"mapped": 123,
"ambiguous": 123,
"unsupported": 123,
"non_normative": 123,
"refused": 123
},
"refusals": [
{
"unit_id": "<string>",
"rule_code": "<string>",
"kind": "<string>",
"message": "<string>"
}
],
"lint": {
"schema": "meshqu-codification-lint/v1",
"status": "ran",
"answerer": "jev",
"questions_version": "<string>",
"floor": 123,
"clauses": [
{
"unit_id": "<string>",
"findings": [
{
"code": "guidance_as_obligation",
"message": "<string>",
"evidence": {
"confidence": 123
}
}
],
"needs_context": true
}
],
"reason": "<string>",
"model": "<string>",
"elapsed_ms": 123
}
}
},
"draft": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"policy_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"draft_revision": 1,
"rules": [
{
"code": "<string>",
"name": "<string>",
"rule_type": "presence",
"condition": {
"required_fields": [
"<string>"
],
"forbidden_fields": [
"<string>"
],
"min_length": {}
},
"severity": "low",
"description": "<string>",
"is_active": true,
"when": {
"field": "<string>",
"equals": "<string>",
"case_sensitive": true
},
"source_ref": {
"document": "<string>",
"section": "<string>",
"url": "<string>"
},
"replaces_rule_code": "<string>"
}
],
"is_active": true,
"status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"change_reason": "<string>",
"ratified_by": "<string>",
"ratified_at": "2023-11-07T05:31:56Z",
"submitted_by": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"rejected_by": "<string>",
"rejected_at": "2023-11-07T05:31:56Z",
"rejection_reason": "<string>",
"closed_at": "2023-11-07T05:31:56Z",
"closed_by": "<string>",
"closed_reason": "<string>",
"codification_record": {
"schema": "meshqu-codification-record/v1",
"source": {
"document": "<string>",
"url": "<string>"
},
"clauses": [
{
"unit_id": "<string>",
"locator": "<string>",
"text": "<string>"
}
],
"ledger": [
{
"unit_id": "<string>",
"disposition": "mapped",
"note": "<string>"
}
],
"counts": {
"clauses": 123,
"mapped": 123,
"ambiguous": 123,
"unsupported": 123,
"non_normative": 123,
"refused": 123
},
"refusals": [
{
"unit_id": "<string>",
"rule_code": "<string>",
"kind": "<string>",
"message": "<string>"
}
],
"lint": {
"schema": "meshqu-codification-lint/v1",
"status": "ran",
"answerer": "jev",
"questions_version": "<string>",
"floor": 123,
"clauses": [
{
"unit_id": "<string>",
"findings": [
{
"code": "guidance_as_obligation",
"message": "<string>",
"evidence": {
"confidence": 123
}
}
],
"needs_context": true
}
],
"reason": "<string>",
"model": "<string>",
"elapsed_ms": 123
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}Supersede a draft with a corrected draft
Corrects a pending DRAFT without overwriting it. The draft is closed with status “replaced” — kept as history exactly as it was, codification record and lint findings included — and the corrected rules become a NEW draft, created through the same path as version creation (an optional codification block is codified and linted afresh). expected_revision is the old draft’s draft_revision; a concurrent autosave either lands first (this is refused STALE_DRAFT_REVISION) or finds the draft replaced (it is refused). Ordinary autosave edits stay in place (PATCH). Human-only. Refusals: 404 NOT_FOUND (policy or version not in this tenant); 409 INVALID_TRANSITION with details.reason — VERSION_NOT_DRAFT, VERSION_BOUND_TO_CAPABILITY (set it aside instead); 409 STALE_DRAFT_REVISION with the current candidate; 422 VALIDATION_ERROR / UNSUPPORTED_RULE_TYPE / CODIFICATION_REFUSED.
curl --request POST \
--url https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-MeshQu-Tenant-Id: <api-key>' \
--data '
{
"expected_revision": 1,
"rules": [
{
"code": "<string>",
"name": "<string>",
"rule_type": "presence",
"condition": {
"required_fields": [
"<string>"
],
"forbidden_fields": [
"<string>"
],
"min_length": {}
},
"severity": "low",
"description": "<string>",
"is_active": true,
"when": {
"field": "<string>",
"equals": "<string>",
"case_sensitive": true
},
"source_ref": {
"document": "<string>",
"section": "<string>",
"url": "<string>"
},
"replaces_rule_code": "<string>"
}
],
"change_reason": "<string>"
}
'import requests
url = "https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede"
payload = {
"expected_revision": 1,
"rules": [
{
"code": "<string>",
"name": "<string>",
"rule_type": "presence",
"condition": {
"required_fields": ["<string>"],
"forbidden_fields": ["<string>"],
"min_length": {}
},
"severity": "low",
"description": "<string>",
"is_active": True,
"when": {
"field": "<string>",
"equals": "<string>",
"case_sensitive": True
},
"source_ref": {
"document": "<string>",
"section": "<string>",
"url": "<string>"
},
"replaces_rule_code": "<string>"
}
],
"change_reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"X-MeshQu-Tenant-Id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-MeshQu-Tenant-Id': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
expected_revision: 1,
rules: [
{
code: '<string>',
name: '<string>',
rule_type: 'presence',
condition: {required_fields: ['<string>'], forbidden_fields: ['<string>'], min_length: {}},
severity: 'low',
description: '<string>',
is_active: true,
when: {field: '<string>', equals: '<string>', case_sensitive: true},
source_ref: {document: '<string>', section: '<string>', url: '<string>'},
replaces_rule_code: '<string>'
}
],
change_reason: '<string>'
})
};
fetch('https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'expected_revision' => 1,
'rules' => [
[
'code' => '<string>',
'name' => '<string>',
'rule_type' => 'presence',
'condition' => [
'required_fields' => [
'<string>'
],
'forbidden_fields' => [
'<string>'
],
'min_length' => [
]
],
'severity' => 'low',
'description' => '<string>',
'is_active' => true,
'when' => [
'field' => '<string>',
'equals' => '<string>',
'case_sensitive' => true
],
'source_ref' => [
'document' => '<string>',
'section' => '<string>',
'url' => '<string>'
],
'replaces_rule_code' => '<string>'
]
],
'change_reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-MeshQu-Tenant-Id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede"
payload := strings.NewReader("{\n \"expected_revision\": 1,\n \"rules\": [\n {\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"rule_type\": \"presence\",\n \"condition\": {\n \"required_fields\": [\n \"<string>\"\n ],\n \"forbidden_fields\": [\n \"<string>\"\n ],\n \"min_length\": {}\n },\n \"severity\": \"low\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"when\": {\n \"field\": \"<string>\",\n \"equals\": \"<string>\",\n \"case_sensitive\": true\n },\n \"source_ref\": {\n \"document\": \"<string>\",\n \"section\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"replaces_rule_code\": \"<string>\"\n }\n ],\n \"change_reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-MeshQu-Tenant-Id", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede")
.header("Authorization", "Bearer <token>")
.header("X-MeshQu-Tenant-Id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"expected_revision\": 1,\n \"rules\": [\n {\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"rule_type\": \"presence\",\n \"condition\": {\n \"required_fields\": [\n \"<string>\"\n ],\n \"forbidden_fields\": [\n \"<string>\"\n ],\n \"min_length\": {}\n },\n \"severity\": \"low\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"when\": {\n \"field\": \"<string>\",\n \"equals\": \"<string>\",\n \"case_sensitive\": true\n },\n \"source_ref\": {\n \"document\": \"<string>\",\n \"section\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"replaces_rule_code\": \"<string>\"\n }\n ],\n \"change_reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meshqu.com/v1/policies/{id}/versions/{version}/supersede")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-MeshQu-Tenant-Id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_revision\": 1,\n \"rules\": [\n {\n \"code\": \"<string>\",\n \"name\": \"<string>\",\n \"rule_type\": \"presence\",\n \"condition\": {\n \"required_fields\": [\n \"<string>\"\n ],\n \"forbidden_fields\": [\n \"<string>\"\n ],\n \"min_length\": {}\n },\n \"severity\": \"low\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"when\": {\n \"field\": \"<string>\",\n \"equals\": \"<string>\",\n \"case_sensitive\": true\n },\n \"source_ref\": {\n \"document\": \"<string>\",\n \"section\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"replaces_rule_code\": \"<string>\"\n }\n ],\n \"change_reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"replaced": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"policy_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"draft_revision": 1,
"is_active": true,
"status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"change_reason": "<string>",
"ratified_by": "<string>",
"ratified_at": "2023-11-07T05:31:56Z",
"submitted_by": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"rejected_by": "<string>",
"rejected_at": "2023-11-07T05:31:56Z",
"rejection_reason": "<string>",
"closed_at": "2023-11-07T05:31:56Z",
"closed_by": "<string>",
"closed_reason": "<string>",
"codification_record": {
"schema": "meshqu-codification-record/v1",
"source": {
"document": "<string>",
"url": "<string>"
},
"clauses": [
{
"unit_id": "<string>",
"locator": "<string>",
"text": "<string>"
}
],
"ledger": [
{
"unit_id": "<string>",
"disposition": "mapped",
"note": "<string>"
}
],
"counts": {
"clauses": 123,
"mapped": 123,
"ambiguous": 123,
"unsupported": 123,
"non_normative": 123,
"refused": 123
},
"refusals": [
{
"unit_id": "<string>",
"rule_code": "<string>",
"kind": "<string>",
"message": "<string>"
}
],
"lint": {
"schema": "meshqu-codification-lint/v1",
"status": "ran",
"answerer": "jev",
"questions_version": "<string>",
"floor": 123,
"clauses": [
{
"unit_id": "<string>",
"findings": [
{
"code": "guidance_as_obligation",
"message": "<string>",
"evidence": {
"confidence": 123
}
}
],
"needs_context": true
}
],
"reason": "<string>",
"model": "<string>",
"elapsed_ms": 123
}
}
},
"draft": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"policy_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"draft_revision": 1,
"rules": [
{
"code": "<string>",
"name": "<string>",
"rule_type": "presence",
"condition": {
"required_fields": [
"<string>"
],
"forbidden_fields": [
"<string>"
],
"min_length": {}
},
"severity": "low",
"description": "<string>",
"is_active": true,
"when": {
"field": "<string>",
"equals": "<string>",
"case_sensitive": true
},
"source_ref": {
"document": "<string>",
"section": "<string>",
"url": "<string>"
},
"replaces_rule_code": "<string>"
}
],
"is_active": true,
"status": "draft",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"change_reason": "<string>",
"ratified_by": "<string>",
"ratified_at": "2023-11-07T05:31:56Z",
"submitted_by": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"rejected_by": "<string>",
"rejected_at": "2023-11-07T05:31:56Z",
"rejection_reason": "<string>",
"closed_at": "2023-11-07T05:31:56Z",
"closed_by": "<string>",
"closed_reason": "<string>",
"codification_record": {
"schema": "meshqu-codification-record/v1",
"source": {
"document": "<string>",
"url": "<string>"
},
"clauses": [
{
"unit_id": "<string>",
"locator": "<string>",
"text": "<string>"
}
],
"ledger": [
{
"unit_id": "<string>",
"disposition": "mapped",
"note": "<string>"
}
],
"counts": {
"clauses": 123,
"mapped": 123,
"ambiguous": 123,
"unsupported": 123,
"non_normative": 123,
"refused": 123
},
"refusals": [
{
"unit_id": "<string>",
"rule_code": "<string>",
"kind": "<string>",
"message": "<string>"
}
],
"lint": {
"schema": "meshqu-codification-lint/v1",
"status": "ran",
"answerer": "jev",
"questions_version": "<string>",
"floor": 123,
"clauses": [
{
"unit_id": "<string>",
"findings": [
{
"code": "guidance_as_obligation",
"message": "<string>",
"evidence": {
"confidence": 123
}
}
],
"needs_context": true
}
],
"reason": "<string>",
"model": "<string>",
"elapsed_ms": 123
}
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
},
"correlation_id": "<string>"
}Authorizations
MeshQu API key passed as a bearer token: Authorization: Bearer mqu_…. Mint one in the console (Settings → API keys).
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.
Body
The draft_revision of the draft being superseded, as last read. A stale value is refused 409 STALE_DRAFT_REVISION.
x >= 01Show child attributes
Show child attributes
500Optional. 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.
Show child attributes
Show child attributes