Also available: Markdown version · llms.txt · full site content
Getting started
Quickstart
Create a project, define a table, expose the operations you want, sign up a user, and call the Data API. About ten minutes, all HTTP.
1 · Create a project
Register in the Console
Create a developer account and verify your email address. Project creation requires a verified email.
Create a project
Pick a name and a slug. The slug becomes the first label of your API host:
{slug}.api.cubibase.com.Wait for provisioning
Provisioning is queued. The project page shows the status; wait until it reports active before creating tables.
Database example_project_db
Roles ddl · api · sql · auth
Schemas public · auth · vault · logs
2 · Define a table
In the Console, open your project and create a table. This guide uses a customers table:
| Column | Type | Notes |
|---|---|---|
id | uuid | Primary key, default gen_random_uuid() |
name | text | Required |
email | text | Required |
plan | text | Required |
owner_id | text | Set as the user column for row-level security |
Setting owner_id as the user column at creation time makes every row belong to the user whose JWT subject matches it. The policy is created with the table — you cannot attach it later.
3 · Expose the operations you want
New tables are not exposed. On the table screen, switch on the operations your app needs — here, select and insert. Leave update and delete off until you need them.
Served at /rest/v1/customers for the operations you switched on.
4 · Sign up your first user
Copy the publishable key from the project’s API keys screen, then sign a user up. The response contains the accessToken your Data API calls need.
POST https://example-project.api.cubibase.com/auth/v1/signup
apikey: cb_pub_EXAMPLE_ONLY
Content-Type: application/json
{
"email": "mina@example.com",
"password": "<USER_PASSWORD>"
}5 · Call the Data API
Send the publishable key in the apikey header and the user’s access token as the bearer token. With the owner_id policy in place, this user only sees their own rows.
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": "mina@example.com",
"plan": "pro",
"owner_id": "user_mina"
},
{
"id": "44ab91c3-0e55-4d72-b018-6f2c8a91bb70",
"name": "Priya Shah",
"email": "priya@example.org",
"plan": "pro",
"owner_id": "user_priya"
}
]
}