On this page
Create and manage Generate API keys
Create an API key in Settings, limit it to chat agents or workflows, store its token safely, and revoke it when an external system no longer needs it.
This page shows you how to create the API keys that let a system outside Generate call your agents and workflows over HTTPS.
Each key belongs to the person who created it, and calls made with it run as that person.
Create a key
Section titled “Create a key”Make a key for one external system and keep its token safe.
-
Open API Keys
Open your account menu, select Settings, then API Keys.
Open full sizeShown in the enterprise edition. -
Select Create key
The Create API key window opens.
-
Name the key
Enter a Name that says which system uses it, such as “Production CRM bot”.
-
Choose its capabilities
Under Capabilities, keep Chat agents, Workflows or both. Both are ticked to start with, and a key can only call what it is scoped for.
Open full sizeShown in the enterprise edition. -
Select Create key
Save your API key shows the token.
-
Store the token
Copy the token and store it in your secret manager, then select I’ve saved it. The token is shown once and Generate cannot show it to you again, so a lost token means creating a new key.
A key is authorized on every workflow you own and every workflow shared with you. You do not attach it to workflows one at a time.
Change or revoke a key
Section titled “Change or revoke a key”Rename a key, change what it may call, or turn it off for good.
-
Open the key’s menu
On API Keys, open the menu on the key’s row.
-
Select Edit or Revoke
Edit changes its name or capabilities. Revoke disables it for every caller at once; Generate asks you to confirm, because a revoked key cannot be restored.
The key list
Section titled “The key list”| Column | What it shows |
|---|---|
| Name | The name you gave the key |
| Prefix | The start of the token, to tell keys apart without exposing them |
| Scope | Chat agents, Workflows or both |
| Last used | When a call last arrived with the key |
| Status | Active, or Revoked |
Use Search keys to find a key by name, and Sort by to order the list by Date created, by name or by Status.
Keys Generate creates for you
Section titled “Keys Generate creates for you”You do not always need to create a key yourself. Turning on API Access for an agent, or adding an HTTP Trigger node to a workflow, provisions a key for you the first time, and it appears in this list like any other. See Call an agent over HTTP and Trigger a workflow over HTTP.
Errors a caller sees
Section titled “Errors a caller sees”| Status | Meaning |
|---|---|
| 401 “Missing X-API-Key header” | The request carried no key. |
| 401 “Invalid API key” | The key is wrong, revoked, or its owner’s account is no longer active. |
| 403 “This API key is not scoped to trigger chat agents.” | Edit the key and add Chat agents. |
| 403 “This API key is not scoped to trigger workflows.” | Edit the key and add Workflows. |
| 404 | The agent or workflow does not exist, or the key’s owner cannot reach it. |
Last updated on