Policies

Create policy

POSThttps://api.firstleeward.com/v0/policies

Creates a policy. The accepted configuration depends on the policy type.

Authorizations

Authorizationstring · headerrequired

API key as Bearer token, e.g. Bearer YOUR_API_KEY

Headers

Leeward-Versionenum<string>required

API version (YYYY-MM-DD). Available option: 2026-09-18

Idempotency-Keystring

Unique key for safely retrying this request. Up to 255 characters; we recommend a UUIDv4. The first request executes and its response is cached; subsequent requests with the same key replay the cached response (24h retention).

Body

application/json

Option 1 · MerchantRestriction
typestringrequired
scopeobjectrequired

Where the policy attaches.

Show child attributes
Option 1 · Project
typestringrequired
Option 2 · User
typestringrequired
idstring<uuid>required
Option 3 · Card
typestringrequired
idstring<uuid>required
namestringrequired

Human-readable label.

configobjectrequired

Block transactions whose merchant matches the criteria.

Show child attributes
matchobjectrequired
Show child attributes
Option 1 · Mcc
dimensionstringrequired
codesstring[]required
Option 2 · MerchantCountry
dimensionstringrequired
countriesstring[]required
Option 2 · ChannelRestriction
typestringrequired
scopeobjectrequired

Where the policy attaches.

Show child attributes
Option 1 · Project
typestringrequired
Option 2 · User
typestringrequired
idstring<uuid>required
Option 3 · Card
typestringrequired
idstring<uuid>required
namestringrequired

Human-readable label.

configobjectrequired

Block transactions on the listed channels.

Show child attributes
channelsstring[]required
Available options:ATMPOSECOMMERCEVISA_DIRECT
Option 3 · TransactionAmountLimit
typestringrequired
scopeobjectrequired

Where the policy attaches.

Show child attributes
Option 1 · Project
typestringrequired
Option 2 · User
typestringrequired
idstring<uuid>required
Option 3 · Card
typestringrequired
idstring<uuid>required
namestringrequired

Human-readable label.

configobjectrequired

Cap the amount of a single transaction.

Show child attributes
maxAmountnumberrequired

Amount in the project's billing currency.

Option 4 · SpendLimit
typestringrequired
scopeobjectrequired

Where the policy attaches.

Show child attributes
Option 1 · Project
typestringrequired
Option 2 · User
typestringrequired
idstring<uuid>required
Option 3 · Card
typestringrequired
idstring<uuid>required
namestringrequired

Human-readable label.

configobjectrequired

Cap cumulative spend over a calendar window.

Show child attributes
windowobjectrequired
Show child attributes
typestringrequired
periodstringrequired
Available options:DAILYWEEKLYMONTHLYYEARLYLIFETIME
maxAmountnumberrequired

Amount in the project's billing currency.

filterobject
Show child attributes
channelsstring[]
Available options:ATMPOSECOMMERCEVISA_DIRECT
merchantobject
Show child attributes
Option 1 · Mcc
dimensionstringrequired
codesstring[]required
Option 2 · MerchantCountry
dimensionstringrequired
countriesstring[]required
Option 5 · AuthorizationCountLimit
typestringrequired
scopeobjectrequired

Where the policy attaches.

Show child attributes
Option 1 · Project
typestringrequired
Option 2 · User
typestringrequired
idstring<uuid>required
Option 3 · Card
typestringrequired
idstring<uuid>required
namestringrequired

Human-readable label.

configobjectrequired

Cap the number of transactions over a calendar window.

Show child attributes
windowobjectrequired
Show child attributes
typestringrequired
periodstringrequired
Available options:DAILYWEEKLYMONTHLYYEARLYLIFETIME
maxCountintegerrequired

Maximum number of transactions in the window.

filterobject
Show child attributes
channelsstring[]
Available options:ATMPOSECOMMERCEVISA_DIRECT
merchantobject
Show child attributes
Option 1 · Mcc
dimensionstringrequired
codesstring[]required
Option 2 · MerchantCountry
dimensionstringrequired
countriesstring[]required

Response

200Policy resource
Option 1 · MerchantRestrictionPolicy
idstringrequired

Policy ID. A UUID for your policies; a stable identifier for platform policies.

scopeobjectrequired

Where the policy attaches.

Show child attributes
Option 1 · Project
typestringrequired
Option 2 · User
typestringrequired
idstring<uuid>required
Option 3 · Card
typestringrequired
idstring<uuid>required
statusstringrequired
Available options:ACTIVEDISABLED
namestringrequired

Human-readable label.

createdAtstringrequired

ISO 8601 creation timestamp.

updatedAtstringrequired

