Using the API
Overview of the API generated by Quickback. CRUD endpoints, filtering, batch operations, views, and custom actions.
When you run quickback build, Quickback generates a complete REST API from your definitions. This section covers how to use the generated endpoints.
Base URL
Generated endpoints use the contract selected in quickback.config.ts. The
backward-compatible default is /api/v1/; projects with
contract: { routes: "v2" } use /api/v2/ (and /auth/v2/ for Better Auth):
https://your-api.com/api/v1/{resource}The examples below show the default v1 contract. Replace /api/v1 with
/api/v2 when the project selects v2. The generated OpenAPI document is the
authoritative path list for the compiled project.
The resource name is derived from the filename: jobs.ts → /api/v1/jobs.
Endpoint Overview
For each resource with export default defineTable(...):
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/{resource} | List records (paginated) |
GET | /api/v1/{resource}/:id | Get single record |
POST | /api/v1/{resource} | Create record |
PATCH | /api/v1/{resource}/:id | Update record |
DELETE | /api/v1/{resource}/:id | Delete record |
POST | /api/v1/{resource}/batch | Batch create |
PATCH | /api/v1/{resource}/batch | Batch update |
DELETE | /api/v1/{resource}/batch | Batch delete |
Moved routes (0.72)
Better Auth owns /auth/v1/*. Quickback's own routes there moved under the API base in 0.72 (plan 031 Q7), so a Better Auth upgrade or plugin cannot collide with them and a Cloudflare Access path rule can cover the operator plane in one prefix. The prefix follows contract.routes (/api/v2/… on v2).
| Before 0.72 | Since 0.72 | Emitted when |
|---|---|---|
GET /auth/v1/admin/list-organizations | GET /api/v1/operator/organizations | cms.sysadmin or account.auth.admin |
GET /auth/v1/admin/get-organization?organizationId=:id | GET /api/v1/operator/organizations/:id | same |
POST /auth/v1/admin/create-organization | POST /api/v1/operator/organizations | same |
POST /auth/v1/admin/set-organization-member { organizationId, userId, role } | PUT /api/v1/operator/organizations/:id/members/:userId { role } | same |
POST /auth/v1/admin/remove-organization-member { organizationId, userId } | DELETE /api/v1/operator/organizations/:id/members/:userId | same |
GET /auth/v1/organization/roster | GET /api/v1/organization/roster | auth.organizationRoster |
GET /auth/v1/ses/status | GET /api/v1/auth/email-status | always |
Response bodies are unchanged. The old paths keep working through 0.72.x and are removed in 0.73.0:
- The old
GETs answer308 Permanent Redirectto the new path (the query string is kept;get-organization?organizationId=Xredirects to/operator/organizations/X). - The old
POSTs cannot redirect, because two of them changed verb. They run the same handler as the new route. - Both add
Deprecation: trueandLink: <new path>; rel="successor-version", and the Worker logs[quickback] deprecated route <method> <path>once per isolate per path. Grep your logs for it before upgrading to 0.73.
The bundled CMS and Account SPAs call the new paths. The OpenAPI document lists GET /api/v1/auth/email-status (operationId getEmailStatus, marked x-quickback-auth-surface, so like every auth endpoint it stays out of the MCP catalogue unless agents.mcp.exposeAuthTools is on, where the tool auth__sesStatus is now auth__getEmailStatus); the aliases are not advertised. A feature or table that would mount over one of these routes (/api/v1/operator, /api/v1/auth, /api/v1/organization with the roster on) is a compile error.
ses/status note: after 0.73.0, an aws-ses project's vendored Better Auth plugin answers /auth/v1/ses/status itself, with a different body (provider: 'aws-ses', plus region and fromEmail). Use email-status.
Guides
- CRUD Endpoints — Detailed CRUD endpoint reference
- Query Parameters — Filtering, pagination, and sorting
- Batch Operations — Bulk create, update, delete with atomic mode
- Views API — Column-level projections
- Actions API — Custom business logic endpoints
- Errors — Error responses and HTTP status codes
Database per Tenant
tenancy.isolation 'durable-object' gives every organization its own SQLite database in a Durable Object, served by a generated tenant Worker, while the edge Worker keeps auth, routing and platform tables.
CRUD Endpoints
Auto-generated RESTful CRUD endpoints for each resource. Learn how to use create, update, delete, and upsert operations.