Projects and API keys
One project per application, one key per environment: how to create, use and revoke them.
Projects
A project groups everything about one application or site: its API keys, its decision log, its statistics. Create one project per application: a store, an API, a marketing site…
In the dashboard, the project selector (top left) lets you create a project and switch between them. Each project has a name and an identifier (lowercase letters, digits, - and _), unique within your account. The project's internal ID never changes, even if you rename it.
API keys
An API key connects your application to Zarex. Create it in API keys, with a name (for example "Production server") and an environment:
| Environment | Prefix | Use it |
|---|---|---|
| Test | zarex_test_ | Locally and in staging. |
| Production | zarex_live_ | On your live site. |
The environment of each decision is visible in the decision log: you can tell test traffic from real traffic.
The key is shown only once
Zarex only keeps a fingerprint of it: it cannot be shown again. Copy it as soon as it is created, and store it in your server's environment variables (ZAREX_KEY), never in your code or in Git.
The key list shows the name, the beginning of each key (to recognize it), the environment and the status.
Revoke a key
A lost, exposed or no longer needed key is revoked from the list. Revocation is permanent: applications using it are no longer protected. They keep working (fail-open), and the SDK reports it in their logs.
To replace a key without interruption:
Deploy it
Update ZAREX_KEY on your servers, and check that decisions show up in the decision log.