POST
/
session
/
create
curl --request POST \
  --url https://development.knotapi.com/session/create \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "card_switcher",
  "external_user_id": "123abc",
  "card_id": "81n9al10a0ayn13",
  "phone_number": "+11234567890",
  "email": "ada.lovelace@gmail.com",
  "card": {
    "blocked": false,
    "has_funds": true
  },
  "processor_token": "processor-production-0asd1-a92nc"
}'
{
"session": "915efe72-5136-4652-z91q-d9d48003c102"
}

Sessions last 30 minutes. It is best practice to create a new session each time you initialize the SDK and not log the session in any internal or 3rd party tooling.

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 creating a session.

The body is of type object.

Response

200
application/json

Successful request.

The response is of type object.