# Mandate

How an owner writes, simulates and signs versioned spending rules with a passkey, and how one deterministic policy engine applies them to every payment.

<ShortProductTruth>**A card number was never a permission.** A mandate is a signed, versioned statement of what an agent may buy, and the policy engine applies it the same way every time, with no language model in the decision.</ShortProductTruth>


## The problem it removes [#the-problem-it-removes]

A spending limit written into a prompt is a suggestion. The agent can misread it, and a page it reads can talk it out of it. Abazi Mandate moves the limits out of the agent's reach: into a document a person signs, which the agent can neither see nor edit, enforced by a fixed function that returns the same decision and reason code for the same input.

## Who uses it [#who-uses-it]

| Who | How |
| --- | --- |
| Owners and admins | Write a draft, simulate purchases against it, review the changes and sign it with a passkey. |
| Finance | Read every version and its limits, without the right to sign. |
| Agents | Never see or edit it. They get a decision and a reason code back. |

## How it works [#how-it-works]

1. **Draft.** The owner sets limits, allowed rails and networks, categories, merchant tiers and an expiry. Every edit creates a new draft version; signed versions never change.
2. **Simulate.** The editor runs a sample purchase through the same policy engine, without reserving anything, and shows the decision and reason code.
3. **Sign.** The owner reviews the difference from the active version and signs with a passkey. Abazi issues the mandate in AP2 v0.2 format (an SD-JWT that Abazi builds and verifies itself).
4. **Activate.** The signed version becomes active and the previous one is superseded. Decisions already made keep the version they were made under.
5. **Enforce.** On every payment the policy engine walks a fixed evaluation order and stops at the first step that applies, returning ALLOW, REQUIRE APPROVAL or DENY with a reason code and a step-by-step trace. See [Mandates and policy](/docs/concepts/mandates-and-policy).

## Limits in the example mandate [#limits-in-the-example-mandate]

| Limit | Example value |
| --- | --- |
| Auto-approve limit | <Limit name="autoThreshold" /> |
| Hard cap per purchase | <Limit name="hardCap" /> |
| Plan hard cap | <Limit name="planHardCap" /> |
| Unknown-merchant limit | <Limit name="unknownMerchantLimit" /> |
| Card hard cap per authorization | <Limit name="cardHardCap" /> |
| Card auto-approve limit | <Limit name="cardAutoThreshold" /> |

A draft is refused if an auto-approve limit or the unknown-merchant limit is above its hard cap, if it allows no rail, or if its expiry is more than 90 days ahead.

## Screens [#screens]

<Screenshot id="console-mandates" />

<Screenshot id="console-mandate-detail" />

## Boundaries [#boundaries]

| Case | What happens |
| --- | --- |
| A purchase above the auto-approve limit | REQUIRE APPROVAL with <ReasonCode code="ABOVE_AUTO_THRESHOLD" />; a person decides. |
| A purchase above the hard cap | DENY with <ReasonCode code="HARD_CAP_EXCEEDED" />. An approval cannot raise a hard cap or a budget. |
| The mandate has expired or was revoked | DENY with <ReasonCode code="MANDATE_EXPIRED" /> or <ReasonCode code="MANDATE_REVOKED" />. |
| The agent asks for a rail the mandate does not allow | DENY with <ReasonCode code="RAIL_NOT_ALLOWED" />. |

The agent's stated purpose is kept for the audit trail. It is never an input to the decision, except that Shield scans it for prompt injection.

## API [#api]

The Mandates operations in the API reference, each with its parameters, responses and code samples:

<ApiOperationList ids={['listMandates', 'createMandate', 'getMandateTemplate', 'getMandate', 'createMandateVersion', 'getMandateVersion', 'diffMandateVersions', 'getMandateSignOptions']} />

## Next steps [#next-steps]

<Cards>
  <Card title="Mandates and policy" href="/docs/concepts/mandates-and-policy" description="Step through the evaluation order and every reason code it can return." />
  <Card title="Write a mandate" href="/docs/guides/write-a-mandate" description="Set limits, simulate a purchase and sign with a passkey." />
  <Card title="Approvals" href="/docs/concepts/approvals" description="See what happens after REQUIRE APPROVAL and what an approval can never override." />
</Cards>

