API Reference

The Asqav REST API is available at https://api.asqav.com/api/v1. It provides AI agent governance capabilities including agent lifecycle management, guardrails, behavioral monitoring, compliance reports, incident management, observability, and policy enforcement -- all secured with ML-DSA (FIPS 204) signing.

Full interactive reference in the dashboard

Sign in to your dashboard to explore every endpoint with your live API key pre-filled, response examples specific to your tier, and copy-ready code snippets.

API Reference →

Authentication

All API requests require your API key in the X-API-Key header:

bash
curl https://api.asqav.com/api/v1/agents \
  -H "X-API-Key: sk_live_your_key"

API keys are prefixed with sk_live_ for live keys and sk_test_ for test keys. You can find and rotate your keys in the dashboard under Settings → API.

Getting Started

The typical workflow is: register an agent, issue a signed token, use that token to sign actions, and verify the signature chain later.

1. Register an agent

bash
curl -X POST https://api.asqav.com/api/v1/agents \
  -H "X-API-Key: sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-agent", "algorithm": "ml-dsa-65"}'

# Response
{
  "id": "agent_abc123",
  "name": "my-agent",
  "algorithm": "ml-dsa-65",
  "status": "active"
}

2. Sign an action

bash
curl -X POST https://api.asqav.com/api/v1/agents/agent_abc123/sign \
  -H "X-API-Key: sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"action_type": "api:openai:chat", "context": {"model": "gpt-4", "tokens": 500}}'

# Response
{
  "signature_id": "sig_a1b2c3",
  "action_id": "act_xyz789",
  "signature": "base64-encoded-ml-dsa-signature",
  "timestamp": 1744488600.0,
  "verification_url": "https://api.asqav.com/api/v1/verify/sig_a1b2c3",
  "policy_digest": "sha256:2b1c3d...",
  "policy_decision": "permit",
  "authorization_ref": null
}

policy_digest, policy_decision, and authorization_ref let a third party reconstruct the exact JCS bytes that were signed and re-verify the signature offline. authorization_ref is populated with the approval ID when an approvals-queue approval authorized the action. Otherwise it is null.

Replay protection (nonce, valid_seconds)

POST /agents/{id}/sign accepts two optional fields that bind a signature to a single use and a finite window:

bash
curl -X POST https://api.asqav.com/api/v1/agents/agent_abc123/sign \
  -H "X-API-Key: sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "action_type": "api:openai:chat",
    "context": {"model": "gpt-4"},
    "nonce": "0c2c0d3e-7c6e-4c0a-9c3e-1a2b3c4d5e6f",
    "valid_seconds": 60
  }'

The verify endpoint rejects expired records with the signature_expired label, distinct from invalid_signature. See Proofs for the full label vocabulary.

Or use the Python SDK

python
import asqav

asqav.init(api_key="sk_your_api_key")

# Register agent
agent = asqav.Agent.create("my-agent", algorithm="ml-dsa-65")

# Sign an action
result = agent.sign("api:openai:chat")

Endpoint Reference

All paths are relative to https://api.asqav.com/api/v1. Pass your API key as -H "X-API-Key: sk_live_your_key" on every request.

Free (all plans)

