Put auditscontracts
Replace a contract. This is a full replacement, not a merge: the agent id and body are set to exactly what you send. Editing a contract changes what future audits expect; findings already raised keep referring to the text that was in force when they were raised.
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.
Path Parameters
The contract's id.
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.

