Skip to main content
The Klatt API authenticates requests with an organization API key.

Create a key

  1. Open the Klatt console and go to Settings, then API keys.
  2. Create a key and give it a name that says where it is used.
  3. Copy the key immediately. It is shown only once and cannot be retrieved later.
Keys look like sk_klt_.... Older keys may start with a different prefix and work the same way.
An API key grants access to your organization’s data. Keep it on your servers: never put it in a browser page, a mobile app, a public repository or a shared configuration file. Load it from an environment variable or a secrets manager. If a key leaks, delete it in the console and create a new one.

Send the key

Send the key in the Authorization header as a Bearer token:
The 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 on https://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.