Method Path Description
POST/agentsRegister a new agent
GET/agentsList all agents
GET/agents/{id}Get agent details
PUT/agents/{id}Update agent
DELETE/agents/{id}Revoke agent
POST/agents/{id}/signSign an action
POST/sessionsCreate session
GET/sessionsList sessions
GET/sessions/{id}Get session details
POST/sessions/{id}/actionsLog action in session
POST/tokens/verifyVerify PQC-JWT token
GET/proofsGet audit proofs
GET/proofs/{id}/verifyGet proof details
GET/keysList API keys
POST/keysCreate API key
DELETE/keys/{id}Revoke API key
GET/dashboardDashboard summary
GET/agents/{id}/versionsList agent version history
POST/agents/{id}/decommissionDecommission agent
GET/agents/statsAgent fleet statistics
GET/health/Health check
POST/webhooksCreate webhook
GET/webhooksList webhooks
DELETE/webhooks/{id}Delete webhook
GET/integrations/otelOpenTelemetry config
POST/integrations/otelConfigure OpenTelemetry
GET/ocsp/{agent_id}OCSP revocation check
GET/alertsList alerts
POST/alerts/{id}/acknowledgeAcknowledge alert
POST/agent-groupsCreate agent group
GET/agent-groupsList agent groups
GET/agent-groups/{id}Get group details
PUT/agent-groups/{id}Update agent group
DELETE/agent-groups/{id}Delete agent group
POST/agent-groups/{id}/agents/{agent_id}Add agent to group
DELETE/agent-groups/{id}/agents/{agent_id}Remove agent from group
GET/export/csvExport audit data (CSV)
GET/export/jsonExport audit data (JSON)
POST/monitoring/alert-rulesCreate alert rule
GET/monitoring/alert-rulesList alert rules
PUT/monitoring/alert-rules/{id}Update alert rule
DELETE/monitoring/alert-rules/{id}Delete alert rule
POST/monitoring/rate-limitsSet agent rate limit
GET/monitoring/rate-limitsList rate limits
PUT/monitoring/rate-limits/{agent_id}Update rate limit
DELETE/monitoring/rate-limits/{agent_id}Delete rate limit
GET/monitoring/drift-statusGet behavioral drift status

Observability

Method Path Description
GET/observability/summaryObservability dashboard summary
GET/observability/metricsTime-windowed metrics (1h, 24h, 7d, 30d)
GET/observability/agents/{id}Per-agent metric breakdown
GET/observability/costsCost attribution across agents

Approvals

Method Path Description
POST/approvalsSubmit approval decision
GET/approvalsList approvals

Replay

Method Path Description
GET/signatures/{id}/replayReconstruct signed payload (Replay API)

Guardrails

Method Path Description
GET/scanning/statsGuardrails statistics
GET/scanning/stats/agentsPer-agent scan stats
GET/scanning/results/{signature_id}Get scan result for signature
POST/scanning/patternsCreate custom scan pattern
GET/scanning/patternsList custom scan patterns
GET/scanning/patterns/{id}Get scan pattern
PUT/scanning/patterns/{id}Update scan pattern
DELETE/scanning/patterns/{id}Delete scan pattern

Compliance Reports

Method Path Description
GET/compliance-reports/templatesList available report templates
POST/compliance-reportsGenerate compliance report
GET/compliance-reportsList generated reports
GET/compliance-reports/{id}Get report details
GET/compliance-reports/{id}/downloadDownload report PDF
DELETE/compliance-reports/{id}Delete report

Governance

Method Path Description
POST/governance/querySubmit governance query
GET/governance/query/{id}Get query result (signed)
GET/governance/queryList governance queries
POST/agents/{id}/attestationIssue governance attestation

Enterprise

The endpoint groups below require the Enterprise plan.

Incidents and Escalation

Method Path Description
POST/incidentsCreate incident
POST/incidents/from-alertCreate incident from alert
GET/incidentsList incidents
GET/incidents/summaryIncident summary stats
GET/incidents/{id}Get incident details
PUT/incidents/{id}Update incident
POST/escalation/chainsCreate escalation chain
GET/escalation/chainsList escalation chains
GET/escalation/chains/{id}Get escalation chain
PUT/escalation/chains/{id}Update escalation chain
DELETE/escalation/chains/{id}Delete escalation chain
POST/escalation/chains/{id}/testTest escalation chain

Remediation

Method Path Description
GET/remediation/configGet remediation config
PUT/remediation/configUpdate remediation config
DELETE/remediation/configReset remediation config
GET/remediation/statusGet remediation status overview
POST/agents/{id}/quarantineQuarantine agent
POST/agents/{id}/unquarantineUnquarantine agent

