Skip to main content
POST
/
card
cURL
curl --request POST \
  --url https://development.knotapi.com/card \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jwe": "eyJhbGciOiJSU0EtT0FFUC0yNTYiLC...",
  "task_id": "123456",
  "external_user_id": "abc123",
  "merchant_id": 46,
  "card_name": "My Credit Card",
  "customer_name": "John Doe"
}
'
{
"message": "Success"
}
See code samples here for how to structure and encrypt the JWE in various programming languages.
Receiving a successful response from this endpoint means your request has passed validations, including for the jwe.

Authorizations

Authorization
string
header
required

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

application/json

The input parameters required for switching a card.

jwe
string
required

JWE value.

Example:

"eyJhbGciOiJSU0EtT0FFUC0yNTYiLC..."

task_id
string

task_id value provided in the AUTHENTICATED webhook. Required if you received the AUTHENTICATED webhook.

Example:

"123456"

external_user_id
string

Your unique identifier for the user. Only necessary if you are provisioning a card to an already connected merchant account all server-side.

Example:

"abc123"

merchant_id
integer

Unique identifier for the merchant. Only necessary if you are provisioning a card to an already connected merchant account all server-side.

Example:

46

card_name
string

Name of the card. Recommended only if you are provisioning a card to an already connected merchant account all server-side. Learn more here.

Example:

"My Credit Card"

customer_name
string

Name of the customer. Recommended only if you are provisioning a card to an already connected merchant account all server-side. Learn more here.

Example:

"John Doe"

Response

Successful request. Receiving this response means your request has passed validations, including the jwe.

message
string

Success message.

Example:

"Success"