Authentication
Every request to the Celdrax Query API must include a Bearer token in the Authorization header.
Token format
Celdrax tokens always start with cxk_:
Authorization: Bearer cxk_fc4639e7f81aba67b3900f89666551baCreating a token
- Open the dashboard
- Scroll to API Tokens → click New Token
- Select the database, set a name and pick permissions
- Copy the token immediately — it's shown only once
Token permissions
Each token has independent permissions per database:
| Permission | What it allows |
|---|---|
SELECT | Read rows from any table |
INSERT | Add new rows |
UPDATE | Modify existing rows |
DELETE | Remove rows |
Principle of least privilege
Create separate tokens for different use cases. A read-only token for your frontend, a full-access token for your backend worker.
Revoking a token
Click the trash icon next to any token in the dashboard. It's revoked immediately — any in-flight request using it will get a 401.
Error responses
json
// Missing header
{ "error": "Missing Authorization header. Use: Bearer cxk_..." }
// Invalid or revoked token
{ "error": "Invalid or revoked token" }
// Wrong token format
{ "error": "Invalid token format. Celdrax tokens start with cxk_" }