Appbricx
Docs
PricingStart free

Start here

OverviewGetting startedProjects & editorBring your own keyEnd-to-end recipe

Full-stack runtime

Runtime overviewNamed queriesAuth & RLSAuto CRUD REST APIWorkflowsWebhooks & schedulesTopics & CDCData templatesSecrets & env

Ship & own

Publish & domainsExport & GitHub

Developers

Developer guide

Auto CRUD REST API

Point your schema at /__appbricx/api/v1/:table and get list / get / create / update / delete — same auth + RLS as the data plane. No Express, Fastify, or hand-rolled routers.

Path note. SDKs call /__appbricx/*. Legacy /__appbricx/* still works (API rewrites both).

1. Configure ACL — tables.json

Create .appbricx/backend/api/tables.json. Always do this before demos: an empty ACL can expose every non-internal table.

{
  "allow": ["leads", "waitlist"],
  "tables": {
    "leads": {
      "expose": true,
      "methods": ["GET", "POST", "PATCH"]
    },
    "waitlist": {
      "expose": true,
      "methods": ["GET", "POST"]
    }
  }
}
  • allow — optional allow-list of table names.
  • expose: false — hide a table even if listed elsewhere.
  • methods — HTTP verbs permitted for that table.
  • Tables starting with _appbricx are always blocked.

2. Auth headers (every call)

HeaderRequiredPurpose
Authorization: Bearer <data-token>YesProject-scoped data API token
x-appbricx-data-api: 1YesMarks the request as data-plane traffic
x-appbricx-app-session: <jwt>When RLSEnd-user session so app.user_id is set

In the preview iframe the platform injects __APPBRICX_DATA_TOKEN (and session when logged in). Outside preview, use a project API key / data token from project settings.

3. Endpoints

MethodPathNotes
GET/__appbricx/api/v1/:tableQuery: limit, offset, where (JSON object)
GET/__appbricx/api/v1/:table/:idPrimary key lookup
POST/__appbricx/api/v1/:tableJSON body = column map
PATCH/__appbricx/api/v1/:table/:idPartial update
DELETE/__appbricx/api/v1/:table/:idDelete by id

4. SDK examples

import { runtime } from "@appbricx/runtime";

// List with filter
const page = await runtime.api.list("leads", {
  limit: 50,
  offset: 0,
  where: { status: "new" },
});
if (!page.ok) console.error(page.error);

// Create
const created = await runtime.api.create("leads", {
  email: "demo@example.com",
  source: "mobile",
});

// Get / update / delete
await runtime.api.get("leads", created.rows[0].id);
await runtime.api.update("leads", created.rows[0].id, { status: "contacted" });
await runtime.api.delete("leads", created.rows[0].id);

5. curl / Postman

# List
curl -sS "$ORIGIN/__appbricx/api/v1/leads?limit=20&where=%7B%22status%22%3A%22new%22%7D" \
  -H "Authorization: Bearer $DATA_TOKEN" \
  -H "x-appbricx-data-api: 1" \
  -H "x-appbricx-app-session: $APP_SESSION"

# Create
curl -sS -X POST "$ORIGIN/__appbricx/api/v1/leads" \
  -H "Authorization: Bearer $DATA_TOKEN" \
  -H "x-appbricx-data-api: 1" \
  -H "content-type: application/json" \
  -d '{"email":"a@b.com","source":"postman"}'

How it works internally

  1. Request hits Caddy → API (/__appbricx rewritten to /__appbricx).
  2. requireRuntimeAuth validates data token + x-appbricx-data-api: 1.
  3. ACL from tables.json gates table + method.
  4. CRUD helpers build parameterized SQL against the project PGlite worker; RLS uses app.user_id from the app session.
  5. Mutating statements emit CDC events (topics / workflows if bound).
Named queries vs auto CRUD. Use CRUD for simple table shapes. Use named queries for joins, aggregates, or logic shared with workflows.

Next: Trigger workflows via API · Topics & CDC

Appbricx

Full-stack AI app builder for teams. Hosted cloud or private deploy into your account — multi-tenant, sandboxed, credit-metered.

Product

How it worksDemoCapabilitiesPricingPrivate cloudBYOKFAQ

Resources

DocumentationBlogFor freelancersFor agenciesSupport

Company

ContactPrivate cloud / agencyPrivacyTerms

© 2026 Appbricx. All rights reserved.

TermsPrivacyCookiesAcceptable Use