HTTP API reference

Two HTTP surfaces. The app API is what your app, and any backend or mobile client, calls: data, actions, named queries, sign-in, AI, files and realtime, under /__appbricx on the app's own origin. The developer API is what the CLI, MCP tools and CI call to build, verify, deploy and operate apps.

143 endpointsReference home

App API

  • Data APIList, read, create, update and delete rows of the app's tables, with filters, embedded related rows, aggregates, full-text search, lifecycle transitions, batches of calls, and raw SQL for trusted backends. Every call runs as the caller under your row-level security policies. (13 endpoints)
  • Actions, queries and webhooksCall a server action (server/*.ts), run a named query (db/queries/*.sql), deliver an inbound webhook to a workflow, and read workflow runs and notifications. (11 endpoints)
  • Sign-in APIThe app's own end-user accounts: sign-up, password and sign-in-link sign-in, social sign-in, two-factor codes, sessions, admin user management and organisations. (31 endpoints)
  • AI APIChat completions and embeddings on the project's own AI key, with per-app and per-user budgets. (2 endpoints)
  • Files APISigned uploads of users' files, owner-scoped downloads and deletes. (4 endpoints)
  • Topics and realtimeTokens for app realtime (live rows per user, broadcast and presence channels over WebSocket), and topics and row-changed feeds over server-sent events. (4 endpoints)
  • Connector proxyCall a connected integration's action without the app ever holding the credential. (2 endpoints)

Developer API

  • Developer API: buildTokens, projects, the project's files (the dev draft), check and apply, versions, previews and templates. The CLI and the MCP tools call the same operations. (38 endpoints)
  • Developer API: test, ship and operateVerify, screenshots, deploys and rollbacks, data and SQL, snapshots, runs, logs, secrets, sign-in, accounts, roles, routing, domains and data transfer. (38 endpoints)

Credentials

App key + data marker
A project key (dpk_c_… in browsers, bound to the app's origins and sent with Origin; dpk_s_… on servers) plus the data-API marker header. With an app session (the header, or the appbricx_app_session cookie) the call acts as that user under row-level security; without one it acts as a signed-out visitor. A server key may assert x-appbricx-app-user and x-appbricx-app-role.
App key + signed-in user
A project key and a signed-in app session (header or cookie). Signed-out callers get 401.
Server key
A server-tier project key (dpk_s_…). Browser keys and end-user sessions are refused. Treat it like a database password.
App key + admin session
A project key and the session of an app user with the admin flag. Anyone else gets 403.
App key
A project key identifies the app. No user session is needed.
Webhook signature
No bearer token. Sign the raw body with the webhook's secret (HMAC-SHA256, hex), or, for webhook(name, { verify: "stripe" | "github" | "razorpay" }), send the provider's own signature header.
Developer token
A personal access token (apx_pat_…, one workspace, scopes read / apply / deploy), an MCP client's OAuth token, or a console session. A project outside the token's reach answers 404, never 403.
Console session only
The signed-in console session. A personal access token can't mint another token.

Every endpoint

MethodPathWhat it does
POST/__appbricx/data/:opRaw SQL (server keys)
GET/__appbricx/api/v1/searchSearch several tables
GET/__appbricx/api/v1/openapi.jsonOpenAPI document
GET/__appbricx/api/v1/:tableList rows
POST/__appbricx/api/v1/:tableCreate a row
GET/__appbricx/api/v1/:table/aggregateAggregate
GET/__appbricx/api/v1/:table/searchSearch one table
GET/__appbricx/api/v1/:table/:idGet a row
PATCH/__appbricx/api/v1/:table/:idUpdate a row
DELETE/__appbricx/api/v1/:table/:idDelete a row
PATCH/__appbricx/api/v1/:table/:id/transitionMove a lifecycle state
POST/__appbricx/api/v1/:table/:id/restoreRestore a deleted row
POST/__appbricx/batchBatch
GET/__appbricx/queriesList named queries
POST/__appbricx/queries/*Run a named query
POST/__appbricx/actions/:nameCall a server action
GET/__appbricx/notificationsNotifications
GET/__appbricx/runtime/runsList runs
GET/__appbricx/runtime/runs/:idGet a run
GET/__appbricx/runtime/dlqDead letters
POST/__appbricx/runtime/dlq/replayReplay a dead letter
GET/__appbricx/runtime/webhooks/:name/secretWebhook secret
POST/hooks/:project/:nameInbound webhook (platform host)
POST/__appbricx/hooks/:nameInbound webhook (app host)
POST/__appbricx/auth/signupSign up
POST/__appbricx/auth/loginSign in
GET/__appbricx/auth/meCurrent user
GET/__appbricx/auth/signup-optionsSign-up options
POST/__appbricx/auth/logoutSign out
POST/__appbricx/auth/verify/requestRequest email verification
GET/__appbricx/auth/verify/confirmConfirm email
POST/__appbricx/auth/reset/requestRequest password reset
POST/__appbricx/auth/reset/confirmSet a new password
POST/__appbricx/auth/magic/requestRequest a magic link
GET/__appbricx/auth/magic/consumeUse a magic link
GET/__appbricx/auth/set-passwordSet-password page
POST/__appbricx/auth/set-passwordSubmit set-password form
POST/__appbricx/auth/mfa/enroll/startStart two-factor enrolment
POST/__appbricx/auth/mfa/enroll/confirmConfirm two-factor enrolment
POST/__appbricx/auth/mfa/verifyComplete a two-factor sign-in
POST/__appbricx/auth/mfa/disableTurn off two-factor
POST/__appbricx/auth/mfa/backup-codes/regenerateNew backup codes
GET/__appbricx/auth/oauth/providersSocial providers
GET/__appbricx/auth/oauth/:provider/startStart social sign-in
GET/__appbricx/auth/oauth/:provider/callbackSocial sign-in callback
GET/__appbricx/auth/usersList users (admin)
POST/__appbricx/auth/usersInvite a user (admin)
PATCH/__appbricx/auth/users/:idChange a user (admin)
GET/__appbricx/auth/rolesAssignable roles (admin)
POST/__appbricx/orgs/inviteInvite to the organisation
GET/__appbricx/orgs/invite/acceptAccept an invitation
GET/__appbricx/orgs/membersOrganisation members
PATCH/__appbricx/orgs/members/:userIdChange a member's role
DELETE/__appbricx/orgs/members/:userIdRemove a member
GET/__appbricx/orgs/currentCurrent organisation
POST/__appbricx/ai/chatChat completion
POST/__appbricx/ai/embedEmbeddings
POST/__appbricx/files/signSign an upload
POST/__appbricx/files/directUpload a file
GET/__appbricx/files/:idDownload a file
DELETE/__appbricx/files/:idDelete a file
POST/__appbricx/topics/:name/publishPublish on a topic
GET/__appbricx/topics/:name/subscribeSubscribe to a topic
POST/__appbricx/realtime/connectRealtime connection token
POST/__appbricx/realtime/subscribeRealtime subscription token
GET/__appbricx/connector-proxy/availableConnected integrations
POST/__appbricx/connector-proxy/:integration/:actionRun an integration action
POST/api/dev/v1/tokensMint a token
GET/api/dev/v1/tokensList my tokens
DELETE/api/dev/v1/tokens/:tokenIdRevoke a token
GET/api/dev/v1/meWho am I
GET/api/dev/v1/docsThe guide
GET/api/dev/v1/projectsList projects
POST/api/dev/v1/projectsCreate a project
GET/api/dev/v1/projects/:idGet a project
GET/api/dev/v1/projects/:id/versionsList versions
GET/api/dev/v1/projects/:id/versions/diffDiff two versions
GET/api/dev/v1/projects/:id/versions/compareCompare dev, prod or versions
POST/api/dev/v1/projects/:id/versions/:n/restoreRestore a version
PUT/api/dev/v1/projects/:id/versions/:n/labelLabel a version
POST/api/dev/v1/projects/:id/planPlan the database
POST/api/dev/v1/projects/:id/check-codeCheck one piece of code
GET/api/dev/v1/projects/:id/versions/:nGet a version
POST/api/dev/v1/projects/:id/checkCheck files
POST/api/dev/v1/projects/:id/applyApply files
POST/api/dev/v1/projects/:id/previewsPush a preview
GET/api/dev/v1/projects/:id/previewsList previews
DELETE/api/dev/v1/projects/:id/previews/:nameRemove a preview
GET/api/dev/v1/templatesSearch templates
POST/api/dev/v1/templatesSave a private template
GET/api/dev/v1/templates/:slugGet a template
DELETE/api/dev/v1/templates/:slugDelete a private template
POST/api/dev/v1/templates/:slug/useUse a template
GET/api/dev/v1/projects/:id/templatesTemplates used by a project
GET/api/dev/v1/projects/:id/filesList the draft's files
GET/api/dev/v1/projects/:id/files/diffDiff files
POST/api/dev/v1/projects/:id/files/checkCheck the draft
POST/api/dev/v1/projects/:id/files/applyApply the draft
POST/api/dev/v1/projects/:id/files/resetDrop the draft
POST/api/dev/v1/projects/:id/files/moveMove a file
POST/api/dev/v1/projects/:id/filesWrite several files
PUT/api/dev/v1/projects/:id/filesWrite and delete files
GET/api/dev/v1/projects/:id/files/*Read a file
PUT/api/dev/v1/projects/:id/files/*Write a file
DELETE/api/dev/v1/projects/:id/files/*Delete a file
POST/api/dev/v1/projects/:id/deploy/planPlan a deploy
POST/api/dev/v1/projects/:id/deployDeploy
POST/api/dev/v1/projects/:id/data/queryQuery rows
GET/api/dev/v1/projects/:id/logsLogs
POST/api/dev/v1/projects/:id/sqlRun SQL
POST/api/dev/v1/projects/:id/rowsEdit rows
GET/api/dev/v1/projects/:id/schemaDescribe the schema
GET/api/dev/v1/projects/:id/snapshotsList snapshots
POST/api/dev/v1/projects/:id/snapshotsTake a snapshot
POST/api/dev/v1/projects/:id/snapshots/:sid/restoreRestore a snapshot
GET/api/dev/v1/projects/:id/deploysList releases
POST/api/dev/v1/projects/:id/deploys/:did/rollbackRoll back
POST/api/dev/v1/projects/:id/workflows/:wid/runRun a workflow or action
GET/api/dev/v1/projects/:id/runs/:runIdGet a run
GET/api/dev/v1/projects/:id/dead-lettersDead letters
POST/api/dev/v1/projects/:id/dead-letters/replayReplay dead letters
GET/api/dev/v1/projects/:id/tailTail
GET/api/dev/v1/projects/:id/secretsList secrets
PUT/api/dev/v1/projects/:id/secrets/:nameSet a secret
DELETE/api/dev/v1/projects/:id/secrets/:nameDelete a secret
POST/api/dev/v1/projects/:id/verifyVerify
POST/api/dev/v1/projects/:id/screenshotScreenshot
GET/api/dev/v1/projects/:id/sign-inSign-in providers
POST/api/dev/v1/projects/:id/sign-inChange sign-in
POST/api/dev/v1/projects/:id/app-usersApp accounts
GET/api/dev/v1/projects/:id/rolesRoles
GET/api/dev/v1/projects/:id/routingRouting
GET/api/dev/v1/projects/:id/routing/subdomainCheck a subdomain
PUT/api/dev/v1/projects/:id/routing/subdomainMove production
POST/api/dev/v1/projects/:id/domainsAdd a custom domain
POST/api/dev/v1/projects/:id/domains/:domain/verifyVerify a domain
PATCH/api/dev/v1/projects/:id/domains/:domainChange a domain
DELETE/api/dev/v1/projects/:id/domains/:domainRemove a domain
POST/api/dev/v1/projects/:id/data/exportExport data
GET/api/dev/v1/projects/:id/data/exportsRecent exports
POST/api/dev/v1/projects/:id/data/importImport rows
POST/api/dev/v1/projects/:id/data/copyCopy between environments
POST/api/dev/v1/projects/:id/snapshots/:sid/downloadDownload a snapshot

Not in this reference

These routes exist in the source but are steps inside a flow, or kept for apps made from a JSON contract before code-first:

  • GET /__appbricx/auth/oauth/:provider/broker: A hop inside the shared Google sign-in for testing, started by GET /__appbricx/auth/oauth/:provider/start. Never called directly.
  • GET /__appbricx/auth/sso/start: Workspace single sign-on for the app's own users: a browser redirect flow.
  • GET /__appbricx/auth/sso/callback: Workspace single sign-on's redirect target.
  • POST /__appbricx/functions/:name: Server functions of apps made from a JSON contract. Code-first apps call server actions: POST /__appbricx/actions/:name.
  • GET /__appbricx/pay/methods: Basket payments of apps made from a JSON contract. A code-first app takes payments in a server action (ctx.http.fetch to the provider, the key by reference) and a verified webhook.
  • POST /__appbricx/pay/checkout: As GET /__appbricx/pay/methods.
  • POST /__appbricx/pay/confirm: As GET /__appbricx/pay/methods.
  • GET /__appbricx/pay/for/:table/:id: As GET /__appbricx/pay/methods.
  • GET /__appbricx/connector-proxy/mcp/available: MCP connectors aren't available on this platform yet: it lists no tools.
  • POST /__appbricx/connector-proxy/mcp/:tool: As GET /__appbricx/connector-proxy/mcp/available: it answers MCP_TOOL_NOT_FOUND.
  • POST /__appbricx/mcp/call: As GET /__appbricx/connector-proxy/mcp/available.
  • GET /api/dev/v1/projects/:id/contract: The settings document and files of a project (get_contract over MCP). Read files with GET /api/dev/v1/projects/:id/files?content=1.
  • POST /api/dev/v1/components/check: check_component over MCP; check a component with POST /api/dev/v1/projects/:id/check-code or check the whole draft.