Authentication

Send your key in the Authorization header of every request:

Authorization: Bearer al_test_…

These need no key at all: GET /v1/meta/conventions.

Key kinds

Kind Starts with What it does
Test al_test_ Real engine, never charged; meta.mode is test. Each project has a daily allowance of test calls, shared by all its test keys.
Live al_live_ Spends your plan's credits. Only successful (2xx) calls are charged.
Publishable al_pub_ For widgets in the browser: read-only operations without birth data, and only from the web origins you list.

Test and live keys are secret. Use them only from your server, never in a web page or a mobile app.

Publishable keys

A publishable key can call only these operations:

The request's Origin header must exactly match one of the key's allowed origins, such as https://www.example.com. Otherwise the API answers 403 domain_not_allowed. Any other operation answers 403 scope_not_allowed.

Rotating a key

  1. On API keys, choose Rotate. A new key with the same name and settings is created, and the old one keeps working.
  2. Deploy the new key.
  3. Revoke the old key. It stops working on the next request.

When a key is refused

Missing, malformed, unknown, revoked and expired keys all get the same answer, 401 invalid_api_key, so nobody can probe which keys exist.