← Developers

API Reference

The endpoint map, request conventions, and error model. For the live, always-current version of this reference, see the link at the bottom.

Endpoints

POST/v1/agentsRegister a new agent identity.
POST/v1/agents/{id}/activateActivate a registered agent.
POST/v1/agents/{id}/rotate-keysRotate an agent's signing certificate.
POST/v1/agents/{id}/retirePermanently retire an agent.
POST/v1/intentsSubmit a signed Intent for evaluation.
GET/v1/decisions/{id}Retrieve a decision, including Human Review resolution once resolved.
POST/v1/decisions/{id}/resolveResolve a decision pending Human Review.
GET/v1/evidenceList evidence records.
POST/v1/evidence/{id}/verifyVerify an evidence record's signature.
GET/v1/principalsList principals in the Authority Graph.

Headers

Every request needs exactly one of the four credentials covered in Authentication:

one of
X-PayReality-Operator-Key: <operator_key>
Authorization: Bearer <session_token_or_api_key>
X-PayReality-Key-Id: <certificate_id>              # + X-PayReality-Signature, for agent-signed calls

Schemas

Request and response bodies are JSON. The Intent, Decision, Agent, and Evidence shapes are covered with full examples on their own pages: Runtime API, Agent Registration, and Evidence Verification.

Status codes

CodeMeaning
200Request succeeded. For /v1/intents, this includes Deny and Human Review -- the platform successfully evaluated the request.
401Missing, invalid, or unverifiable signature/credential.
403Authenticated, but the credential's role lacks the required permission.
404The referenced resource (agent, decision, evidence record) doesn't exist.
422The request body failed validation before evaluation was attempted.
429Rate limited.
5xxThe platform failed to complete evaluation. Safe to retry with backoff.

Errors

error response shape
{
  "error": {
    "code": "invalid_signature",
    "message": "Signature verification failed for the provided key_id."
  }
}

error.code is stable and intended to be matched on in code; error.message is for humans and may change wording between releases.

Pagination

List endpoints (/v1/evidence, /v1/principals) accept limit and offset query parameters; responses include a total count alongside the page of results.

Versioning

The /v1 prefix is the API version. A breaking change ships as /v2, not a silent change to /v1 -- existing integrations are never broken by a new version shipping alongside them.

For the live, interactive, always-current reference generated directly from the running platform, see https://api.aisecurewatch.com/docs.