Multi-Party Signing

Method Path Description
POST/signing-groups/configsCreate signing group
GET/signing-groups/configs/{agent_id}Get signing group
PUT/signing-groups/configs/{id}Update signing group
POST/signing-groups/configs/{id}/entitiesAdd entity to signing group
GET/signing-groups/configs/{id}/entitiesList entities
DELETE/signing-groups/entities/{id}Remove entity
POST/signing-groups/sessionsCreate signing session
GET/signing-groups/sessionsList signing sessions
GET/signing-groups/sessions/{id}Get session details
POST/signing-groups/sessions/{id}/approveApprove session
POST/signing-groups/keypairsGenerate keypair
GET/signing-groups/keypairs/{id}Get keypair details
POST/signing-groups/keypairs/{id}/signMulti-party sign
POST/signing-groups/keypairs/{id}/refreshRefresh shares
POST/signing-groups/keypairs/{id}/recoverRecover share
POST/signing-groups/delegationsCreate delegation
GET/signing-groups/delegationsList delegations
DELETE/signing-groups/delegations/{id}Revoke delegation
GET/risk-rulesList risk profiles
POST/risk-rulesCreate risk profile
GET/risk-rules/{id}Get risk profile
PUT/risk-rules/{id}Update risk profile
DELETE/risk-rules/{id}Delete risk profile

KMS, SSO, and access control

Method Path Description
POST/agents/createCreate agent with use_cloud_kms=true (bring-your-own KMS, Enterprise-only)
POST/saml/loginSAML SSO login
POST/ip-allowlistManage IP allowlist
GET/ip-allowlistGet IP allowlist
GET/agents/{id}/sd-jwtIssue SD-JWT selective disclosure credential

What's available by tier

Access to endpoints is gated by your plan. The table below shows which capability groups are included in each tier.

Tier Capabilities
Free Agent management, token issuance & verification, sessions, action signing, agent versioning, audit proofs, integrity verification, agent groups, alert rules and rate limits, alerts, webhooks, OpenTelemetry export, OCSP revocation, OpenTimestamps Bitcoin anchoring, audit data export (CSV/JSON), observability (metrics, cost attribution), Guardrails (content scanning), approvals queue, Replay API, compliance reports (2 per month), governance queries (signed responses), governance attestation
Enterprise Everything in Free, plus incidents & escalation, remediation and quarantine, unlimited compliance reports, multi-party quorum approvals (signing groups), risk profiles, RFC 3161 timestamps, bring-your-own KMS, SSO/SAML, IP allowlist, SD-JWT selective disclosure, support tickets

For the full list of endpoints, request parameters, and response schemas for your tier, open the dashboard API Reference tab.

Error responses

All errors follow a consistent format:

json
{
  "error": {
    "code": "agent_not_found",
    "message": "Agent with ID agent_abc123 not found",
    "status": 404
  }
}
Code Status Description
unauthorized 401 Invalid or missing API key
forbidden 403 Insufficient permissions for your tier
not_found 404 Resource not found
rate_limited 429 Too many requests
agent_revoked 403 Agent has been revoked
quota_exceeded 402 Monthly signature limit reached
no_policy_evaluated_for_action_type 412 compliance_mode=true requires at least one active policy matching the action_type. Register a policy for this action type, or set policy_decision=none with receipt_type=protectmcp:lifecycle to sign an observation receipt that does not assert a policy outcome.
chain_emission_blocked 422 The hash-chain fork guard blocked receipt emission on the signing path. The response body includes a reason field and an errors array with the specific violations.
envelope_not_conformant 422 The receipt envelope failed the IETF conformance gate on the signing path. The response body includes an errors array with the specific conformance violations.

API key scopes

Every API key carries a list of scopes that limit which endpoints it can reach. Pass "scopes": [...] in the POST /api/v1/keys body. Omitting the field (or passing null) gives the key the quickstart default set: agents:read, agents:write, sessions:read. Pass an explicit empty list to create a zero-scope key.

