> ## 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
  --only-categories <list>   Restrict to categories (strict), comma-separated:
                             meals, groceries, travel, software, ai, wellness,
                             retail
  --watch-categories <list>  Categories in Watch mode (allow + notify on
                             mismatch): 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
  --only-currencies <codes>  Restrict to purchase currencies (strict),
                             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
  --watch-currencies <codes> Purchase currencies in Watch mode (allow + notify
                             on mismatch), comma-separated: usd,eur. Checked
                             by Agentcard, 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
  --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 lunch --per-day 25 --only-categories meals
agent-cards cards preset save weekday_meals_watch \
  --watch-categories meals --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 --only-currencies 'dollars, euros'
agent-cards cards preset save euro-zone-watch --watch-currencies usd,eur
agent-cards cards create --amount 80 --preset lunch -y
```

The flags mean the same as on `cards create`. Categories, `Strict` and `Watch`, places, currencies, and time windows are explained in [Set rules on a card](/issuing/set-rules-on-a-card).

Save the currencies a card may pay in:

```bash theme={null}
agent-cards cards preset save euro-zone --only-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, use `--watch-currencies` with the same list; pass one of the two, not both. 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 --only-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)."}
```
