Developer API: test, ship and operate

Verify, screenshots, deploys and rollbacks, data and SQL, snapshots, runs, logs, secrets, sign-in, accounts, roles, routing, domains and data transfer.

38 endpointsHTTP API referenceGuide: Developer API guide

On this page
  1. Authentication
  2. Endpoints
  3. POST /projects/:id/deploy/plan
  4. POST /projects/:id/deploy
  5. POST /projects/:id/data/query
  6. GET /projects/:id/logs
  7. POST /projects/:id/sql
  8. POST /projects/:id/rows
  9. GET /projects/:id/schema
  10. GET /projects/:id/snapshots
  11. POST /projects/:id/snapshots
  12. POST /projects/:id/snapshots/:sid/restore
  13. GET /projects/:id/deploys
  14. POST /projects/:id/deploys/:did/rollback
  15. POST /projects/:id/workflows/:wid/run
  16. GET /projects/:id/runs/:runId
  17. GET /projects/:id/dead-letters
  18. POST /projects/:id/dead-letters/replay
  19. GET /projects/:id/tail
  20. GET /projects/:id/secrets
  21. PUT /projects/:id/secrets/:name
  22. DELETE /projects/:id/secrets/:name
  23. POST /projects/:id/verify
  24. POST /projects/:id/screenshot
  25. GET /projects/:id/sign-in
  26. POST /projects/:id/sign-in
  27. POST /projects/:id/app-users
  28. GET /projects/:id/roles
  29. GET /projects/:id/routing
  30. GET /projects/:id/routing/subdomain
  31. PUT /projects/:id/routing/subdomain
  32. POST /projects/:id/domains
  33. POST /projects/:id/domains/:domain/verify
  34. PATCH /projects/:id/domains/:domain
  35. DELETE /projects/:id/domains/:domain
  36. POST /projects/:id/data/export
  37. GET /projects/:id/data/exports
  38. POST /projects/:id/data/import
  39. POST /projects/:id/data/copy
  40. POST /projects/:id/snapshots/:sid/download

Base URL: https://appbricx.com/api/dev/v1 (self-hosted: https://<your platform host>/dev/v1). Errors answer { error, code? } with the HTTP status. The MCP tools and the CLI call the same operations and get the same answers.

Authentication

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. Authorization: Bearer $APPBRICX_TOKEN

Endpoints

Plan a deploy

POST/api/dev/v1/projects/:id/deploy/plan

What a deploy would do, changing nothing: the host, whether production is copied (first publish) or migrated, the SQL it would run, what waits, the workflows armed and disarmed.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
subdomainoptionalstringAs on deploy.
allowDestructiveoptionalbooleanPlan the drops too.

Response

