Developer guide
One endpoint. Five minutes. Your agents get a gate.
Copy-paste curl and SDK snippets. Before your refund or email runs, call Verdict—you’ll get APPROVED with proof or ESCALATED for human review.
01
Authorize an action (curl)
curl -X POST "/api/authorize_action" \
-H "Content-Type: application/json" \
-d '{"actor_id": "support_agent_1", "action_type": "refund", "metadata": {"amount": 45, "order_id": "ORD-123"}}'Response: APPROVED (with proof_of_authority) or ESCALATED (with request_id).
02
SDK quickstart
Python:
pip install -e sdk/python
from verdict import VerdictClient
client = VerdictClient(base_url="/api")
result = client.authorize("support_agent_1", "refund", {"amount": 45})
if result["status"] == "APPROVED":
# pass result["proof_of_authority"] to your backend
pass
elif result["status"] == "ESCALATED":
# human reviews; result["request_id"]
passNode:
import { VerdictClient } from "verdict-sdk";
const client = new VerdictClient({ baseUrl: "/api" });
const result = await client.authorize({ actor_id: "support_agent_1", action_type: "refund", metadata: { amount: 45 } });03
Example use cases
- AI support agent: Before issuing a refund, call
authorize("bot", "refund", {"amount": 30}). If APPROVED, call your refund API with the proof. - Refund agent: Amounts over $50 are ESCALATED by default; human approves in the dashboard or via POST /approve_action.
- Email sender agent:
authorize("agent", "send_email", {"recipient_count": 150})→ ESCALATED (over 100 recipients).
04
Full guide
In the repository: docs/INTEGRATION.md — curl, verify PoA, simulate, API summary.