Agentic
Create enrollment
https://api.firstleeward.com/v0/agentic/enrollmentsStores 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 · headerrequiredAPI key as Bearer token, e.g. Bearer YOUR_API_KEY
Headers
Leeward-Versionenum<string>requiredAPI version (YYYY-MM-DD). Available option: 2026-09-18
Idempotency-KeystringrequiredUnique 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
sourcestringrequiredcardIdstring<uuid>requiredCard identifier to enroll
presentationobjectrequiredRedirect config for the hosted First Leeward card device-binding flow
Show child attributes
typestringrequiredreturnUrlstring<uri>requiredHTTPS URL the browser returns to after the hosted flow
Option 2 · BIN sponsor
sourcestringrequiredcardIdstringrequiredBIN-sponsor card identifier to enroll
ownerobjectrequiredThe client customer that owns this BIN-sponsor enrollment
Show child attributes
typestringrequiredidstringrequiredThe client customer identifier
emailstring<email>requiredCustomer email address
namestringrequiredCardholder name
presentationobjectrequiredRedirect config for the hosted BIN-sponsor card device-binding flow
Show child attributes
typestringrequiredreturnUrlstring<uri>requiredHTTPS URL the browser returns to after the hosted flow
Option 3 · External
sourcestringrequiredownerobjectrequiredThe client customer that owns this enrollment
Show child attributes
typestringrequiredidstringrequiredThe client customer identifier
emailstring<email>requiredCustomer email address
presentationobjectrequiredRedirect config for the hosted card-entry flow
Show child attributes
typestringrequiredreturnUrlstring<uri>requiredHTTPS URL the browser returns to after the hosted flow
Response
200Created enrollment. The response shape depends on `source`.
Option 1 · First Leeward card
idobjectrequiredstatusstringrequiredREQUIRES_ACTIONACTIVEFAILEDEXPIREDREVOKEDnextActionobject | nullrequiredShow child attributes
typestringrequiredREDIRECTurlstring<uri>requiredexpiresAtobjectsourcestringrequiredownerobjectrequiredShow child attributes
typestringrequiredidstring<uuid>requiredUser identifier
Option 2 · BIN sponsor
idobjectrequiredstatusstringrequiredREQUIRES_ACTIONACTIVEFAILEDEXPIREDREVOKEDnextActionobject | nullrequiredShow child attributes
typestringrequiredREDIRECTurlstring<uri>requiredexpiresAtobjectsourcestringrequiredownerobjectrequiredThe client customer that owns this BIN-sponsor enrollment
Show child attributes
typestringrequiredidstringrequiredThe client customer identifier
emailstring<email>requiredCustomer email address
namestringrequiredCardholder name
Option 3 · External
idobjectrequiredstatusstringrequiredREQUIRES_ACTIONACTIVEFAILEDEXPIREDREVOKEDnextActionobject | nullrequiredShow child attributes
typestringrequiredREDIRECTurlstring<uri>requiredexpiresAtobjectsourcestringrequiredownerobjectrequiredThe client customer that owns this enrollment
Show child attributes
typestringrequiredidstringrequiredThe client customer identifier
emailstring<email>requiredCustomer email address
400The request was rejected
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailnullrequired404Response for status 404
Option 1 · AgenticResourceNotFoundError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequiredOption 2 · AgenticCardNotFoundError
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequired503Agentic Payments is temporarily unavailable
errorobjectrequiredShow child attributes
codestringrequiredmessagestringrequireddetailobject | nullrequired