Introduction

WelcomeServices map

Guides

AcceptSpend

Legal

SecurityPrivacyTerms

PreviousAccess & receiptsNextWebhooks
BlogPrivacyTerms

Policy templates

Fleet spend templates applied when creating wallets, period allowance, max transaction, and optional allowlist, so many agents share one policy.


Same flow in MCP: rill_create_wallet

Auth

Owner Supabase JWT required on every route. Send Idempotency-Key on create. Pass policy_template_id on POST /wallets to apply the template when creating a wallet.

Authorization: Bearer <owner JWT>

Featured endpoints

Create a policy template

POST /policies

Define fleet defaults once, then create many wallets with the same allowance and allowlist. Canonical product defaults live in @rill/shared PRODUCT_POLICY when you omit a template.

ParameterTypeRequiredDescription
namestringyesTemplate display name (max 80 chars)
period_allowancenumberyesUSD period budget applied at mint
max_transactionnumberyesUSD max per individual pay
allowliststring[]noOptional host/URL allowlist for open-rail pays

Request body

body
{
  "name": "research-fleet",
  "period_allowance": 50,
  "max_transaction": 5,
  "allowlist": ["https://api.example.com"]
}

What to save

Save template id and pass it as policy_template_id on POST /wallets (or MCP rill_create_wallet).

  • List with GET /policies; delete with DELETE /policies/:id.

All endpoints

  • POST/policiesCreate template (Idempotency-Key)
  • GET/policiesList owner templates
  • GET/policies/:idTemplate by id
  • DELETE/policies/:idDelete template

Usage notes

  • When policy_template_id is set on mint, template allowance fields override the body values.
  • MCP twin path: create here, then rill_create_wallet with policy_template_id.