Authorization header on every HTTP request, and Knock2 validates it before processing anything. This page explains how to obtain a key, how to format the header correctly, what permissions (scopes) keys can carry, and how to interpret authentication and rate-limiting errors when they occur.
Getting your API key
Log in to the Knock2 dashboard and go to Settings → API Keys. Click Create API Key, enter a descriptive label (for example,backend-production or zapier-integration), and copy the key that appears.
All Knock2 API keys are prefixed with kn_live_ so you can recognise them in logs and configuration files:
Making authenticated requests
Pass your API key in theAuthorization header of every request, using the Bearer token format:
Knock2 uses Bearer token format. The
Authorization header value must begin with the literal word Bearer (capital B), followed by a single space, followed by your API key. Omitting the word Bearer or using a different scheme (such as Token or Basic) will result in a 401 error.API key scopes
When you create an API key you assign it one or more scopes. Scopes follow the principle of least privilege — grant only the permissions a given integration actually needs.
A key missing the scope an endpoint requires gets a
403 Forbidden — see Authentication errors below.
A valid, correctly-scoped key can still be blocked with
402 Payment Required on every /v1 route, including GET /v1/me, if the workspace it belongs to is deactivated (is_product_slug_active = false) — see Deactivate a Tenant. This is separate from the enrichment-credit 402 and isn’t fixed by rotating keys or scopes.GET /v1/me confirms a key is valid and returns the tenant it belongs to, but does not return the key’s scopes:
Authentication errors
A401 Unauthorized response means Knock2 could not verify your identity. The response body follows Knock2’s standard error envelope:
Rate limiting
Knock2 enforces per-key rate limits to protect the stability of the platform. If you exceed your allotted request volume, the API returns a429 Too Many Requests response:
retry_after field in the body. Instead, every API response includes the following headers so you can monitor your usage proactively and know when to retry:
Here’s a minimal exponential backoff implementation: