IPA (Intelligent Purchase Authorisation) routes and lifecycle. For the concept and composition model, see Errands; for the state machine, see Errand lifecycle.
An Errand sits above its mandates. The Errand handles orchestration (finding, validating, approving); a with
sr:us:pint:spend:execute authorises the on-chain transaction at execution time. See scopes.Prerequisites
- A verified user with a deployed Safe — see onboarding.
- A signed Stamped Mandate that carries the scopes the Errand needs (at minimum
sr:us:pint:perpetual:search; addsr:us:pint:spend:executeto authorise execution). See Stamped Mandates for the mint flow and scopes for the catalog. - A Platform API JWT — see authentication.
Create an Errand
On the wire, you create an Errand withPOST /v0/user/ipa, which returns 202 Accepted once the pre-flight workflow is triggered. Pass Idempotency-Key to guard against duplicate submissions: if a previous request with the same key successfully produced an Errand, the retry returns that original Errand with 208 Already Reported. If the previous attempt did not produce an Errand (e.g. it failed before creation), the retry is processed as a new request.
Request fields
Response shape
Key response fields
The originating and executing agent tasks, candidates, manifests, and events are not returned by default — fetch them via
expand.Drive the lifecycle
The_links field on every Errand response tells you which actions are currently valid. For the full state diagram, see Errand lifecycle.
Submit clarification answers
When the Errand is inqualifying or pending_clarification, the answers link is present and clarification_questions is populated.
200 OK with status: "qualifying" — the agent re-parses with the new context.
Approve or reject
Inpending_approval, submit a decision. Approving authorises spending, so it is signed by the account holder. Rejecting authorises nothing, and needs no signature.
Start by fetching the payload prepared for this Errand:
intent.approval_payload is an EIP-712 typed-data document describing the spend ceiling, the conditions and the deadline being authorised. Sign it with the wallet on the account — eth_signTypedData_v4 — and send the signature back:
PUT /v0/user/ipa/{ipa_id}/conditions — it returns a rewritten payload that supersedes any copy fetched earlier, and it is refused once the approval has been signed.
An approval sent without a signature is rejected with 401 and error code IPA-401-001; one signed by anything other than the wallet on the account is rejected too.
Rejecting is terminal and carries no signature:
Cancel
Any non-terminal Errand can be cancelled. The pre-flight or executing workflow is halted and the Errand transitions tocancelled.
200 OK, or 409 Conflict if the Errand is already terminal (completed, failed, expired, cancelled).
Read an Errand
Expansions
Addexpand query parameters to embed related resources in the same response. Without expand, these fields are null.
List Errands
The response includes HAL
next/prev links when more pages exist.
Event stream
GET /v0/user/ipa/{ipa_id}/events returns every state change, clarification exchange, approval decision, workflow transition, and cancellation recorded against the Errand. Fetch it directly, or embed it via expand=events on the detail endpoint.
Constraints
Structured requirements that define what results the agent may propose. Evaluated during parsing, search, validation, and manifest construction — not during execution monitoring.Conditions
Auto-execution triggers evaluated once an Errand is approved withautonomy_level = auto_within_conditions. Each condition is typed by type (price_target, budget_cap, availability, time_window, flight_route, coverage_minimum, jurisdiction, group). See the Create Errand reference for the per-type schemas.
Idempotency and HAL
Idempotency-KeyonPOST /v0/user/ipadeduplicates retries when a prior request with the same key already produced an Errand — that original is returned with208 Already Reported. Retries of a failed prior attempt are processed as new requests. Mutually exclusive withoriginating_agent_task_idin the body.- Every response carries
_links— the presence of a link is the authoritative signal that the action is valid. See HAL, RFC 7807, idempotency, pagination.
Errors
All errors follow RFC 7807 Problem Details with stableerror_code values (e.g. IPA-404-001, IPA-409-001).
Related
- Errands — the concept page (what an Errand is, how it composes with Stamped Mandates).
- Errand lifecycle — full state machine and transition reference.
- Stamped Mandates — the signed primitive the Errand draws against.
- Scopes — capability strings an Errand’s Stamped Mandates must carry.
- Set up an Errand — working end-to-end quickstart.
- Errand API reference — full OpenAPI detail.