Skip to main content
All API requests require authentication. The Atomscale API uses API key authentication via the X-API-KEY header.

Obtaining an API Key

  1. Log in to the Atomscale Dashboard
  2. Click your name at the bottom of the sidebar, then select Manage account > Access
  3. Enter a Label (optional) to identify the key, and choose an Expiration (see Key Expiration)
  4. Click Generate API Key
  5. Copy and securely store the key. It is only shown once.
Treat your API keys like passwords. Never commit them to version control or share them publicly.

Using Your API Key

Include your API key in the X-API-KEY header of every request:

Code Examples

Environment Variables

For security, store your API key in an environment variable rather than hardcoding it. The SDK reads AS_API_KEY automatically when you create a Client() without an api_key argument (it also accepts ATOMSCALE_API_KEY as a fallback):

Key Permissions

API keys do not have separate scopes. A request made with your key has the same permissions as your user account.

Key Expiration

  • When you generate a key, you can set it to expire after 7, 30, 60, or 90 days, or never. The default is 90 days.
  • A banner at the top of the dashboard warns you when a key will expire within 14 days.
  • A key that goes unused for 90 days is revoked automatically, whatever expiration you chose.
  • Generating a new key immediately expires your previous key. Update any applications that use the old key.
  • Requests made with an expired or revoked key return 401 Unauthorized.

Revoking Keys

If a key is compromised or no longer needed:
  1. Open the Access page (click your name at the bottom of the sidebar, then select Manage account > Access)
  2. Find the key and click Revoke, then click Revoke again to confirm
  3. The key is immediately invalidated
Revoking a key cannot be undone. Any applications using that key will stop working immediately.