Skip to main content

Intents API

Generic intents model Privy-style manual approval workflows for wallet actions and control-plane changes. Use them when an operation should be created first, reviewed by a human tenant owner/admin, and executed only after authorization. Base path: /intents
Auth: Tenant-level auth for read/create. Lifecycle actions require an owner/admin user session with recent MFA.
The API accepts both Steward-native camelCase fields and Privy-style aliases where implemented: intentType or intent_type, agentId or wallet_id, resourceType or resource_type, resourceId or resource_id, and authorizationDetails or authorization_details.

Intent lifecycle

Control-plane intents such as wallet_update, policy_update, policy_rule_create, policy_rule_delete, policy_rule_update, and quorum_update must be created by a human owner/admin session, not a tenant API key. All lifecycle endpoints require an owner/admin user session with recent MFA. The creator cannot authorize their own user-created intent. When an intent is authorized, Steward snapshots the relevant policy or quorum baseline for typed executors that mutate those resources. If the current state changes before execution, execution fails with a stale-state conflict and the caller should recreate and reauthorize the intent.

Create Intent

Auth: Tenant-level auth. Human control-plane intent types require an owner/admin user session. Request Body:
authorizationDetails is accepted for schema compatibility, but non-empty arrays currently fail closed because multi-approver enforcement is not yet implemented on this route. Response:

List Intents

Auth: Tenant-level auth Query Parameters:

Get Intent

Auth: Tenant-level auth

Approve or reject

Auth: Owner/admin user session with recent MFA /approve is a Privy-style alias for /authorize. The optional reason field is stored for rejection audit/webhook context.

Execute

Auth: Owner/admin user session with recent MFA Execution requires the intent to be authorized. The response includes executionResult and execution_result; signed transaction artifacts are redacted in stored intent rows.

Finalize without execution

Auth: Owner/admin user session with recent MFA fail, cancel, and expire can close pending or authorized intents without running the typed executor. fail can include an executionResult object for operator-supplied failure metadata.

Policy rule payload examples

Create a policy rule

Use intentType: "policy_rule_create" with payload.rule.

Update a policy rule

Use intentType: "policy_rule_update" with payload.action: "update", payload.ruleId, and either payload.patch or payload.rule.

Delete a policy rule

Use intentType: "policy_rule_delete" with payload.ruleId. Deleting the last remaining policy rule requires allowDeleteLastPolicy: true.

Other typed payloads

Safe idempotency and retry notes

  • Use a stable Idempotency-Key for intent creation and execution attempts when your deployment accepts or requires sensitive-mutation idempotency.
  • Put your business operation ID in resourceId, resource_id, or the typed payload.referenceId when available so audit events, webhooks, and retries can be correlated.
  • If POST /execute returns a network timeout, first fetch the intent by ID before retrying. It may already be executing, executed, or failed.
  • If execution fails with stale-state conflict, recreate the intent from the current policy/quorum state and run the human approval flow again.
  • Do not retry terminal lifecycle actions blindly. executed, failed, rejected, canceled, and expired are terminal statuses.