# Mandate

Mandate is for agent builders. It binds a person's approval to the exact action your AI agent is about to run, and checks it before the action executes.

Mandate is for teams that build AI agents. It binds a person's approval to the exact action an AI agent is about to run, and check that action before it executes.

## When to use it

- Let an agent pay an invoice only after a person approves that payee and amount.
- Ask for a passkey approval when an action matches a policy rule, such as a large transfer or a new counterparty.
- Give an agent standing authority with a budget, named counterparties and an end date, and revoke it in one call.

## How it works

1. Before it acts, the agent asks Provenance to authorize the action, with a description and the exact payload it will run.
2. Provenance applies your account policy, collects a person's approval when a rule asks for one, and signs an intent token over the hashes of both.
3. Your executor verifies the token against the payload it is about to run, and runs it only when `valid` is `true`.

1. **Your agent's request**: action_description + action_payload
2. **Provenance**: policy, approval, signing
3. **Signed intent token**: ES256, verifiable offline

## Key objects

| Object | What it is | Where you get it |
| --- | --- | --- |
| [Intent token](https://provenanceauth.com/docs/authorize/guides/verify-tokens.md) | An ES256 JWT that binds a session and device to the hashes of one action's description and payload | [`POST /v1/mandate/intents`](https://provenanceauth.com/docs/api/intent-tokens.md#post-v1-mandate-intents) |
| Mandate assessment | The check your executor runs: `valid`, plus a `reason` when it fails | [`POST /v1/mandate/assessments`](https://provenanceauth.com/docs/api/intent-tokens.md#post-v1-mandate-assessments) |
| [Policy](https://provenanceauth.com/docs/concepts/policies.md) | Your account's versioned rules for what needs approval, what is denied and what is allowed | [`PUT /v1/mandate/policies`](https://provenanceauth.com/docs/api/policies.md#put-v1-mandate-policies) |
| Approval request | A pending step-up approval for one action, decided by a person with a passkey | [`GET /v1/mandate/approvals`](https://provenanceauth.com/docs/api/approvals.md#get-v1-mandate-approvals) |
| [Grant](https://provenanceauth.com/docs/mandate/concepts/grants.md) | Standing, bounded authority a person grants an agent | [`POST /v1/mandate/grants`](https://provenanceauth.com/docs/api/grants.md#post-v1-mandate-grants) |
| [Decision](https://provenanceauth.com/docs/mandate/concepts/decision-ledger.md) | An append-only, hash-chained record of each authorize and verify, with a signed receipt | [`GET /v1/mandate/assessments`](https://provenanceauth.com/docs/api/decisions.md#get-v1-mandate-assessments) |

## Core endpoints

| Endpoint | Use it to |
| --- | --- |
| [`POST /v1/mandate/intents`](https://provenanceauth.com/docs/api/intent-tokens.md#post-v1-mandate-intents) | Get a signed intent token for one action. |
| [`POST /v1/mandate/assessments`](https://provenanceauth.com/docs/api/intent-tokens.md#post-v1-mandate-assessments) | Check a token against the payload you are about to run. |
| [`POST /v1/mandate/revocations`](https://provenanceauth.com/docs/api/intent-tokens.md#post-v1-mandate-revocations) | Revoke a token, an agent session or a device. |
| [`PUT /v1/mandate/policies`](https://provenanceauth.com/docs/api/policies.md#put-v1-mandate-policies) | Set your account policy as a new version. |
| [`POST /v1/mandate/approvals/{id}/respond`](https://provenanceauth.com/docs/api/approvals.md#post-v1-mandate-approvals-id-respond) | Approve or deny a pending step-up approval. |
| [`POST /v1/mandate/grants`](https://provenanceauth.com/docs/api/grants.md#post-v1-mandate-grants) | Grant an agent standing authority with limits. |

## Your first call

Authorize a payment for an agent. The sandbox key needs no signup.

**curl**

```bash
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe

curl $PROVENANCE_API/v1/mandate/intents \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action_description": "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    "action_payload": { "type": "payment", "amount": 1850, "currency": "USD", "payee": "acct_brindlecote_supplies" },
    "agent_session_id": "sess_overview_1",
    "device_id": "dev_00000000000000000000000000000001"
  }'
```

**Node**

```ts
import { Provenance } from "@provenanceauth/sdk";

const prov = new Provenance({ apiKey: process.env.PROVENANCE_KEY!, baseUrl: process.env.PROVENANCE_API });
const auth = await prov.mandate.intents.create({
  actionDescription: "Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
  actionPayload: { type: "payment", amount: 1850, currency: "USD", payee: "acct_brindlecote_supplies" },
  agentSessionId: "sess_overview_1",
  deviceId: "dev_00000000000000000000000000000001",
});
console.log(auth.intentToken);
```

**Python**

```python
import os
from provenanceauth import Provenance

prov = Provenance(os.environ["PROVENANCE_KEY"], base_url=os.environ["PROVENANCE_API"])
auth = prov.mandate.intents.create(
    action_description="Pay invoice INV-2041: $1,850.00 to Brindlecote Supplies",
    action_payload={"type": "payment", "amount": 1850, "currency": "USD", "payee": "acct_brindlecote_supplies"},
    agent_session_id="sess_overview_1",
    device_id="dev_00000000000000000000000000000001",
)
print(auth["intent_token"])
```

```json
{
  "object": "intent_authorization",
  "intent_token": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImQwMjA2ZDM5ZDg0ZDFiNWUifQ.eyJpc3MiOiJwcm92ZW5hbmNlLWF1dGhvcml6ZSIsInN1YiI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMSJ9.W1acW0VXrjqhXCb-K5fkIt5pabtd1EwCKMGOv31DYO_EXCg3Sm-UZFM062-eR6TP6ThI8odLyYU21hqUWGaBOA",
  "expires_at": "2026-10-24T04:59:06.000Z",
  "attestation_id": "00d053fb-e2f6-4cb3-8302-7ee1573a7954",
  "biometric_bound": false
}
```

The [quickstart](https://provenanceauth.com/docs/mandate/quickstart.md) gates a tool call behind a rule and a person's approval, and [execution binding](https://provenanceauth.com/docs/mandate/guides/execution-binding.md) carries this token through verify, a changed payload and revocation.

## Next steps

- [Quickstart](https://provenanceauth.com/docs/mandate/quickstart.md): Gate a tool call behind a rule and a person's approval.
- [Step-up approval](https://provenanceauth.com/docs/mandate/guides/step-up-approval.md): Send an action to a person for approval before it runs.
- [API reference](https://provenanceauth.com/docs/api.md#resources-mandate): Every Mandate endpoint, with parameters and responses.
