Organisation and account

API keys

Create, scope, bind, edit and revoke organisation API keys, and hand keys to coding agents through one-time claim links.

An API key (ak_...) is how your services, SDKs and scripts call axonpush. Keys belong to the organisation, not to the person who made them, so they keep working when that person leaves. Each key holds a set of scopes and can be bound to one application and one environment.

Use one key per service and environment, with the fewest scopes it needs. An application that only sends data needs events:publish and nothing else.

Create a key in the dashboard

You need to be an organisation owner or admin, with a verified email address.

  1. Open Settings → API keys and click Create API key.
  2. Enter a Name, up to 128 characters.
  3. Optionally bind the key under Scope (optional): pick an App and an Environment, or leave them as Any app and Any environment.
  4. Choose Permissions. The picker groups scopes as Core, Read and Manage, and starts with events:publish and observe:read.
  5. Click Create. The API key created dialog shows the key once. Copy it before you click Done.

axonpush stores only a hash of the key. If you lose it, revoke it and create a new one.

Put the key in your service’s secret store or a git-ignored env file:

AXONPUSH_API_KEY=ak_...
AXONPUSH_BASE_URL=https://api.axonpush.xyz

Create a key with the API

POST /organization/api-keys (MCP tool apiKeys_create) creates a key from a dashboard session or an MCP sign-in. It can only grant events:publish, events:read and observe:read. Keys with management, content, profile or audit scopes are created in the dashboard. API keys cannot create other API keys.

curl -X POST https://api.axonpush.xyz/organization/api-keys \
  -H "Authorization: Bearer $SESSION_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "checkout-service production",
    "scopes": ["events:publish"],
    "appId": "app_...",
    "environmentId": "env_..."
  }'

From a dashboard session the response contains key, shown once. From an agent it contains a claim link instead.

A coding agent never receives a raw key, because the key would end up in its transcript. When an agent creates a key, the response has:

{
  "id": "...",
  "name": "checkout-service production",
  "scopes": ["events:publish"],
  "claim": {
    "url": "https://app.axonpush.xyz/claim/key/...",
    "expiresAt": "2026-11-18T12:30:00Z",
    "envName": "AXONPUSH_API_KEY"
  }
}

The agent asks you to open the link. On the Your API key page you copy the key, or a ready .env line, into your project. The link:

  • works once, and expires 30 minutes after it was made;
  • only opens for the person whose agent created it, signed in to the dashboard;
  • never opens for an agent, even one signed in as you.

An expired or used link shows “This link has been used or has expired”. Create a new key, or ask the agent for a new link. workspaces_connect uses the same mechanism for the publish key it mints; see Connect an app.

Opening a link calls GET /api-key-claims/{id}, which answers with Cache-Control: no-store.

Edit permissions

Click a key in Settings → API keys to open its details: name, prefix, created, last used, created by, and its scopes. Owners and admins can click Edit permissions, change the scopes and Save permissions. The key’s secret, app and environment binding stay the same; only the scopes change.

Revoke a key

Click the bin icon on a key’s row and confirm Revoke. Applications using the key lose access immediately. Revoked keys disappear from the list and cannot be restored.

What the server records

Creating a key, changing its scopes and revoking it are written to the organisation audit log (api_key.created, api_key.scopes_updated, api_key.revoked), with who did it and, for creation, whether a claim link was used. See Privacy and audit log.

Reference

RuleValue
Prefixak_
Name1 to 128 characters
Default scopesevents:publish, observe:read
Who can create, edit, revokeOwners and admins, from a session, with a verified email
Scopes the API can grantevents:publish, events:read, observe:read
Claim link lifetime30 minutes, one use
Headers acceptedx-axonpush-api-key, X-API-Key, Authorization: Bearer ak_...