Interface

One call, before the action.

The API is the product. A synchronous POST returns allow or deny, names the rule that decided it, and writes the hash-chained record before it answers. MCP and the agent connectors are a convenience layer over the same endpoint.

The call

POST /api/v1/authorize
curl -s https://aprve.com/api/v1/authorize \
  -H "Authorization: Bearer $APRVE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "triage-bot-04",
    "action": { "tool": "refund.create", "amount_usd": 180 },
    "context": { "ticket": "T-8841" }
  }'

Authenticated with a scoped key. agent_id and action.tool are required; amount, data classes, target and a risk score are optional and used by rules that ask for them.

The response

200 OK
{
  "decision": "allow",
  "decision_source": "policy",
  "matched_rule_id": "r_refund_cap",
  "policy_version": 4,
  "explanation": "refund.create of 180.00 USD is within the 250 USD ceiling.",
  "record": { "seq": 1841, "hash": "078506dc…a5948" },
  "latency_ms": 38
}

The decision is written before it is returned, so the record always exists when the caller reads it. Treat anything that is not allow as a denial.

When it cannot answer

Unreachable, timed out, malformed or unevaluable: the answer is deny. Fail mode is configurable per client and closed by default, and nothing is ever inferred from a missing response. A denial is final inside Aprve; no person reviews it and nothing reverses it automatically.

Wire a timeout on your side shorter than your own action deadline, and treat the timeout as a denial. That is the whole integration contract.

Try it without an account

No signup, no key. The sandbox runs a real decision against a fixed public policy, writes to an isolated ledger that is pruned daily, and never counts toward usage. Twenty requests per minute per IP.

POST /api/v1/sandbox
curl -s https://aprve.com/api/v1/sandbox \
  -H "Content-Type: application/json" \
  -d '{ "tool": "refund.create", "amount_usd": 180 }'
Try a decision

Ask the oracle. No account.

This posts to the public sandbox with a fixed policy: reads are allowed, refunds up to 250 USD are allowed, restricted data classes are denied. Every answer is a real record you can verify below.

isolated ledger·pruned daily·never billed
Data class

The answer appears here with the rule that decided it and the hash of the record it wrote.

Check it without us

Every record is a hash over published canonical JSON, so a third party can recompute it and disagree. The field order, the serialization rule and a test vector are published, and the verifier is a public endpoint.

For agents

One MCP server and one set of tool definitions wrap the same call, for clients that would rather be handed a tool than write an HTTP client. The implementable brief is a single crawlable file.

Endpoints

FieldTypeMeaning
POST /api/v1/authorizekeyEvaluate policy, write the record, return allow or deny.
GET /api/v1/decisions/{id}keyRe-read a decision, its record and its statement status.
GET /api/v1/records/{id}keyThe stored record behind a decision.
GET /api/v1/verify/{hash}publicRecompute a record from its hash. No account.
GET /api/v1/evidence/{token}publicA shared evidence pack, JSON. The same pack as PDF.
GET /api/v1/metricspublicTransparency metrics: decisions, latency, anchoring.
POST /api/v1/sandboxpublicA real decision against a fixed policy. No key.

Every field, error code and retry rule is in the decision API reference. Production calls need an active plan; the sandbox and every verification surface stay open.