v1

latestOpenAPI 3.1.02026-07-262218115.4 KB

Create a session and use it to initialize the SDK.

post/session/create

Request body

type'card_switcher' | 'transaction_link' | 'link' | 'vault' required

Product to associate the session with.

external_user_idstring required

Your unique identifier for the user.

card_idstring nullable

Your unique identifier for a specific card. Required when type = card_switcher. Optionally accepted when type = vault.

emailstring nullable

User's email address. When provided, Knot will automatically detect the user's online merchant accounts to personalize the experience in the SDK.

phone_numberstring nullable

User's phone number in E.164 format. When provided, Knot will automatically detect the user's online merchant accounts to personalize the experience in the SDK.

processor_tokenstring nullable

Plaid processor_token if using transaction data from Plaid to detect merchants.

metadataobject nullable

Optional key-value pairs to include in webhook payloads. Maximum 10 keys, 500 characters per value.

Example request

{
  "type": "card_switcher",
  "external_user_id": "123abc",
  "card_id": "81n9al10a0ayn13",
  "email": "ada.lovelace@gmail.com",
  "phone_number": "+11234567890",
  "metadata": {
    "reference_token": "abc123",
    "trace_id": "def456"
  }
}

Response

Successful request.

sessionstring

A session.

Example response

{
  "session": "915efe72-5136-4652-z91q-d9d48003c102"
}