Skip to content

API Keys

API keys authenticate SDK and API requests without requiring a user session. All endpoints require Bearer token auth.

POST /api-keys

Create an API key.

Body:

json
{
  "name": "my-agent-key",
  "scopes": ["publish", "subscribe"]
}

Response: Returns the full key (only shown once):

json
{
  "id": 1,
  "name": "my-agent-key",
  "key": "ak_live_abc123...",
  "scopes": ["publish", "subscribe"],
  "createdAt": "2026-03-31T12:00:00Z"
}

WARNING

Save the key immediately. It cannot be retrieved again after creation.

GET /api-keys

List all API keys. The key value is truncated for security.

DELETE /api-keys/:id

Revoke an API key. Takes effect immediately.

Using API Keys

Include the key in the X-API-Key header:

bash
curl -X POST https://api.axonpush.xyz/event \
  -H "Content-Type: application/json" \
  -H "X-API-Key: ak_live_abc123..." \
  -H "x-tenant-id: 1" \
  -d '{"identifier": "test", "payload": {}, "channel_id": 1}'

Or in the Python SDK:

python
from axonpush import AxonPush

client = AxonPush(api_key="ak_live_abc123...", tenant_id="1", base_url="https://api.axonpush.xyz")