Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.knotapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Authentication to the API is performed via HTTP basic authentication. Requests made over plain HTTP or without authentication will fail. In each request, pass a base64-encoded string username:password as an authorization header. In the Knot Dashboard, you will find your client_id and secret for the development environment, which you can use as the basic auth username and password respectively. When you are ready to go to production, use your production client_id and generated secret from the Knot Dashboard for the authentication header.

URLs

EnvironmentURL
Developmenthttps://development.knotapi.com
Productionhttps://production.knotapi.com

Base64 Encoding

To create the basic authorization header, base64 encode your client_id and secret in the format client_id:secret like below.
const clientId = "your_client_id";
const secret = "your_secret";

// Combine client_id and secret with a colon
const credentials = `${clientId}:${secret}`;

// Base64 encode the credentials
const encodedCredentials = Buffer.from(credentials).toString('base64');

// Use in Authorization header
const authHeader = `Basic ${encodedCredentials}`;
console.log(authHeader);