Presets
Save a preset
Save a named preset, or replace its rules. Saving filters nothing until the preset is attached.
PUT
The rules are replaced, not merged: send every rule the preset should hold. A replacement keeps every attachment, and purchases already counted toward a cap stay counted, so replacing the rules never resets a rolling window. Saving a preset attaches it to nothing; attach it to a stored card. Takes a platform access token or an API key. See Set rules on a card.
Write the rules one of three ways: as the fields below, as
A merchant Agentcard does not know has no category and no country, so a category or place rule on a
preset with a built-in name (daily, cli_only, weekday_meals, or ai_labs), or as privileges, an array of rules in the same shape a card preset takes.
string
required
1 to 64 letters, digits, hyphens or underscores, starting with a letter or digit.
number
Cap on the purchases under each attachment, over all time, in US dollars.
number
Rolling 24-hour cap, in US dollars, for the purchases under each attachment.
number
Rolling 7-day cap, in US dollars.
number
Rolling 30-day cap, in US dollars.
string
Categories the merchant must be in, comma-separated:
meals, groceries, travel, software, ai, wellness, retail. Judged on the merchant Agentcard names from checkout_origin and the payment request, never on the merchant text.string
Comma-separated patterns the merchant’s name or checkout host must match, such as
EXAMPLE SHOP,shop.example.com. The merchant text your agent sends is not matched.string
Places the merchant must be in, comma-separated: a country (
US, Canada), a US state (California, US-CA), or a region (europe, north-america, apac).string
The currencies a purchase may be in, comma-separated, by code or common name:
usd,eur or dollars,euros.string
mon,tue, or weekdays / weekends.string
For example
9-17, 24-hour clock, in timezone.string
IANA zone for
only_days and only_hours. Default UTC.string
Where purchases may come from. Vault purchases come from your agent and count as
api.string
What the preset does when a purchase breaks any of its rules:
strict refuses it (the default), watch lets it through and tells you.string
A built-in name instead of the fields above.
object[]
The rules as an array, for a rule the fields do not cover, such as
{"kind": "merchant_allow", "patterns": ["BRAXTER'S DELI"]}.strict preset refuses a purchase there with category_unknown or geo_unknown; see Where the merchant comes from.
Errors. 400 policy_invalid when the name or the rules cannot be read; the message names the field or the rule. 502 policy_update_failed when the rules could not be saved; nothing changed.