v0.1 — Phase 1
Operator-only endpoint. Policy endpoints require an operator API key. Agent-scoped keys return 403 Forbidden.

Policy object

FieldTypeDefaultDescription
max_single_transfernumber | nullnullMaximum USDC per transfer. null = no limit.
max_daily_spendnumber | nullnullMaximum USDC in a rolling 24-hour window. null = no limit.
allowed_counterpartiesstring[] | nullnullAllowlist of Solana addresses. If set, all other recipients are blocked. null = all addresses allowed.
require_memobooleanfalseIf true, transfers without a memo field are rejected.
pausedbooleanfalseIf true, all outgoing transfers are blocked immediately.
GET /v1/accounts/:id/policy

Get the current spending policy for an account.

Response — 200 OK

json
{
  "account_id": "acct_01j8k4x9p2qrst7yz",
  "max_single_transfer": 500,
  "max_daily_spend": 2000,
  "allowed_counterparties": [
    "9xTz4KqR8mYvPn3SdFgHj6WbCeAuLo1XkQi5NtZpMwV",
    "acct_03x1m7p9k2qrst4ab"
  ],
  "require_memo": true,
  "paused": false,
  "updated_at": "2024-01-15T09:00:00Z"
}
PUT /v1/accounts/:id/policy

Update the spending policy for an account. This is a full replacement — omitted fields revert to their defaults.

On-chain update. Policy changes are written to the on-chain PDA state via the ClawdGo Solana program. The change takes effect at the next transfer request, not retroactively.

Request body

json
{
  "max_single_transfer": 500,
  "max_daily_spend": 2000,
  "allowed_counterparties": [
    "9xTz4KqR8mYvPn3SdFgHj6WbCeAuLo1XkQi5NtZpMwV"
  ],
  "require_memo": true,
  "paused": false
}

Pausing an account

To immediately halt all transfers from an account, send a partial update with only paused: true:

bash
curl -X PUT https://api.clawdgo.com/v1/accounts/acct_01j8k4x9p2qrst7yz/policy \
  -H "Authorization: Bearer $CLAWDGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"paused": true}'

Note: when sending a partial update, only the fields you include are changed. Other policy fields are preserved.