API Keys
API tokens let your scripts and automation tools authenticate to the Anzenna API. This guide walks you through generating a token, scoping its permissions, and using it to make authenticated requests.
API keys are managed under Settings > Access, which is available to workspace admins. If you don't see the Access section, ask a workspace admin to generate a token for you or grant you the admin role.
Generate a Token
Navigate to Settings > Access and select the API Keys tab (
/u/access/api-keys).Click the Create Token (
+) button in the toolbar.
Step 1: Name the token
Give the token a descriptive name so you can identify it later, for example the tool or workflow that will use it (Tines Integration, Nightly Export). The name is only used for display and can't be changed after creation.
Step 2: Set permissions
Choose the minimal permissions the token needs. Use the presets to apply one access level across every scope at once, or set each scope individually:
None: no access (start here and grant only what's needed)
Read-only: fetch data without making changes
Read and write: fetch data and perform actions
Permissions are granted per scope. Each scope can be set to None, Read-only, or Read and write independently:
| Scope | Grants access to |
|---|---|
Admin | View and control all aspects of the platform |
Training | Monitor training completion and manage assignments |
Detection | Detection events and security alerts |
Risk | Risk scores and risk assessments |
Remediation | View and set up remediation tasks |
Device | Device information and statuses |
Shadow IT | Unauthorized applications and services |
Password Compromise | Reports of exposed or compromised passwords |
OAuth | OAuth applications and permissions |
Browser App | Browser extension data and activity |
Identity | Identity events, authentication activity, and breach alerts |
Person | Details about individuals in your organization |
Email | Email flows and metadata |
Webhook | Send webhook events |
Once at least one scope is granted, click Generate Key.
Step 3: Copy your token
Anzenna displays the token value once. Copy it now and store it in a secrets
manager. You won't be able to see it again. Anzenna tokens
are prefixed with anzak1-.
Never commit tokens to source control or paste them into public places such as GitHub, client-side code, or public repositories. If a token is exposed, delete it (see
Manage Tokens
) and generate a new one.
Use the Token
Pass the token as a bearer token in the
Authorization header on every
request. The API base URL is
https://api.anzenna.ai.
Authorization: Bearer <your-api-token>
curl -X POST https://api.anzenna.ai/api-key/v1/events \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ANZENNA_API_TOKEN" \
-d '{"query": "risk_score > 4.0"}'
Browse the full list of endpoints and try them interactively in the
Anzenna API reference
. For an end-to-end example of enriching webhook payloads via the API, see
Webhook Notifications
.
Manage Tokens
The API Keys tab lists every token with its State, Created date, Last Used date, and Expires At date. The Last Used column is handy for spotting tokens that are no longer in active use.
Expiry. Every token has an Expires At date. Once a token is past that date, API calls made with it are rejected. Replace the token before it lapses to avoid interrupting your integration.
Revoke. To revoke a token before it expires, click the
⋯menu on its row and choose Delete Token. Deletion is immediate and cannot be undone. Any integration using that token will stop working right away.Rotate. Rotate tokens periodically and delete ones that are no longer in use.