Skip to navigation

Authentication and API keys

How to create an Atlas API key, send it with each request, rotate it and keep it safe.

Every API request carries an API key in the api-key header. The key identifies your account. Atlas looks it up and runs the request as you.

curl 'https://api.youratlas.com/v1/api/campaign' \
--header 'api-key: YOUR_API_KEY'

(/campaign is the list of your jobs. The API calls a job a campaign.)

Create a key

Watch on YouTube: Atlas 101 · Find your API keys

  1. Sign in to the Atlas app.
  2. In the sidebar, open Settings. Under More settings, select API keys.
  3. Select Create API key.
  4. In Label (optional), type a name if you want one, for example “Production server”. It holds up to 50 characters.
  5. Select Create key.
  6. Copy the key and store it somewhere safe.

The list shows each key’s label, the key itself (hidden until you select Show) and when it was created. You can Show, Hide and Copy a key from the list at any time. You are not limited to one look at it.

How many keys you can have

You can have up to 5 active keys. Give each system its own key. Then you can turn one off without breaking the rest.

When you have 5, the Create API key button is hidden and the page says “You can have up to 5 active API keys. Delete one to create another.” If you call the API to create a sixth, it returns 409:

{"message":"Customer has reached the maximum of 5 active API keys.","code":"API_KEY_LIMIT_REACHED"}

Rotate a key

Use Refresh - Generate new key on the key, then select Refresh Key to confirm. Atlas deletes that key and makes a new one with the same label. Anything using the old key loses access right away.

To avoid a gap, do it in this order:

  1. Create a second key.
  2. Switch your system to the new key.
  3. Delete the old key.

This works while you have fewer than 5 keys.

If making the new key fails during a refresh, the old key is already gone. Check the list and create a new one.

Delete a key

Use Delete on the key, then select Delete again in Delete API Key to confirm. The key stops working immediately. This cannot be undone.

Manage keys with the API

You can also list, create and delete keys from the API or the CLI.

TaskHTTPCLI
List keysGET /open-apiatlas api-key get-api-keys
Create a keyPOST /open-apiatlas api-key create-api-key
Delete a keyDELETE /open-api/{apikey}atlas api-key delete-api-key <apikey>
curl 'https://api.youratlas.com/v1/api/open-api' \
--request POST \
--header 'api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"label": "Production server"}'
  • The JSON body with label is optional. A label longer than 50 characters, or a body that isn’t valid JSON, returns 400 with {"message":"Label must be valid JSON with at most 50 characters.","code":"INVALID_LABEL"}.
  • With the CLI, pass the label as a body: atlas api-key create-api-key --body '{"label": "Production server"}'.
  • Deleting a key turns it off. A key id that doesn’t exist returns 404 with {"message":"API key not found."}.

Send the key

Put it in the api-key header on every request.

Use the header only. The gateway reads the key from the header and nowhere else. A key in the URL is ignored and you get 401 with “Missing Api-Key header.” URLs also end up in logs, browser history and proxy records.

What a key can do

A key acts as your account. It can reach what your account can reach through the API: jobs, call records, contacts, knowledge files, phone numbers and settings.

There is no read-only key. There is no per-job key. You can’t limit a key to certain endpoints. Treat every key as full access.

So for anything an AI agent or a contractor uses, make a dedicated key with a clear label. Delete it when the work ends.

What happens when it is wrong

SituationStatusBody
No api-key header401{"message":"Missing Api-Key header."}
Key is wrong, deleted or turned off401{"message":"Invalid or inactive Api-Key."}
You already have 5 active keys (creating a key)409{"message":"Customer has reached the maximum of 5 active API keys.","code":"API_KEY_LIMIT_REACHED"}
Label over 50 characters (creating a key)400{"message":"Label must be valid JSON with at most 50 characters.","code":"INVALID_LABEL"}

More in Errors.

Keep keys safe

  • Store keys in an environment variable or a secrets manager.
  • Never put a key in client-side code, a public repo, a chat or a screenshot.
  • Give each system its own key.
  • Delete keys you no longer use.
  • If a key leaks, delete it first. Then make a new one.