Create Knot Zero Link

Changed on

Create a Knot Zero link for a single user.

post/zero-link/create

Request

  • Base URL
    https://development.knotapi.com
  • URL
    https://development.knotapi.com/zero-link/create
  • Auth
    HTTP basic

Request body

type'card_switcher' | 'link' required

Product to associate the link with. Use link with merchant_id to open the link on a single merchant.

merchant_idinteger

ID of the merchant to open the link on. Required when type = link. Get merchant IDs, which are the same in every environment, from List Merchants.

phone_numberstring required

User's phone number in E.164 format. Must be a valid US or Canadian phone number. Knot sends a one-time code to this number to verify the user each time they open the link.

external_user_idstring required

Your unique identifier for the user.

card_idstring

Your unique identifier for the user's card. Required when type = card_switcher.

Example request

{
  "type": "card_switcher",
  "merchant_id": 17,
  "phone_number": "+12025550123",
  "external_user_id": "123abc",
  "card_id": "81n9al10a0ayn13"
}

Response

Successful request.

linkstring

The Knot Zero link for the user: your base link with a unique token appended that references the user's stored parameters. Share it as a URL or encode it as a QR code. The link can be opened any number of times, with a new one-time code each time, and expires after 1 year. It stops working earlier if you create a new link for the same user and card, or revoke it.

tokenstring

The unique token in link, returned separately so you don't need to parse it from the link.

Example response

{
  "link": "https://clip.knotapi.com/switch?token=example_knot_zero_token_1xxxxxxxxxxxxxxxxxx",
  "token": "example_knot_zero_token_1xxxxxxxxxxxxxxxxxx"
}

Changes