> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentcard.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# agent-cards cards preset save

> Save (or update) a named preset from rule flags

Save (or update) a named preset from rule flags

```bash theme={null}
agent-cards cards preset save --help
```

```text theme={null}
Usage: agent-cards cards preset save [options] <name>

Save (or update) a named preset from rule flags

Options:
  --total <dollars>        Lifetime spend cap in US dollars
  --per-day <dollars>      Spend cap per rolling 24 hours, in US dollars
  --per-week <dollars>     Spend cap per rolling 7 days, in US dollars
  --per-month <dollars>    Spend cap per rolling 30 days, in US dollars
  --categories <list>      Restrict to categories, comma-separated: meals,
                           groceries, travel, software, ai, wellness, retail
  --only-merchants <list>  Restrict to merchant name patterns, comma-separated
  --only-in <places>       Restrict to places, comma-separated: a country (US,
                           Canada), a region (europe, eu, north-america, apac),
                           a US state (California, US-CA). A region expands to
                           its countries; a state next to a region narrows only
                           the US, e.g. north-america,US-CA
  --currencies <codes>     Restrict to purchase currencies, comma-separated ISO
                           4217 codes or names: usd,eur or
                           dollars,euros,pounds,yen. Checked by Agentcard at
                           checkout and settlement, not by the card network
  --only-days <days>       Restrict to days, comma-separated: mon,tue or
                           weekdays/weekends
  --only-hours <range>     Restrict to an hour range, e.g. 9-17 or 09:00-17:00
                           (24-hour; defaults to UTC without --timezone)
  --timezone <tz>          IANA timezone for --only-days/--only-hours (default
                           UTC), e.g. America/Los_Angeles
  --only-from <programs>   Restrict to callers, comma-separated: cli, mcp, api,
                           browser
  --mode <mode>            What the preset does when a purchase breaks a rule:
                           strict refuses it (default), watch lets it through
                           and tells you
  --json                   Output as JSON
  -h, --help               display help for command
```

Save a set of rules under a name and reuse it with `cards create --preset <name>` or `cards preset --set <name>`. Save a name you already use and your change applies to the cards you create from now on; cards you already have keep the rules they were created with. The built-in names `daily`, `weekday_meals`, `cli_only`, and `ai_labs` cannot be saved over. Pass at least one rule flag. `--timezone` applies only with `--only-days` or `--only-hours` and must be a real IANA zone; a misspelled zone is refused.

```bash theme={null}
agent-cards cards preset save office-supplies --per-day 25 --categories meals
agent-cards cards preset save weekday_meals_watch \
  --categories meals --mode watch --only-days weekdays --only-hours 11-14 \
  --timezone America/Los_Angeles
agent-cards cards preset save west-coast --only-in 'California, Oregon, Washington'
agent-cards cards preset save euro-zone --currencies 'dollars, euros'
agent-cards cards preset save euro-zone-watch --currencies usd,eur --mode watch
agent-cards cards create --amount 80 --preset office-supplies -y
```

The flags mean the same as on `cards create`.

Save the currencies a card may pay in:

```bash theme={null}
agent-cards cards preset save euro-zone --currencies 'dollars, euros'
```

A charge in any other currency is refused, and you are told why. Write codes or plain names in any case, comma-separated. If you would rather be told than refused, add `--mode watch` to the preset. The saved rule reads `Currency: USD, EUR` in the summary. Captured from a local sandbox:

```text theme={null}
── Preset saved ────────────────
│ Preset   Currency: USD, EUR. │
│ Version  v1                  │
│ Saved euro-zone.             │
└──────────────────────────────┘
```

If you write a name that means several currencies, the save is refused and the message lists what it could mean, so you can pick. A code that is not a currency is refused the same way. `agent-cards cards preset save euro-zone --currencies pesos` exits 1 with:

```text theme={null}
"pesos" could be MXN, ARS, CLP, COP, or PHP. Write the currency code, or name the country (Mexican pesos).
```

With `--json` the same refusal is one JSON line on stdout:

```text theme={null}
{"ok":false,"error":"policy_invalid","message":"\"pesos\" could be MXN, ARS, CLP, COP, or PHP. Write the currency code, or name the country (Mexican pesos)."}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.