Post auditscontracts
Write a contract for one agent. agent_id must match the agent id in your telemetry exactly — take it from the agent list rather than typing it, because a name that matches nothing is not rejected and the contract simply never applies. Case and surrounding whitespace are ignored when matching. One contract per agent: writing a second for the same agent is a conflict, not a replacement. The body is Markdown and is stored as written; the response reports which sections were recognised.
Authorizations
A scoped AgentEye API key. Mint one in the dashboard under Settings → API keys, or with POST /v1/keys. Each endpoint names the permission it requires; a key without it gets 403 and a required_permission field naming what was missing.
Body
The agent this contract governs, exactly as it appears in your telemetry. Case and surrounding whitespace are ignored when matching. A name that matches no agent is accepted, so take it from your agent list rather than typing it — otherwise the contract silently never applies.
The contract itself, as Markdown. Stored as written. Optional ---
frontmatter may set purpose and cadence; ## Outputs, ## Done when
and ## Must not headings are recognised as sections. Anything else is
kept and shown to the analysis rather than rejected. Maximum 5,000
characters — a contract is a page stating one agent's job, not a
document.
Whether audits should grade against this contract. Defaults to true on creation, and is left unchanged when omitted on update.
Response
The contract as stored.

