Agentic

Create enrollment

POSThttps://api.firstleeward.com/v0/agentic/enrollments

Stores a card for later agentic purchases. EXTERNAL returns a redirect to a hosted card-entry page and becomes ACTIVE once the customer submits their card. LEEWARD_CARD and BIN_SPONSOR are coming soon. Pass the enrollment id to POST /agentic/checkouts to charge it.

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-Keystringrequired

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 · First Leeward card
sourcestringrequired
cardIdstring<uuid>required

Card identifier to enroll

presentationobjectrequired

Redirect config for the hosted First Leeward card device-binding flow

Show child attributes
typestringrequired
returnUrlstring<uri>required

HTTPS URL the browser returns to after the hosted flow

Option 2 · BIN sponsor
sourcestringrequired
cardIdstringrequired

BIN-sponsor card identifier to enroll

ownerobjectrequired

The client customer that owns this BIN-sponsor enrollment

Show child attributes
typestringrequired
idstringrequired

The client customer identifier

emailstring<email>required

Customer email address

namestringrequired

Cardholder name

presentationobjectrequired

Redirect config for the hosted BIN-sponsor card device-binding flow

Show child attributes
typestringrequired
returnUrlstring<uri>required

HTTPS URL the browser returns to after the hosted flow

Option 3 · External
sourcestringrequired
ownerobjectrequired

The client customer that owns this enrollment

Show child attributes
typestringrequired
idstringrequired

The client customer identifier

emailstring<email>required

Customer email address

presentationobjectrequired

Redirect config for the hosted card-entry flow

Show child attributes
typestringrequired
returnUrlstring<uri>required

HTTPS URL the browser returns to after the hosted flow

Response

200Created enrollment. The response shape depends on `source`.
Option 1 · First Leeward card
idobjectrequired
statusstringrequired
Available options:REQUIRES_ACTIONACTIVEFAILEDEXPIREDREVOKED
nextActionobject | nullrequired
Show child attributes
typestringrequired
Available options:REDIRECT
urlstring<uri>required
expiresAtobject
sourcestringrequired
ownerobjectrequired
Show child attributes
typestringrequired
idstring<uuid>required

User identifier

Option 2 · BIN sponsor
idobjectrequired
statusstringrequired
Available options:REQUIRES_ACTIONACTIVEFAILEDEXPIREDREVOKED
nextActionobject | nullrequired
Show child attributes
typestringrequired
Available options:REDIRECT
urlstring<uri>required
expiresAtobject
sourcestringrequired
ownerobjectrequired

The client customer that owns this BIN-sponsor enrollment

Show child attributes
typestringrequired
idstringrequired

The client customer identifier

emailstring<email>required

Customer email address

namestringrequired

Cardholder name

Option 3 · External
idobjectrequired
statusstringrequired
Available options:REQUIRES_ACTIONACTIVEFAILEDEXPIREDREVOKED
nextActionobject | nullrequired
Show child attributes
typestringrequired
Available options:REDIRECT
urlstring<uri>required
expiresAtobject
sourcestringrequired
ownerobjectrequired

The client customer that owns this enrollment

Show child attributes
typestringrequired
idstringrequired

The client customer identifier

emailstring<email>required

Customer email address

400The request was rejected
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailnullrequired
404Response for status 404
Option 1 · AgenticResourceNotFoundError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
Option 2 · AgenticCardNotFoundError
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired
503Agentic Payments is temporarily unavailable
errorobjectrequired
Show child attributes
codestringrequired
messagestringrequired
detailobject | nullrequired