BWEZE Docs

Projects

A project is a typed deploy unit - a frontend web app or a backend data stack.

A project is the unit you deploy and manage on BWEZE. Every project has a type:

  • frontend - a web app / site deploy (push from git, live on *.bweze.app with SSL).
  • backend - a data stack: Postgres with auth, storage, realtime, and pgvector.

You choose the type when you create the project. Domains, deployments, and other resources belong to a project.

List projects - GET /v1/projects

curl https://api.bweze.com/v1/projects \
  -H "authorization: Bearer bw_sk_..."
{
  "projects": [
    { "id": "…", "name": "acme-web", "type": "frontend", "app": { "…": "…" }, "backend": null }
  ]
}

Create a project - POST /v1/projects

curl -X POST https://api.bweze.com/v1/projects \
  -H "authorization: Bearer bw_sk_..." -H "content-type: application/json" \
  -d '{ "name": "acme-web", "type": "frontend" }'

type must be "frontend" or "backend".

Terminal - POST /v1/projects/:id/exec

Run a one-shot command inside the project's running container (the same shell the dashboard Terminal uses). Deploy the project at least once first - there must be a running container.

curl -X POST https://api.bweze.com/v1/projects/{id}/exec \
  -H "authorization: Bearer bw_sk_..." -H "content-type: application/json" \
  -d '{ "command": "ls -la /app" }'
{ "output": "total 24\ndrwxr-xr-x ...", "truncated": false }
  • Body: { "command": string } (trimmed; max 8192 chars).
  • Response: { "output": string, "truncated": boolean }. Output is capped at 256KB; if the command prints more, output ends with ... [output truncated] and truncated is true.
  • Auth: secret key only (bw_sk_...) with the terminal:exec permission - available to owner, admin, and developer roles. Publishable keys (bw_pk_...) are rejected because exec is a write action.
  • Timeout: 30s. A longer-running command returns a 504 and is aborted.
  • 409 no_container: the project has no running container yet - deploy it first.
  • Kill switch: set BWEZE_PUBLIC_TERMINAL_EXEC=0 on the control plane to disable this endpoint platform-wide (returns 403 disabled).

CLI

bweze projects create acme-web --type frontend
bweze projects domains connect acme-web app.example.com

From code

The same calls with fetch (Node 18+, Deno, Bun, or any runtime with fetch):

const api = (path: string, init: RequestInit = {}) =>
  fetch(`https://api.bweze.com${path}`, {
    ...init,
    headers: {
      authorization: `Bearer ${process.env.BWEZE_API_KEY}`,
      "content-type": "application/json",
      ...init.headers,
    },
  }).then((r) => r.json());

await api("/v1/projects", {
  method: "POST",
  body: JSON.stringify({ name: "acme-web", type: "frontend" }),
});
const { projects } = await api("/v1/projects");

// Run a command in the project's container:
const { output, truncated } = await api("/v1/projects/<project-id>/exec", {
  method: "POST",
  body: JSON.stringify({ command: "ls -la /app" }),
});

On this page