Draft a fix proposal
const url = 'https://example.com/v1/proposals';const options = { method: 'POST', headers: { 'X-Supervisor-Id': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"agentId":"example","agentVersion":"example","tier":"prompt","change":{},"patternRefs":[{"kind":"guardrail-violation","key":"example","count":1,"firstSeenAt":"2026-04-15T12:00:00Z","lastSeenAt":"2026-04-15T12:00:00Z","sampleConversations":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]}],"hypothesis":"example","proposerRuleId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/proposals \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Supervisor-Id: example' \ --data '{ "agentId": "example", "agentVersion": "example", "tier": "prompt", "change": {}, "patternRefs": [ { "kind": "guardrail-violation", "key": "example", "count": 1, "firstSeenAt": "2026-04-15T12:00:00Z", "lastSeenAt": "2026-04-15T12:00:00Z", "sampleConversations": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] } ], "hypothesis": "example", "proposerRuleId": "example" }'Inserts a new proposal in draft state. Duplicate proposals (same (supervisor, fingerprint) non-terminal) short-circuit to the pre-existing row and mark the response with X-Proposal-Deduped: true.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”SupervisorId scoping this request. Every /v1/proposals route requires this header — proposals are supervisor-owned, and the API does not derive supervisor scope from the token.
Caller-supplied idempotency key. Retries with the same key return the original response byte-identical (per docs/API-ROUTE-CONVENTIONS.md §3.1).
Request Bodyrequired
Section titled “Request Bodyrequired”Draft a fix proposal for (agentId, agentVersion). The supervisor context comes from the X-Supervisor-Id header; the caller supplies the target agent + change payload + supporting evidence. Duplicate proposals (same (supervisor, fingerprint) in a non-terminal state) short-circuit to the pre-existing row and set X-Proposal-Deduped: true on the response.
object
Polymorphic change payload. Shape depends on the sibling tier on the proposal (prompt / retrieval / tool-config).
object
object
Responses
Section titled “Responses”Proposal drafted (or deduped).
object
FixProposalId.
Semver of the baseline agent version.
Polymorphic change payload. Shape depends on the sibling tier on the proposal (prompt / retrieval / tool-config).
object
object
Sha256(tier + agentId + agentVersion + canonical(change)). Dedup key.
HITL approval id created when the proposal was submitted for review.
Semver of the new agent version the proposal materialized as. Present on applied and rolled-back proposals.
Example
{ "tier": "prompt", "patternRefs": [ { "kind": "guardrail-violation" } ], "status": "draft"}Malformed request body.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Missing / malformed / expired / revoked bearer token.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Idempotency-Key was reused with a different body, or resource-state conflict.
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}Server error (unmapped domain code or framework crash).
object
object
Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).
Optional, kind-specific.
object
Server-assigned request id; also echoed via X-Request-Id header.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": {}, "requestId": "example" }}