Create a delegation
Grant the agent a scoped authority — scopes, ceiling, expiry, challenge types it can open.
curl -X POST https://www.paphwey.com/api/v1/agent/delegations \
-H "X-API-Key: sk_live_abcd.deadbeef..." \
-H "Content-Type: application/json" \
-d '{
"principal_email": "alice@example.com",
"provider": "openai",
"agent_id": "shopping-agent",
"allowed_scopes": ["purchase"],
"allowed_challenge_types": ["HIGH_VALUE_PURCHASE_REQUIRED"],
"max_amount_minor": 2500,
"currency": "GBP",
"valid_until": "2026-05-01T00:00:00Z"
}'