ISO 8601 last-update timestamp.

typestringrequired
configobjectrequired

Block transactions whose merchant matches the criteria.

Show child attributes
matchobjectrequired
Show child attributes
Option 1 · Mcc
dimensionstringrequired
codesstring[]required
Option 2 · MerchantCountry
dimensionstringrequired
countriesstring[]required
Option 2 · ChannelRestrictionPolicy
idstringrequired

Policy ID. A UUID for your policies; a stable identifier for platform policies.

scopeobjectrequired

Where the policy attaches.

Show child attributes
Option 1 · Project
typestringrequired
Option 2 · User
typestringrequired
idstring<uuid>required
Option 3 · Card
typestringrequired
idstring<uuid>required
statusstringrequired
Available options:ACTIVEDISABLED
namestringrequired

Human-readable label.

createdAtstringrequired

ISO 8601 creation timestamp.

updatedAtstringrequired

ISO 8601 last-update timestamp.

typestringrequired
configobjectrequired

Block transactions on the listed channels.

Show child attributes
channelsstring[]required
Available options:ATMPOSECOMMERCEVISA_DIRECT
Option 3 · TransactionAmountLimitPolicy
idstringrequired

Policy ID. A UUID for your policies; a stable identifier for platform policies.

scopeobjectrequired

Where the policy attaches.

Show child attributes
Option 1 · Project
typestringrequired
Option 2 · User
typestringrequired
idstring<uuid>required
Option 3 · Card
typestringrequired
idstring<uuid>required
statusstringrequired
Available options:ACTIVEDISABLED
namestringrequired

Human-readable label.

createdAtstringrequired

ISO 8601 creation timestamp.

updatedAtstringrequired

ISO 8601 last-update timestamp.

typestringrequired
currencystringrequired

Currency of the policy's amounts - the billing currency of the project's card program.

configobjectrequired

Cap the amount of a single transaction.

Show child attributes
maxAmountnumberrequired

Amount in the project's billing currency.

Option 4 · SpendLimitPolicy
idstringrequired

Policy ID. A UUID for your policies; a stable identifier for platform policies.

scopeobjectrequired

Where the policy attaches.

Show child attributes
Option 1 · Project
typestringrequired
Option 2 · User
typestringrequired
idstring<uuid>required
Option 3 · Card
typestringrequired
idstring<uuid>required
statusstringrequired
Available options:ACTIVEDISABLED
namestringrequired

Human-readable label.

createdAtstringrequired

ISO 8601 creation timestamp.

updatedAtstringrequired

ISO 8601 last-update timestamp.

typestringrequired
currencystringrequired

Currency of the policy's amounts - the billing currency of the project's card program.

configobjectrequired

Cap cumulative spend over a calendar window.

Show child attributes
windowobjectrequired
Show child attributes
typestringrequired
periodstringrequired
Available options:DAILYWEEKLYMONTHLYYEARLYLIFETIME
maxAmountnumberrequired

Amount in the project's billing currency.

filterobject
Show child attributes
channelsstring[]
Available options:ATMPOSECOMMERCEVISA_DIRECT
merchantobject
Show child attributes
Option 1 · Mcc
dimensionstringrequired
codesstring[]required
Option 2 · MerchantCountry
dimensionstringrequired
countriesstring[]required
Option 5 · AuthorizationCountLimitPolicy
idstringrequired

Policy ID. A UUID for your policies; a stable identifier for platform policies.

scopeobjectrequired

Where the policy attaches.

Show child attributes
Option 1 · Project
typestringrequired
Option 2 · User
typestringrequired
idstring<uuid>required
Option 3 · Card
typestringrequired
idstring<uuid>required
statusstringrequired
Available options:ACTIVEDISABLED
namestringrequired

Human-readable label.

createdAtstringrequired

ISO 8601 creation timestamp.

updatedAtstringrequired

ISO 8601 last-update timestamp.

typestringrequired
configobjectrequired

Cap the number of transactions over a calendar window.

Show child attributes
windowobjectrequired
Show child attributes
typestringrequired
periodstringrequired
Available options:DAILYWEEKLYMONTHLYYEARLYLIFETIME
maxCountintegerrequired

Maximum number of transactions in the window.

filterobject
Show child attributes
channelsstring[]
Available options:ATMPOSECOMMERCEVISA_DIRECT
merchantobject
Show child attributes
Option 1 · Mcc
dimensionstringrequired
codesstring[]required
Option 2 · MerchantCountry
dimensionstringrequired
countriesstring[]required
400Response for status 400
Option 1 · PolicyScopeNotFoundError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Option 2 · InvalidPolicyScopeError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired