Skip to main content
An is the durable contract between a user and an agent — what the user wants, what the agent may do, and under which signed authorisations. This guide covers the Platform API surface: request and response shape, lifecycle actions, and how to expand related resources. On the wire, an Errand is created and driven through the 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; add sr:us:pint:spend:execute to 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 with POST /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

constraints answer what is acceptable (e.g. max_price = 200). conditions answer when an approved Errand may auto-execute (e.g. buy if price drops below 180). They are evaluated at different stages — don’t conflate them.

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 in qualifying or pending_clarification, the answers link is present and clarification_questions is populated.
Returns 200 OK with status: "qualifying" — the agent re-parses with the new context.

Approve or reject

In pending_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:
What the purchase is bounded by is read from the signed payload, never from this request, so an approval always means exactly what was signed. To change those bounds, replace the conditions first with 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 to cancelled.
Returns 200 OK, or 409 Conflict if the Errand is already terminal (completed, failed, expired, cancelled).

Read an Errand

Expansions

Add expand 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 with autonomy_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-Key on POST /v0/user/ipa deduplicates retries when a prior request with the same key already produced an Errand — that original is returned with 208 Already Reported. Retries of a failed prior attempt are processed as new requests. Mutually exclusive with originating_agent_task_id in 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 stable error_code values (e.g. IPA-404-001, IPA-409-001).