curl --request POST \
--url https://api.akhara.dev/api/policy/authorize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "support-ai",
"session": "sess_demo",
"stage": "output",
"content": "Your card on file is 4242 4242 4242 4242, expiring 04/27."
}
'{
"verdict": "BLOCK",
"stage": "output",
"policyId": "pci-0",
"rule": "PCI DSS Requirement 3.3",
"reason": "Unmasked PAN in output",
"transformedContent": null,
"tool": null,
"permitId": null,
"attachedPolicyIds": [
"latch-0",
"latch-4",
"pci-0",
"reliability-3"
]
}Authorize a step
The core enforcement call. Evaluates the agent’s attached policy latches for the given stage and returns a binding verdict. Fails closed on the client side if unreachable.
curl --request POST \
--url https://api.akhara.dev/api/policy/authorize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agentId": "support-ai",
"session": "sess_demo",
"stage": "output",
"content": "Your card on file is 4242 4242 4242 4242, expiring 04/27."
}
'{
"verdict": "BLOCK",
"stage": "output",
"policyId": "pci-0",
"rule": "PCI DSS Requirement 3.3",
"reason": "Unmasked PAN in output",
"transformedContent": null,
"tool": null,
"permitId": null,
"attachedPolicyIds": [
"latch-0",
"latch-4",
"pci-0",
"reliability-3"
]
}authorize request. The PDP evaluates the agent’s
attached latches for the given stage and returns a
binding verdict.
BLOCK. See Fail-closed.Authorizations
Workspace API key (ak_live_…).
Body
Must resolve to a workspace agent, else 404.
"support-ai"
input, context_egress, output, delivery, action Telemetry session id; defaults to "unknown".
"sess_demo"
Text for input / context_egress / output / delivery.
Tool name for the action stage; normalized before matching.
"refund_payment"
Action arguments; the matched latch reads the fields it governs (for example args.amount or verification state).
{ "orderId": "ord_1842", "amount": 129 }
Marks the decision as simulated in the evidence feed.
Response
A policy decision.
ALLOW, WARN, BLOCK, ESCALATE "latch-4"
"Refund & Billing Exception Authorization"
Rewritten content on WARN (e.g. sensitive fields redacted).
Set only on ALLOW + action.
Enterprise baseline ∪ agent.policyIds.