A request that hits a gated endpoint without the matching scope gets a 403 with a structured error body containing required_scope, how_to_fix, and docs_url. The wildcard * scope bypasses all per-resource checks.

Scope Grants Endpoints (path prefix) Default
*Full access, bypasses all scope checksAll
agents:readList and fetch agentsGET /agentsYes
agents:writeCreate, update, delete, and sign agentsPOST/PUT/PATCH/DELETE /agentsYes
sessions:readList and fetch sessionsGET /sessionsYes
sessions:writeCreate, update, and delete sessionsPOST/PUT/PATCH/DELETE /sessions
policies:readRead governance policiesGET /policies
policies:writeCreate and update governance policiesPOST/PUT/PATCH/DELETE /policies
webhooks:readList webhooksGET /webhooks
webhooks:writeCreate, update, and delete webhooksPOST/PUT/PATCH/DELETE /webhooks
alerts:readList alert rules and fired alertsGET /alerts
alerts:writeCreate, update, and delete alert rulesPOST/PUT/PATCH/DELETE /alerts
signing-groups:readList signing groupsGET /signing-groups
signing-groups:writeManage signing groupsPOST/PUT/PATCH/DELETE /signing-groups
compliance-reports:readFetch compliance reportsGET /compliance-reports
compliance-reports:writeGenerate and delete compliance reportsPOST/DELETE /compliance-reports
incidents:readList incidentsGET /incidents
incidents:writeCreate and update incidentsPOST/PUT/PATCH/DELETE /incidents
approvals:readList approval requestsGET /approvals
approvals:writeSubmit approvalsPOST/PUT /approvals
scanning:readRead Guardrails scan resultsGET /scanning
scanning:writeRun and configure Guardrails scansPOST/PUT/DELETE /scanning
integrations:readList integration configurationsGET /integrations
integrations:writeCreate and update integrationsPOST/PUT/DELETE /integrations
export:readDownload audit data exportsGET /export
ip-allowlist:readList IP allowlist entriesGET /ip-allowlist
ip-allowlist:writeAdd and remove IP allowlist entriesPOST/DELETE /ip-allowlist
governance:readRun read-only governance queriesGET /governance
governance:writeSubmit governance actionsPOST /governance
signatures:replaySubmit replay requestsPOST /signatures
api-keys:readList API keys for the orgGET /keys
api-keys:writeCreate, update, and revoke API keysPOST/PATCH/PUT/DELETE /keys
organizations:readRead org settings and member listGET /orgs, GET /invitations
organizations:adminChange org settings, invite and remove membersPOST/PATCH/PUT/DELETE /orgs, POST/DELETE /invitations
tokens:readAccepted on key creation, reserved for token-query routes (token verification is public and requires no scope)
tokens:writeAccepted on key creation, reserved for token-issuance routes (none live yet)
proofs:readFetch audit proofsGET /proofs
proofs:writeSubmit proof requestsPOST /proofs
observability:readRead observability metricsGET /observability
monitoring:readRead monitoring dataGET /monitoring
monitoring:writeConfigure monitoring rulesPOST/PUT/DELETE /monitoring
reports:readFetch reportsGET /reports
reports:writeGenerate and delete reportsPOST/DELETE /reports
remediation:readList remediation actionsGET /remediation
remediation:writeApply and close remediation actionsPOST/PUT/DELETE /remediation
escalation:readList escalation recordsGET /escalation
escalation:writeCreate and update escalationsPOST/PUT/DELETE /escalation
risk-rules:readList risk rulesGET /risk-rules
risk-rules:writeCreate and update risk rulesPOST/PUT/DELETE /risk-rules
attestation:readRead governance attestation recordsGET /attestation
attestation:writeSubmit governance attestationsPOST /attestation
audit-pack:readDownload audit pack bundlesGET /audit-pack

Rate limits

Tier Requests / min
Free 60
Enterprise 1,000