Also available: Markdown version · llms.txt · full site content
Platform
Personal access tokens
Personal access tokens (cb_pat_…) authenticate the Control API without an interactive login — for scripts, CI, and AI agents. Create them in Console → Account → Access tokens.
What a token is
A personal access token (PAT) is a developer credential for the Control API at api.cubibase.com. It carries the permissions of the account that created it, narrowed by a scope and an optional project restriction. Tokens are shown once at creation and stored only as SHA-256 hashes.
| Scope | Allows |
|---|---|
| read | GET routes: list projects, schema, rows, logs, usage |
| write | Everything in read, plus creating and modifying projects, tables, policies, keys |
| admin | Everything in write, plus destructive operations such as project deletion |
Scopes are cumulative: write includes read, admin includes write. A token can also be restricted to a single project, and can carry an expiration date.
Creating and using a token
Open the Console
Account → Access tokens → Create token. Pick a name, scope, optional project restriction and expiry.
Copy the token
The cb_pat_… value is shown exactly once. Store it in a secret manager or environment variable.
Call the Control API
Send Authorization: Bearer cb_pat_… on any api.cubibase.com route within the token’s scope.
curl https://api.cubibase.com/v1/projects \
-H "Authorization: Bearer cb_pat_…"Rate limits and revocation
- Token requests are rate-limited per token. A throttled request returns 429 with a Retry-After header — wait that many seconds and retry.
- Revoke a token from the same Console page; requests using it fail immediately with 401.
- Every token records a last-used timestamp so you can find and revoke stale credentials.
- Errors always carry a stable machine code and a requestId, e.g. {"error":{"code":"insufficient_scope","message":"…","requestId":"…"}}.