Overview
The Mandates API implements the full lifecycle of a mandate — from creation via a TAP schema through state transitions (draft, review, active, expired, revoked). Mandates encode permissions, scope constraints, and jurisdictional rules. Each mandate maintains an action record chain for audit.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /mandates | List mandates (optional status filter) |
| POST | /mandates | Create mandate from TAP schema |
| GET | /mandates/:id | Get mandate details |
| PATCH | /mandates/:id | Update scope or validity |
| PATCH | /mandates/:id/status | Transition status (draft/review/active/expired/revoked) |
| DELETE | /mandates/:id | Revoke |
| GET | /mandates/:id/chain | Get action record chain |
| POST | /mandates/:id/delegate | Delegate to child mandate |
Example
curl http://localhost:4000/mandates \
-H "Authorization: Bearer tr_abc123"