API reference/Agents and MCP
Agents and MCP
Let a software agent pay people and vendors under a policy a person sets. A key with a daily budget, per-payout maximum, allowed channels and an approval threshold executes payouts under the threshold and parks the rest in the approvals inbox. A phone number is a valid payee, so an agent never has to collect bank details.
The policy layer sits on top of the API; ask us before building against it.
Create a scoped key
POST
/api-keysOwner only. A key carries an optional policy; anything outside it returns policy_exceeded or waits for approval above the threshold.
| Field | Type | required | Notes |
|---|---|---|---|
| name | string | required | |
| policy | object | optional |
Request
{
"name": "support-agent",
"policy": {
"daily_budget": "2000.00",
"per_payout_max": "200.00",
"channels": [
"claim_link",
"spei_mxn"
],
"approval_threshold": "150.00"
}
}Response 201
{
"id": "key_7e21",
"name": "support-agent",
"key": "dpc_test_9Qa...",
"policy": {
"daily_budget": "2000.00",
"per_payout_max": "200.00",
"channels": [
"claim_link",
"spei_mxn"
],
"approval_threshold": "150.00"
}
}Examples: Create a scoped key
curl -X POST https://sandbox.api.decaf.so/v1/api-keys \
-H "Authorization: Bearer $DECAF_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"support-agent","policy":{"daily_budget":"2000.00","per_payout_max":"200.00","channels":["claim_link","spei_mxn"],"approval_threshold":"150.00"}}'Get access
Build against the sandbox this week.
Tell us the corridors you need and the recipients you pay. Sandbox keys are issued by a person.