---
title: "Build a spending mandate for the PRINCIPAL to sign"
method: POST
path: "/api/mandate/prepare"
tags: ["mandates"]
---

# Build a spending mandate for the PRINCIPAL to sign

`POST /api/mandate/prepare`

## Request

- Base URL: `https://api.anygas.xyz/svc`
- URL: `https://api.anygas.xyz/svc/api/mandate/prepare`
- Auth: none declared

Handing money to an autonomous agent is all-or-nothing today, and every existing control sits on the WRONG side of the trust boundary: a limit the agent enforces on itself is a limit it can drop, and a limit in its prompt is a suggestion. This builds a budget the PRINCIPAL signs with their own wallet. Robyn never signs mandates and holds no principal keys — a budget signed by Robyn would be a budget Robyn granted itself. SCOPE: covers spending THROUGH ROBYN only. It is not custody and cannot stop the agent spending elsewhere with the same key; the payload says so. Treat it as an auditable budget, not a hard cap. Optional `cosignAbove` (base units) adds a PER-SPEND approval threshold: spends above it require the principal to countersign that specific payment. Omit it, or pass 0, for no threshold — mandates granted before this existed behave exactly as before. Pass `sandbox: true` (and on register) to create a throwaway mandate in a separate store — used by our own tests so test grants never appear in an owner's exposure figures.

## Request body

- object

## Response `200`

mandate + digest to sign

- object

## Other responses

- `400`: missing/invalid fields

---

[API](https://skmtc.dev/anygas/apis/robyn-anygas-api.md) · [All operations](https://skmtc.dev/anygas/apis/robyn-anygas-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anygas/apis/robyn-anygas-api/revisions/9b7498be8304?raw)
