What you are connecting to
CubiBase has two HTTP surfaces. The Console uses the control API for your developer account, projects, tables, rows, API keys, and the SQL editor. Your application uses the project host: /rest/v1 for exposed tables and /auth/v1 for user sign-up, sign-in, and sessions.
The base for a project is https://{slug}.api.cubibase.com. The path for a table is /rest/v1/{table}. This guide uses the fictional slug example-project. Replace it with the slug you created.
Create a project
Open the Console and create a developer account. Verify the email address before you expect project creation to succeed. Create a project with a name and a slug. Provisioning is queued. Wait until the project status is active before you create tables or call the Data API.
- Register and verify your email in the Console.
- Create a project. The slug becomes the first label of the API host.
- Wait until provisioning reports the project as active.
Define a table
Create the table from the Console. A table needs exactly one primary key. If application users should only see their own rows, include a text column such as owner_id and set it as the user column when you create the table. You cannot add that policy column later by dropping it onto an existing table through a second flag. The isolation policy is created with the table.
New tables are not exposed. When the application should call the table, allow the operations you want: select, insert, update, delete. Leave the others off.
Call the Data API
From the application, call the project host. The publishable key is sent in the apikey header. The end-user JWT is sent as a bearer token. The sample below asks for pro customers, sorted by name. It uses a non-functional example key and fictional people.
GET https://example-project.api.cubibase.com/rest/v1/customers?plan=eq.pro&order=name.asc&limit=20
apikey: cb_pub_EXAMPLE_ONLY
Authorization: Bearer <USER_JWT>{
"data": [
{
"id": "8c1a0b2e-7d44-4a11-9c31-0b51a6e4d901",
"name": "Mina Cho",
"email": "[email protected]",
"plan": "pro",
"owner_id": "user_mina"
},
{
"id": "44ab91c3-0e55-4d72-b018-6f2c8a91bb70",
"name": "Priya Shah",
"email": "[email protected]",
"plan": "pro",
"owner_id": "user_priya"
}
]
}{
"error": {
"code": "missing_end_user_token",
"message": "An end-user bearer token is required",
"requestId": "req_example"
}
}Inspect with SQL
The SQL editor accepts one read-only statement of at most 8,000 characters. SELECT and WITH are typical. The statement runs on the SQL role inside a read-only transaction and returns at most 200 rows. It will not create a table. Use the table screen for schema changes.
Sign up your first user
CubiBase Auth runs on the same project host as the Data API, under /auth/v1, with the same apikey header. POST /auth/v1/signup with an email and a password creates the user in the project’s auth schema and returns a session: the user object, an accessToken, and a refreshToken. The password must meet the project’s minimum length, 8 characters by default.
The accessToken is the end-user JWT for your Data API calls. Its sub is the user id, so a table with a user column now filters rows for that person. Sign in later with POST /auth/v1/token?grant_type=password, refresh with grant_type=refresh_token, and end a session with POST /auth/v1/logout.
Access tokens expire after one hour by default; refresh tokens last 30 days and rotate on every refresh. Reusing a replaced refresh token revokes the whole token family. Email autoconfirm is on by default, and CubiBase does not send end-user confirmation emails yet.
- POST /auth/v1/signup with the publishable key, an email, and a password.
- Keep the refreshToken somewhere safe on the client; send the accessToken as the bearer token on Data API calls.
- When the access token expires, POST /auth/v1/token?grant_type=refresh_token and store the new pair.
POST https://example-project.api.cubibase.com/auth/v1/signup
apikey: cb_pub_EXAMPLE_ONLY
Content-Type: application/json
{
"email": "[email protected]",
"password": "<USER_PASSWORD>"
}{
"user": {
"id": "3f2b8c1e-9a47-4d02-b6e5-1c8f0a3d7e29",
"email": "[email protected]",
"emailVerifiedAt": "2026-11-18T09:12:44.000Z",
"providers": ["email"],
"mfaEnabled": false
},
"accessToken": "<ACCESS_JWT>",
"refreshToken": "<REFRESH_TOKEN>",
"tokenType": "Bearer",
"expiresIn": 3600
}POST https://example-project.api.cubibase.com/auth/v1/token?grant_type=refresh_token
apikey: cb_pub_EXAMPLE_ONLY
Content-Type: application/json
{
"refreshToken": "<REFRESH_TOKEN>"
}Bring your own identity provider
If your users already sign in elsewhere, configure the project’s auth provider instead of using CubiBase Auth sign-in. RS256 uses a JWKS URL, issuer, and audience, and the token’s algorithm must be allowed for the project. The verified sub is the user id stored for the transaction.
A development endpoint can issue an HS256 token for a user id you choose when that issuer is enabled. Use it to build. MFA is optional per project: enable it and users can enroll a TOTP authenticator through /auth/v1/factors, or require it for every session.
Documentation still to come
This page is the getting-started guide for the engine that exists today. A full reference for every control route, client libraries, and operational runbooks are not published yet. If a sample is not on this page, it is not a supported public command.
Routes
The Data API is on https://{slug}.api.cubibase.com. Replace the slug with your project. Filters use column=op.value. Operators are eq, neq, gt, gte, lt, lte, like, ilike, and is.
| Method | Path |
|---|---|
| GET | /rest/v1/{table} |
| GET | /rest/v1/{table}/{id} |
| POST | /rest/v1/{table} |
| PATCH | /rest/v1/{table}/{id} |
| DELETE | /rest/v1/{table}/{id} |
CubiBase Auth is on the same host under /auth/v1, with the same apikey header. Signup, sign-in, refresh, and logout do not need a bearer token; /auth/v1/user and the factor routes do.
| Method | Path |
|---|---|
| POST | /auth/v1/signup |
| POST | /auth/v1/token?grant_type=password |
| POST | /auth/v1/token?grant_type=refresh_token |
| POST | /auth/v1/token?grant_type=mfa |
| POST | /auth/v1/logout |
| GET | /auth/v1/user |
| POST | /auth/v1/factors |
| POST | /auth/v1/factors/verify |
| DELETE | /auth/v1/factors/{factorId} |
The paths below are control routes the Console uses for accounts, projects, schema, rows, SQL, keys, and the auth user directory. This guide does not publish a separate public base URL for them. Your application should call the project host, not these paths.
| Method | Path |
|---|---|
| POST | /v1/auth/register |
| POST | /v1/auth/verify-email |
| POST | /v1/auth/login |
| POST | /v1/projects |
| GET | /v1/projects/:id/provisioning |
| POST | /v1/projects/:id/tables |
| POST | /v1/projects/:id/tables/:table/exposure |
| GET | /v1/projects/:id/tables/:table/rows |
| POST | /v1/projects/:id/sql |
| POST | /v1/projects/:id/api-keys |
| PATCH | /v1/projects/:id/auth |
| GET | /v1/projects/:id/auth/settings |
| PATCH | /v1/projects/:id/auth/settings |
| GET | /v1/projects/:id/auth/users |
| GET | /v1/projects/:id/auth/sessions |
| DELETE | /v1/projects/:id/auth/sessions/:sessionId |
The server resolves the project from the Host header. It does not trust X-Forwarded-Host. Additional control routes exist for login refresh, password reset, and row updates. They will be documented with the full reference. Nothing on this page is a client SDK command.