Skip to Content
API ReferenceAuthentication

Authentication

All API requests require an API key. Generate one from Settings → API Keys inside your Nexora workspace.

Base URL

https://your-nexora-instance.com/api

Using your API key

Pass the key in every request as a Bearer token:

Authorization: Bearer nxr_your_api_key_here

Example:

curl https://nexora.example.com/api/agents \ -H "Authorization: Bearer nxr_your_api_key_here"
import httpx client = httpx.Client( base_url="https://nexora.example.com/api", headers={"Authorization": "Bearer nxr_your_api_key_here"}, ) agents = client.get("/agents").json()
const client = { baseURL: "https://nexora.example.com/api", headers: { Authorization: "Bearer nxr_your_api_key_here" }, }; const agents = await fetch(`${client.baseURL}/agents`, { headers: client.headers, }).then((r) => r.json());

Managing API keys

List keys

GET /api/users/me/api-keys Authorization: Bearer nxr_...

Create key

POST /api/users/me/api-keys Content-Type: application/json { "name": "CI pipeline" }

Response:

{ "id": "uuid", "name": "CI pipeline", "key": "nxr_...", "created_at": "2026-01-01T00:00:00Z", "last_used_at": null }

The full key value is only shown once at creation. Store it securely — it cannot be retrieved again.

Rotate key

POST /api/users/me/api-keys/{key_id}/rotate

Returns a new key value. The old key is immediately invalidated.

Revoke key

DELETE /api/users/me/api-keys/{key_id}

Errors

All errors follow this structure:

{ "detail": "Error message here" }
StatusMeaning
401Missing or invalid token
403Insufficient permissions
404Resource not found
422Validation error (check detail array)

WebSocket

WebSocket connections (/api/ws/{chat_id}) authenticate via the token query param, which accepts either a JWT access token or an API key (nxr_...). To obtain a JWT, use the login endpoint:

POST /api/auth/login Content-Type: application/json { "email": "user@example.com", "password": "password" }

Pass the returned access_token (or an nxr_... API key) as the token query param:

wss://nexora.example.com/api/ws/{chat_id}?token=eyJ... wss://nexora.example.com/api/ws/{chat_id}?token=nxr_...