Skip to content

API Keys

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

Create an API key.

Body:

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

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

{
"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.

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

Revoke an API key. Takes effect immediately.

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

Terminal window
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:

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