Create a key
1
Open API keys
In the dashboard, open API keys and click Create key.
2
Name it and choose what it can call
- Name: what uses it, for example
Production backend. At most 60 characters. - Scope: All agents in the organization, or one agent.
- Expires: optional. Leave it empty and the key works until you revoke it. A date means the key stops working at the end of that day, in your time zone.
3
Copy the key
The key is shown once. Copy it now: Onecortex keeps only a hash of it, so nobody, including Onecortex, can show it to you again. If you lose it, create another.
Terminal
Use a key
Send it as a bearer token on every call:401 and one message for every case, A valid Onecortex API key is required., so the response never tells anyone which keys exist. A key scoped to one agent, used against another, gets 404 That agent does not exist.