curl --request POST \
--url https://development.knotapi.com/zero-link/create \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "card_switcher",
"phone_number": "+12025550123",
"external_user_id": "123abc",
"card_id": "81n9al10a0ayn13"
}
'{
"link": "https://clip.knotapi.com/switch?token=example_knot_zero_token_1xxxxxxxxxxxxxxxxxx",
"token": "example_knot_zero_token_1xxxxxxxxxxxxxxxxxx"
}Create Knot Zero Link
Create a Knot Zero link for a single user.
curl --request POST \
--url https://development.knotapi.com/zero-link/create \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "card_switcher",
"phone_number": "+12025550123",
"external_user_id": "123abc",
"card_id": "81n9al10a0ayn13"
}
'{
"link": "https://clip.knotapi.com/switch?token=example_knot_zero_token_1xxxxxxxxxxxxxxxxxx",
"token": "example_knot_zero_token_1xxxxxxxxxxxxxxxxxx"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password. Use your client_id as the username and your secret as the password value.
Body
The parameters to include in the user's link.
Product to associate the link with. Use link with merchant_id to open the link on a single merchant.
card_switcher, link "card_switcher"
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.
"+12025550123"
Your unique identifier for the user.
256"123abc"
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.
17
Your unique identifier for the user's card. Required when type = card_switcher.
256"81n9al10a0ayn13"
Response
Successful request.
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.
"https://clip.knotapi.com/switch?token=example_knot_zero_token_1xxxxxxxxxxxxxxxxxx"
The unique token in link, returned separately so you don't need to parse it from the link.
"example_knot_zero_token_1xxxxxxxxxxxxxxxxxx"
Was this page helpful?