Create a key
- Open the Klatt console and go to Settings, then API keys.
- Create a key and give it a name that says where it is used.
- Copy the key immediately. It is shown only once and cannot be retrieved later.
sk_klt_.... Older keys may start with a different prefix and work the same way.
Send the key
Send the key in theAuthorization header as a Bearer token:
X-API-Key: <key> header is accepted as an alternative. Send exactly one credential per request: a request with both headers, or with a repeated header, is rejected.
What a key can do
- A key belongs to one organization and can only reach that organization’s data.
- A key acts with Editor permissions: it can read and change agents, conversations, contacts and knowledge, but not administer the organization. Actions are attributed to the member who created the key. A key keeps working after that member leaves the organization: delete their keys when they leave.
- A key cannot manage API keys, members or invitations, place customer calls, or run campaigns. These requests answer
403. - Operations that are not in this reference may still answer with a key, but they are not part of the API contract and can change without notice.
Where keys work
Keys work only onhttps://api.klatt.ai. Sending a key to the console host is rejected with the code api_key_wrong_host, and sending a console sign-in token to the API host is rejected with console_token_not_accepted.
Rotate and delete keys
To rotate a key, create a new one, deploy it, then delete the old key in the console. A deleted key stops working immediately. Keys do not expire. They work until you delete them.401 and 403
See Errors for the response format.