Cookbook · Authority
Issue a mandate.
A mandate gives an agent standing authority for billing-impacting actions, with limits the gateway checks on every call.
01
The call.
agents.mandate.issue is a confirmation-gated action, so it carries a confirmation token, a workspace id and an idempotency key.
curl
curl -X POST https://api.agined.com/api/v1/actions/agents.mandate.issue \
-H "Authorization: Bearer av_pat_…" \
-H "Content-Type: application/json" \
-H "Agined-Workspace-Id: ws_demo_default" \
-H "X-Idempotency-Key: $(uuidgen)" \
-H "X-Agined-Confirmation: conf_…" \
-d '{
"label": "Billing bot, Q3",
"agentDid": "did:web:agined.com:agents:ws_demo_default:refund-bot",
"allowedActionIds": ["billing.subscription.upgrade"],
"maxSafetyLevel": "billing_impacting",
"workspaceIds": ["ws_demo_default"],
"maxSpendUsdFractional": 50000,
"maxInvocations": 100,
"validForDays": 30
}'02
What the limits do.
- allowedActionIds names the actions the mandate covers; maxSpendUsdFractional and maxInvocations cap spend and use; validForDays sets the expiry.
- An agent presents the mandate with its call. The gateway checks the call against it and counts what was already spent.
- A sub-mandate for another agent can only be narrower. Revoking the parent stops every child.