Response
{
  "host": "teamday.apps.appbricx.com",
  "deployment": 8,
  "schema": {
    "mode": "expand",
    "expand": [
      {
        "sql": "alter table booking add column notes text"
      }
    ],
    "contract": [],
    "snapshot_first": true
  }
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/deploy/plan" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/deploy/plan", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({}),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:204

Deploy

POST/api/dev/v1/projects/:id/deploy

Publish what dev runs to production: the host is checked, the migration is rehearsed on a copy of production and verified there (a red report stops it, production untouched), production is snapshotted, the expand steps run and the bundle goes live. Drops wait unless allowDestructive.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: deploy

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
subdomainoptionalstringThe host name on the first deploy (teamday → teamday.apps.appbricx.com).
skipVerifyoptionalbooleanSkip the rehearsal and verify.
allowDestructiveoptionalbooleanAlso run drops, after a snapshot.

Response

202 { status: "running", job_id } while it runs: call again to join.

Response
{
  "status": "live",
  "url": "https://teamday.apps.appbricx.com",
  "deployment": {
    "id": "d_7…",
    "number": 7
  },
  "snapshot_id": "s_19…",
  "pending_contract": []
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
403FORBIDDEN_SCOPEThe token lacks the "deploy" scope.
409SUBDOMAIN_TAKENAnother project serves that host.
400INVALID_SUBDOMAINdev- and verify- names are reserved.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/deploy" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"subdomain":"teamday"}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/deploy", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "subdomain": "teamday"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:225

Query rows

POST/api/dev/v1/projects/:id/data/query

query_data over HTTP: rows of a table as the admin or as a role, with where, filter, search, cursor and aggregates.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
entityrequiredstringThe table.
whereoptionalobjectEquality.
envoptional"dev" | "prod"Default dev.
limitoptionalnumber≤ 200.

Response

Response
{
  "rows": [
    {
      "id": "5d0c2f9e-0d4b-4c39-9f63-2a1d5b7e8f10",
      "ref": "BK-ACME1",
      "status": "requested",
      "team_size": 12,
      "total": "21600.00",
      "created_at": "2026-10-28T09:14:03Z"
    }
  ],
  "rowCount": 1,
  "next_cursor": null
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
400BAD_QUERYAn unknown column, with the closest names.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/data/query" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"entity":"booking","where":{"status":"requested"},"limit":20}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/data/query", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "entity": "booking",
    "where": {
      "status": "requested"
    },
    "limit": 20
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:237

Logs

GET/api/dev/v1/projects/:id/logs

Recent workflow and action runs with their last log lines, and in-app notifications.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Query parameters

NameTypeDescription
workflowoptionalstringOnly this one.
limitoptionalnumberPage size.

Response

Response
{
  "runs": [
    {
      "id": "r_8c1d…",
      "workflow": "bookingConfirmed",
      "status": "waiting",
      "log": [
        "email booking-confirmed queued"
      ]
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/logs?workflow=bookingConfirmed" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/logs?workflow=bookingConfirmed", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:251

Run SQL

POST/api/dev/v1/projects/:id/sql

Any SQL in one transaction as the tenant admin; a prod write takes a snapshot first.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read for reads; apply (dev) or deploy (prod) for writes

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
sqlrequiredstringThe script.
envoptional"dev" | "prod"Default dev.

Response

Response
{
  "columns": [
    {
      "name": "status",
      "type": "text"
    },
    {
      "name": "count",
      "type": "int8"
    }
  ],
  "rows": [
    {
      "status": "requested",
      "count": 2
    }
  ],
  "rowCount": 1,
  "durationMs": 3
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
400SQL_ERRORPostgres refused, with statementIndex, position and pgCode.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/sql" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"sql":"select status, count(*) from booking group by status"}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/sql", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "sql": "select status, count(*) from booking group by status"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:256

Edit rows

POST/api/dev/v1/projects/:id/rows

edit_rows over HTTP: insert, update, delete or transition through the app's own data path (policies, triggers and workflows behave as in the app).

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: apply (dev), deploy (prod)

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
tablerequiredstringThe table.
oprequired"insert" | "update" | "delete" | "transition"What to do.
rowsoptionalobject[]insert.
idoptionalstringupdate, delete, transition.
patchoptionalobjectupdate.

Response

Response
{
  "results": [
    {
      "ok": true,
      "id": "5d0c…"
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/rows" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"table":"booking","op":"update","id":"5d0c…","patch":{"notes":"Vegetarian lunch"}}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/rows", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "table": "booking",
    "op": "update",
    "id": "5d0c…",
    "patch": {
      "notes": "Vegetarian lunch"
    }
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:267

Describe the schema

GET/api/dev/v1/projects/:id/schema

The real schema of dev or prod, each object marked as declared in db/, made by the platform, or made by hand.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Query parameters

NameTypeDescription
envoptional"dev" | "prod"Which environment: dev (default) or prod (the published app).

Response

Response
{
  "tables": [
    {
      "name": "booking",
      "origin": "contract",
      "columns": [
        {
          "name": "status",
          "type": "text",
          "nullable": false
        }
      ]
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/schema?env=prod" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/schema?env=prod", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:272

List snapshots

GET/api/dev/v1/projects/:id/snapshots

Database snapshots of an environment.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Query parameters

NameTypeDescription
envoptional"dev" | "prod"Which environment: dev (default) or prod (the published app).

Response

Response
{
  "snapshots": [
    {
      "id": "s_19…",
      "env": "prod",
      "reason": "deploy 7",
      "created_at": "…",
      "bytes": 482113
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/snapshots?env=prod" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/snapshots?env=prod", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:275

Take a snapshot

POST/api/dev/v1/projects/:id/snapshots

Snapshot a database now (default prod).

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: apply

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
envoptional"dev" | "prod"Default prod.

Response

Response
{
  "snapshot": {
    "id": "s_20…",
    "env": "prod",
    "created_at": "…"
  }
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/snapshots" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"env":"prod"}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/snapshots", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "env": "prod"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:278

Restore a snapshot

POST/api/dev/v1/projects/:id/snapshots/:sid/restore

Replace the database with the snapshot, after snapshotting the current state (undoSnapshotId). A long job.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: deploy

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).
:sidrequiredstringThe snapshot id.

Response

Response
{
  "restored": true,
  "undoSnapshotId": "s_21…"
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
403FORBIDDEN_SCOPEThe token lacks the "deploy" scope.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/snapshots/s_19…/restore" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/snapshots/s_19…/restore", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:283

List releases

GET/api/dev/v1/projects/:id/deploys

The project's releases: status, url, snapshot, the version it published and who.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Response

Response
{
  "deployments": [
    {
      "id": "d_7…",
      "environment": "production",
      "status": "live",
      "url": "https://teamday.apps.appbricx.com",
      "contract_version": 9,
      "created_at": "…"
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/deploys" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/deploys", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:287

Roll back

POST/api/dev/v1/projects/:id/deploys/:did/rollback

Switch an earlier release's stored build back in (the schema is still expanded, so it works). restoreDb also restores production's database to the snapshot taken when that release was replaced (rows written since are lost). dryRun previews it.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: deploy (a dry run needs read)

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).
:didrequiredstringThe release to go back to.

Body

NameTypeDescription
restoreDboptionalbooleanRestore the database too.
dryRunoptionalbooleanPreview only.

Response

Response
{
  "dry_run": true,
  "deployment": "d_6…",
  "live": "d_7…",
  "restore_db": false,
  "snapshot": null,
  "changes": {
    "files": [
      "server/bookings.ts"
    ]
  }
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
403FORBIDDEN_SCOPEThe token lacks the "deploy" scope.
409NO_SNAPSHOTrestoreDb without a snapshot.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/deploys/d_6…/rollback" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"dryRun":true}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/deploys/d_6…/rollback", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "dryRun": true
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:291

Run a workflow or action

POST/api/dev/v1/projects/:id/workflows/:wid/run

Run a workflow or action now with input; waits up to 30 s for the result.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: apply (dev), deploy (prod)

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).
:widrequiredstringThe workflow's or action's export name.

Body

NameTypeDescription
inputoptionalobjectIts input.
envoptional"dev" | "prod"Default dev.

Response

Response
{
  "runId": "r_8c1d…",
  "status": "succeeded",
  "result": {
    "ref": "BK-ACME1",
    "status": "confirmed"
  }
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/workflows/confirmBooking/run" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"input":{"booking":"5d0c…"}}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/workflows/confirmBooking/run", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "input": {
      "booking": "5d0c…"
    }
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:314

Get a run

GET/api/dev/v1/projects/:id/runs/:runId

One run with its input, steps (status, output, error, attempts, timing, log lines) and result.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).
:runIdrequiredstringThe run id.

Response

Response
{
  "run": {
    "id": "r_8c1d…",
    "workflow": "bookingConfirmed",
    "status": "waiting"
  },
  "steps": [
    {
      "idx": 0,
      "name": "email booking-confirmed",
      "status": "succeeded"
    },
    {
      "idx": 1,
      "name": "sleep 1d",
      "status": "waiting"
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/runs/r_8c1d…" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/runs/r_8c1d…", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:320

Dead letters

GET/api/dev/v1/projects/:id/dead-letters

Runs that used up their retries.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Query parameters

NameTypeDescription
limitoptionalnumberPage size.

Response

Response
{
  "dead_letters": [
    {
      "id": "r_77…",
      "workflow": "morningDigest",
      "error": "…",
      "attempts": 5
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/dead-letters" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/dead-letters", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:323

Replay dead letters

POST/api/dev/v1/projects/:id/dead-letters/replay

Queue dead runs again (ids, default all).

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: apply (dev), deploy (prod)

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
idsoptionalstring[]Run ids.

Response

Response
{
  "replayed": 1
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/dead-letters/replay" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"ids":["r_77…"]}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/dead-letters/replay", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "ids": [
      "r_77…"
    ]
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:326

Tail

GET/api/dev/v1/projects/:id/tail

Recent change events, requests (with trace ids and roles), errors, or the email outbox.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Query parameters

NameTypeDescription
kindoptional"events" | "requests" | "errors" | "emails"What to read.
envoptional"dev" | "prod"Which environment: dev (default) or prod (the published app).
sinceoptionalstring15m, 2h, 1d or an ISO time.

Response

Response
{
  "kind": "errors",
  "items": [
    {
      "at": "…",
      "method": "POST",
      "path": "/__appbricx/api/v1/booking",
      "status": 403,
      "role": "host",
      "trace_id": "7f3a…"
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/tail?kind=errors&since=1h" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/tail?kind=errors&since=1h", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:333

List secrets

GET/api/dev/v1/projects/:id/secrets

Names, environments and update times of the project's secrets and config values (never values), and which declared names are missing.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Response

Response
{
  "secrets": [
    {
      "name": "PAYMENTS_KEY",
      "env": "prod",
      "secret": true,
      "updatedAt": "…"
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/secrets" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/secrets", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:337

Set a secret

PUT/api/dev/v1/projects/:id/secrets/:name

Set a secret or config value for dev, prod or all.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: apply, a workspace owner or admin

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).
:namerequiredstringThe name (as app.config.ts declares it).

Body

NameTypeDescription
valuerequiredstringThe value.
envoptional"dev" | "prod" | "all"Default all.

Response

Response
{
  "ok": true
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X PUT "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/secrets/PAYMENTS_URL" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"value":"https://api.razorpay.com","env":"prod"}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/secrets/PAYMENTS_URL", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "value": "https://api.razorpay.com",
    "env": "prod"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:340

Delete a secret

DELETE/api/dev/v1/projects/:id/secrets/:name

Delete a secret (env limits it to one environment).

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: apply, a workspace owner or admin

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).
:namerequiredstringThe name.

Query parameters

NameTypeDescription
envoptional"dev" | "prod" | "all"Only this one.

Response

Response
{
  "ok": true
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X DELETE "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/secrets/PAYMENTS_URL?env=prod" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/secrets/PAYMENTS_URL?env=prod", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:348

Verify

POST/api/dev/v1/projects/:id/verify

Run verify: static checks, every role against every table (writes rolled back), signed-out access, workflows, and a browser walk of every page as each role. Takes minutes: a 202 running answer means call again to join the run.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
envoptional"dev" | "prod"Default dev.
checksoptionalArray<"static" | "matrix" | "production" | "browser">Only some areas.
lastoptionalbooleanThe last stored report, at once.

Response

202 { status: "running", job_id, progress } while it runs.

Response
{
  "ok": true,
  "summary": {
    "passed": 42,
    "failed": 0,
    "skipped": 0
  }
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
404REPORT_NOT_FOUNDlast with no stored report.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/verify" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"checks":["matrix"]}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/verify", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "checks": [
      "matrix"
    ]
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:353

Screenshot

POST/api/dev/v1/projects/:id/screenshot

The app in a real browser at phone size, as a role or a guest, after optional steps. Answers JSON with the visible text and errors; format=png answers the image.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Query parameters

NameTypeDescription
formatoptional"png"The image itself.

Body

NameTypeDescription
routeoptionalstringDefault /.
asoptionalstringA role or demo email, or guest.
stepsoptionalarrayclick, fill, press, wait, wait_ms, goto.
envoptional"dev" | "prod"Default dev.

Response

Response
{
  "ok": true,
  "url": "/bookings",
  "signedInAs": "ops",
  "errors": [],
  "overflowX": false,
  "text": "Bookings BK-ACME1 requested Confirm …"
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
409NOT_BUILTNothing applied in that environment.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/screenshot" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"route":"/bookings","as":"ops"}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/screenshot", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "route": "/bookings",
    "as": "ops"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:364

Sign-in providers

GET/api/dev/v1/projects/:id/sign-in

Google and GitHub sign-in and the sign-up policy (sign_in_providers).

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Response

Response
{
  "providers": [
    {
      "provider": "google",
      "enabled": true,
      "client": "own"
    }
  ],
  "auth": {
    "signup_policy": "open"
  }
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/sign-in" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/sign-in", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:380

Change sign-in

POST/api/dev/v1/projects/:id/sign-in

Turn a provider on or off, set your own OAuth client, or the sign-up policy.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: apply

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
provideroptional"google" | "github"Which.
clientoptional"own" | "platform"Your client or the shared test client.
client_idoptionalstringYours.
client_secretoptionalstringYours.
enabledoptionalbooleanOn or off.

Response

Response
{
  "providers": [
    {
      "provider": "google",
      "enabled": true,
      "client": "own"
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/sign-in" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"provider":"google","client":"own","client_id":"1234-abc.apps.googleusercontent.com","client_secret":"GOCSPX-…"}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/sign-in", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "provider": "google",
    "client": "own",
    "client_id": "1234-abc.apps.googleusercontent.com",
    "client_secret": "GOCSPX-…"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:383

App accounts

POST/api/dev/v1/projects/:id/app-users

app_users over HTTP: list, get, invite, set_role, disable, enable, reset_password, sign_out.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read to list; apply or deploy to change

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
actionrequiredstringWhat to do.
emailoptionalstringinvite.
roleoptionalstringinvite, set_role.
user_idoptionalstringThe account.
dry_runoptionalbooleanPreview.

Response

Response
{
  "invited": true,
  "user": {
    "id": "a81e…",
    "role": "hr"
  }
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
428CONFIRM_REQUIREDA change that reaches prod without dry_run: false.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/app-users" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"action":"invite","email":"priya@acme.example","name":"Priya","role":"hr"}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/app-users", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "action": "invite",
    "email": "priya@acme.example",
    "name": "Priya",
    "role": "hr"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/http.go:399

Roles

GET/api/dev/v1/projects/:id/roles

Each role with its sign-up mode, members, profile table and pages, and the compiled access per table.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Query parameters

NameTypeDescription
envoptional"dev" | "prod"Which environment: dev (default) or prod (the published app).

Response

Response
{
  "env": "dev",
  "roles": [
    {
      "id": "hr",
      "kind": "consumer",
      "signup": "self",
      "members": 2,
      "profile": {
        "table": "hr_profile"
      },
      "pages": [
        {
          "route": "/bookings"
        }
      ]
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/roles" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/roles", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:21

Routing

GET/api/dev/v1/projects/:id/routing

The dev URL, production's host and custom domains.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Response

Response
{
  "prod": {
    "host": "teamday.apps.appbricx.com",
    "subdomain": "teamday",
    "live": true,
    "release": 7
  },
  "dev": {
    "url": "https://dev-teamday.apps.appbricx.com"
  },
  "apps_domain": "apps.appbricx.com",
  "domains": []
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/routing" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/routing", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:26

Check a subdomain

GET/api/dev/v1/projects/:id/routing/subdomain

Whether production may move to a subdomain.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Query parameters

NameTypeDescription
namerequiredstringThe subdomain.

Response

Response
{
  "subdomain": "offsite",
  "host": "offsite.apps.appbricx.com",
  "free": true,
  "current": false
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/routing/subdomain?name=offsite" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/routing/subdomain?name=offsite", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:29

Move production

PUT/api/dev/v1/projects/:id/routing/subdomain

Move production to another subdomain; the old address stops answering at once. confirm repeats the subdomain.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: deploy

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
subdomainrequiredstringThe new one.
confirmrequiredstringThe same again.

Response

Response
{
  "prod": {
    "host": "offsite.apps.appbricx.com"
  }
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
428CONFIRM_REQUIREDconfirm doesn't match.
409SUBDOMAIN_TAKENTaken.
409NOT_PUBLISHEDNothing deployed yet.
curl
curl -X PUT "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/routing/subdomain" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"subdomain":"offsite","confirm":"offsite"}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/routing/subdomain", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "subdomain": "offsite",
    "confirm": "offsite"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:32

Add a custom domain

POST/api/dev/v1/projects/:id/domains

Save a domain (pending) and answer the DNS records to set.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: deploy

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
domainrequiredstringThe domain.

Response

Response
{
  "domain": "book.teamday.example",
  "dns": [
    {
      "type": "CNAME",
      "name": "book",
      "value": "edge.apps.appbricx.com"
    },
    {
      "type": "TXT",
      "name": "_appbricx.book",
      "value": "…"
    }
  ]
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
409DOMAIN_TAKENAnother project has it.
403PLAN_REQUIREDCustom domains need a paid plan.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/domains" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"domain":"book.teamday.example"}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/domains", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "domain": "book.teamday.example"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:37

Verify a domain

POST/api/dev/v1/projects/:id/domains/:domain/verify

Check the domain's DNS; it is active once both records are right.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: deploy

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).
:domainrequiredstringThe domain.

Response

Response
{
  "domain": "book.teamday.example",
  "ready": true
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/domains/book.teamday.example/verify" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/domains/book.teamday.example/verify", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:44

Change a domain

PATCH/api/dev/v1/projects/:id/domains/:domain

Make a domain primary, or redirect it to another.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: deploy

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).
:domainrequiredstringThe domain.

Body

NameTypeDescription
primaryoptionalbooleanThe app's main address.
redirect_tooptionalstringAnother domain of the project.

Response

Response
{
  "domain": "book.teamday.example",
  "primary": true
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X PATCH "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/domains/book.teamday.example" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"primary":true}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/domains/book.teamday.example", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "primary": true
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:47

Remove a domain

DELETE/api/dev/v1/projects/:id/domains/:domain

Remove a custom domain.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: deploy

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).
:domainrequiredstringThe domain.

Response

Response
{
  "removed": true
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X DELETE "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/domains/book.teamday.example" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/domains/book.teamday.example", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:52

Export data

POST/api/dev/v1/projects/:id/data/export

Tables to CSV or JSON files with signed links valid 1 hour.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
envoptional"dev" | "prod"Which environment: dev (default) or prod (the published app).
tablesoptionalstring[]Default every app table.
formatoptional"csv" | "json"Default csv.

Response

Response
{
  "files": [
    {
      "table": "booking",
      "rows": 2,
      "bytes": 612,
      "truncated": false,
      "url": "https://appbricx.com/api/exports/…"
    }
  ],
  "expires_at": "…"
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/data/export" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"tables":["booking"],"format":"csv"}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/data/export", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "tables": [
      "booking"
    ],
    "format": "csv"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:57

Recent exports

GET/api/dev/v1/projects/:id/data/exports

The environment's recent exports and their files.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Query parameters

NameTypeDescription
envoptional"dev" | "prod"Which environment: dev (default) or prod (the published app).

Response

Response
{
  "env": "dev",
  "exports": [
    {
      "id": "x_1",
      "format": "csv",
      "created_at": "…",
      "files": [
        {
          "table": "booking",
          "rows": 2
        }
      ]
    }
  ],
  "keep_days": 7
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/data/exports" \
  -H "Authorization: Bearer $APPBRICX_TOKEN"
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/data/exports", {
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:63

Import rows

POST/api/dev/v1/projects/:id/data/import

Rows or CSV into a table, through the app's write path (rules) or straight in (bulk); each refused row is named. A prod import is a dry run until dry_run: false.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: apply (dev), deploy (prod)

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
tablerequiredstringThe table.
rowsoptionalobject[]Or csv.
csvoptionalstringOr rows.
throughoptional"rules" | "bulk"Default rules.
dry_runoptionalbooleanTry every row, keep nothing.

Response

Response
{
  "dry_run": true,
  "would_insert": 1,
  "errors": []
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/data/import" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"table":"experience","csv":"title,city,price,status\nDrum Circle,Pune,1500,draft","dry_run":true}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/data/import", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "table": "experience",
    "csv": "title,city,price,status\nDrum Circle,Pune,1500,draft",
    "dry_run": true
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:66

Copy between environments

POST/api/dev/v1/projects/:id/data/copy

Replace one environment's whole database with the other's, snapshotting the target first. A dry run until dry_run: false.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: apply (into dev), deploy (into prod)

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).

Body

NameTypeDescription
from_envrequired"dev" | "prod"From.
to_envrequired"dev" | "prod"To.
dry_runoptionalbooleanDefault true.

Response

Response
{
  "copied": true,
  "snapshotId": "s_22…"
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/data/copy" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"from_env":"prod","to_env":"dev","dry_run":false}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/data/copy", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "from_env": "prod",
    "to_env": "dev",
    "dry_run": false
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:73

Download a snapshot

POST/api/dev/v1/projects/:id/snapshots/:sid/download

A signed link (about an hour) to the snapshot's database dump. Audited.

Auth
Developer token: Authorization: Bearer $APPBRICX_TOKEN
Scope: read

Path parameters

NameTypeDescription
:idrequiredstringThe project id (uuid).
:sidrequiredstringThe snapshot id.

Body

NameTypeDescription
envoptional"dev" | "prod"The snapshot's environment.

Response

Response
{
  "id": "s_19…",
  "name": "prod-2026-10-28.dump",
  "size_bytes": 482113,
  "url": "https://appbricx.com/api/exports/…",
  "expires_at": "…"
}

Errors

StatusCodeWhen
401UNAUTHENTICATEDMissing, invalid, expired or revoked token.
404none"Project not found": the id is wrong or outside the token's reach.
curl
curl -X POST "https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/snapshots/s_19…/download" \
  -H "Authorization: Bearer $APPBRICX_TOKEN" \
  -H "content-type: application/json" \
  -d '{"env":"prod"}'
fetch
const res = await fetch("https://appbricx.com/api/dev/v1/projects/3b7e9a52-6c1d-4f0e-9a8b-2c4d6e8f0a1b/snapshots/s_19…/download", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${APPBRICX_TOKEN}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "env": "prod"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data.error?.message ?? data.error ?? res.statusText);

Source: internal/svc/agentapi/transport/console.go:78