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.
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:
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
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
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:
nonce: opaque per-agent unique token, max 128 chars. Re-using the same(agent_id, nonce)pair is rejected, so a captured request body cannot be replayed.valid_seconds: validity window. Setsvalid_until = signed_at + valid_seconds, clamped to1..31_536_000.
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
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 | /agents | Register a new agent |
GET | /agents | List all agents |
GET | /agents/{id} | Get agent details |
PUT | /agents/{id} | Update agent |
DELETE | /agents/{id} | Revoke agent |
POST | /agents/{id}/sign | Sign an action |
POST | /sessions | Create session |
GET | /sessions | List sessions |
GET | /sessions/{id} | Get session details |
POST | /sessions/{id}/actions | Log action in session |
POST | /tokens/verify | Verify PQC-JWT token |
GET | /proofs | Get audit proofs |
GET | /proofs/{id}/verify | Get proof details |
GET | /keys | List API keys |
POST | /keys | Create API key |
DELETE | /keys/{id} | Revoke API key |
GET | /dashboard | Dashboard summary |
GET | /agents/{id}/versions | List agent version history |
POST | /agents/{id}/decommission | Decommission agent |
GET | /agents/stats | Agent fleet statistics |
GET | /health/ | Health check |
POST | /webhooks | Create webhook |
GET | /webhooks | List webhooks |
DELETE | /webhooks/{id} | Delete webhook |
GET | /integrations/otel | OpenTelemetry config |
POST | /integrations/otel | Configure OpenTelemetry |
GET | /ocsp/{agent_id} | OCSP revocation check |
GET | /alerts | List alerts |
POST | /alerts/{id}/acknowledge | Acknowledge alert |
POST | /agent-groups | Create agent group |
GET | /agent-groups | List 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/csv | Export audit data (CSV) |
GET | /export/json | Export audit data (JSON) |
POST | /monitoring/alert-rules | Create alert rule |
GET | /monitoring/alert-rules | List alert rules |
PUT | /monitoring/alert-rules/{id} | Update alert rule |
DELETE | /monitoring/alert-rules/{id} | Delete alert rule |
POST | /monitoring/rate-limits | Set agent rate limit |
GET | /monitoring/rate-limits | List rate limits |
PUT | /monitoring/rate-limits/{agent_id} | Update rate limit |
DELETE | /monitoring/rate-limits/{agent_id} | Delete rate limit |
GET | /monitoring/drift-status | Get behavioral drift status |
Observability
| Method | Path | Description |
|---|---|---|
GET | /observability/summary | Observability dashboard summary |
GET | /observability/metrics | Time-windowed metrics (1h, 24h, 7d, 30d) |
GET | /observability/agents/{id} | Per-agent metric breakdown |
GET | /observability/costs | Cost attribution across agents |
Approvals
| Method | Path | Description |
|---|---|---|
POST | /approvals | Submit approval decision |
GET | /approvals | List approvals |
Replay
| Method | Path | Description |
|---|---|---|
GET | /signatures/{id}/replay | Reconstruct signed payload (Replay API) |
Guardrails
| Method | Path | Description |
|---|---|---|
GET | /scanning/stats | Guardrails statistics |
GET | /scanning/stats/agents | Per-agent scan stats |
GET | /scanning/results/{signature_id} | Get scan result for signature |
POST | /scanning/patterns | Create custom scan pattern |
GET | /scanning/patterns | List 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/templates | List available report templates |
POST | /compliance-reports | Generate compliance report |
GET | /compliance-reports | List generated reports |
GET | /compliance-reports/{id} | Get report details |
GET | /compliance-reports/{id}/download | Download report PDF |
DELETE | /compliance-reports/{id} | Delete report |
Governance
| Method | Path | Description |
|---|---|---|
POST | /governance/query | Submit governance query |
GET | /governance/query/{id} | Get query result (signed) |
GET | /governance/query | List governance queries |
POST | /agents/{id}/attestation | Issue governance attestation |
Enterprise
The endpoint groups below require the Enterprise plan.
Incidents and Escalation
| Method | Path | Description |
|---|---|---|
POST | /incidents | Create incident |
POST | /incidents/from-alert | Create incident from alert |
GET | /incidents | List incidents |
GET | /incidents/summary | Incident summary stats |
GET | /incidents/{id} | Get incident details |
PUT | /incidents/{id} | Update incident |
POST | /escalation/chains | Create escalation chain |
GET | /escalation/chains | List 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}/test | Test escalation chain |
Remediation
| Method | Path | Description |
|---|---|---|
GET | /remediation/config | Get remediation config |
PUT | /remediation/config | Update remediation config |
DELETE | /remediation/config | Reset remediation config |
GET | /remediation/status | Get remediation status overview |
POST | /agents/{id}/quarantine | Quarantine agent |
POST | /agents/{id}/unquarantine | Unquarantine agent |
Multi-Party Signing
| Method | Path | Description |
|---|---|---|
POST | /signing-groups/configs | Create signing group |
GET | /signing-groups/configs/{agent_id} | Get signing group |
PUT | /signing-groups/configs/{id} | Update signing group |
POST | /signing-groups/configs/{id}/entities | Add entity to signing group |
GET | /signing-groups/configs/{id}/entities | List entities |
DELETE | /signing-groups/entities/{id} | Remove entity |
POST | /signing-groups/sessions | Create signing session |
GET | /signing-groups/sessions | List signing sessions |
GET | /signing-groups/sessions/{id} | Get session details |
POST | /signing-groups/sessions/{id}/approve | Approve session |
POST | /signing-groups/keypairs | Generate keypair |
GET | /signing-groups/keypairs/{id} | Get keypair details |
POST | /signing-groups/keypairs/{id}/sign | Multi-party sign |
POST | /signing-groups/keypairs/{id}/refresh | Refresh shares |
POST | /signing-groups/keypairs/{id}/recover | Recover share |
POST | /signing-groups/delegations | Create delegation |
GET | /signing-groups/delegations | List delegations |
DELETE | /signing-groups/delegations/{id} | Revoke delegation |
GET | /risk-rules | List risk profiles |
POST | /risk-rules | Create 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/create | Create agent with use_cloud_kms=true (bring-your-own KMS, Enterprise-only) |
POST | /saml/login | SAML SSO login |
POST | /ip-allowlist | Manage IP allowlist |
GET | /ip-allowlist | Get IP allowlist |
GET | /agents/{id}/sd-jwt | Issue 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:
{
"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 checks | All | |
agents:read | List and fetch agents | GET /agents | Yes |
agents:write | Create, update, delete, and sign agents | POST/PUT/PATCH/DELETE /agents | Yes |
sessions:read | List and fetch sessions | GET /sessions | Yes |
sessions:write | Create, update, and delete sessions | POST/PUT/PATCH/DELETE /sessions | |
policies:read | Read governance policies | GET /policies | |
policies:write | Create and update governance policies | POST/PUT/PATCH/DELETE /policies | |
webhooks:read | List webhooks | GET /webhooks | |
webhooks:write | Create, update, and delete webhooks | POST/PUT/PATCH/DELETE /webhooks | |
alerts:read | List alert rules and fired alerts | GET /alerts | |
alerts:write | Create, update, and delete alert rules | POST/PUT/PATCH/DELETE /alerts | |
signing-groups:read | List signing groups | GET /signing-groups | |
signing-groups:write | Manage signing groups | POST/PUT/PATCH/DELETE /signing-groups | |
compliance-reports:read | Fetch compliance reports | GET /compliance-reports | |
compliance-reports:write | Generate and delete compliance reports | POST/DELETE /compliance-reports | |
incidents:read | List incidents | GET /incidents | |
incidents:write | Create and update incidents | POST/PUT/PATCH/DELETE /incidents | |
approvals:read | List approval requests | GET /approvals | |
approvals:write | Submit approvals | POST/PUT /approvals | |
scanning:read | Read Guardrails scan results | GET /scanning | |
scanning:write | Run and configure Guardrails scans | POST/PUT/DELETE /scanning | |
integrations:read | List integration configurations | GET /integrations | |
integrations:write | Create and update integrations | POST/PUT/DELETE /integrations | |
export:read | Download audit data exports | GET /export | |
ip-allowlist:read | List IP allowlist entries | GET /ip-allowlist | |
ip-allowlist:write | Add and remove IP allowlist entries | POST/DELETE /ip-allowlist | |
governance:read | Run read-only governance queries | GET /governance | |
governance:write | Submit governance actions | POST /governance | |
signatures:replay | Submit replay requests | POST /signatures | |
api-keys:read | List API keys for the org | GET /keys | |
api-keys:write | Create, update, and revoke API keys | POST/PATCH/PUT/DELETE /keys | |
organizations:read | Read org settings and member list | GET /orgs, GET /invitations | |
organizations:admin | Change org settings, invite and remove members | POST/PATCH/PUT/DELETE /orgs, POST/DELETE /invitations | |
tokens:read | Accepted on key creation, reserved for token-query routes (token verification is public and requires no scope) | ||
tokens:write | Accepted on key creation, reserved for token-issuance routes (none live yet) | ||
proofs:read | Fetch audit proofs | GET /proofs | |
proofs:write | Submit proof requests | POST /proofs | |
observability:read | Read observability metrics | GET /observability | |
monitoring:read | Read monitoring data | GET /monitoring | |
monitoring:write | Configure monitoring rules | POST/PUT/DELETE /monitoring | |
reports:read | Fetch reports | GET /reports | |
reports:write | Generate and delete reports | POST/DELETE /reports | |
remediation:read | List remediation actions | GET /remediation | |
remediation:write | Apply and close remediation actions | POST/PUT/DELETE /remediation | |
escalation:read | List escalation records | GET /escalation | |
escalation:write | Create and update escalations | POST/PUT/DELETE /escalation | |
risk-rules:read | List risk rules | GET /risk-rules | |
risk-rules:write | Create and update risk rules | POST/PUT/DELETE /risk-rules | |
attestation:read | Read governance attestation records | GET /attestation | |
attestation:write | Submit governance attestations | POST /attestation | |
audit-pack:read | Download audit pack bundles | GET /audit-pack |
Rate limits
| Tier | Requests / min |
|---|---|
| Free | 60 |
| Enterprise | 1,000 |