API Reference

API Reference

The same API the dashboard uses. Paths live under /api with no /v1 prefix. Address resources by project, phase, and app name.

Try the API

Stays in this tab

Create one in Settings → API tokens. It is stored in this tab only and forwarded to api.stackblaze.cloud — not written on our servers.

Base URL

https://api.stackblaze.cloud

Auth

Bearer kbr_pat_…

OpenAPI

/api/docs

Vocabulary

Docs say project and environment. The API path still uses the Kubero names.

Organization

Prisma tenant the token is scoped to

activeTenantId

Project

Top-level app group with phases and a region

pipeline

Environment

production, review, or a custom phase

phase

App

A workload (web, worker, or cron)

app

Add-on

Managed Postgres, Valkey, MariaDB, Kafka, …

addon kind

Function

Knative function, not an app

function

Authentication

Create a token in Settings → API tokens. The value is shown once and starts with kbr_pat_. It inherits the creator's organization and RBAC.

curl
# Settings  API tokens
export STACKBLAZE_TOKEN=kbr_pat_…

curl https://api.stackblaze.cloud/api/pipelines \
  -H "Authorization: Bearer $STACKBLAZE_TOKEN"

Endpoints

Public automation surface for the dashboard, MCP, and stackblaze.yaml. Open Try it on a row to send a live request. Add-on consoles, WAF, Coroot, billing, and platform-admin stay in OpenAPI.

Projects

7

Apps

8

Deploys

8

Logs

3

Functions

6

Add-ons

3

IaC

7

Tokens

3

Examples

List projects, then restart an app. Builds take a POST; apply routes need iacEnabled.

GET /api/pipelines
curl https://api.stackblaze.cloud/api/pipelines \
  -H "Authorization: Bearer $STACKBLAZE_TOKEN"
200 OK
{
  "items": [
    {
      "name": "acme-app",
      "domain": "acme-app.stackblaze.app",
      "regionSlug": "us-east-1",
      "reviewapps": true,
      "iacEnabled": false
    }
  ]
}
GET /api/apps/{pipeline}/{phase}/{app}/restart
curl https://api.stackblaze.cloud/api/apps/acme-app/production/api/restart \
  -H "Authorization: Bearer $STACKBLAZE_TOKEN"

# Queue a build instead
curl -X POST https://api.stackblaze.cloud/api/deployments/build/acme-app/production/api \
  -H "Authorization: Bearer $STACKBLAZE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"buildstrategy":"nixpacks","repository":"https://github.com/org/repo","reference":"main"}'

# Check IaC before /apply
curl "https://api.stackblaze.cloud/api/iac/status?pipeline=acme-app" \
  -H "Authorization: Bearer $STACKBLAZE_TOKEN"

Errors

Failed requests return a JSON body with a status code and message.

404
{
  "statusCode": 404,
  "message": "Pipeline not found",
  "error": "Not Found"
}
  • 400

    Invalid body or reserved name (pipeline named new)

  • 401

    Missing or invalid token

  • 403

    Token lacks permission, or the resource is outside the organization

  • 404

    Not found

  • 409

    Resource version or state mismatch

  • 413

    Payload too large — app specs with several add-ons can be large

  • 500

    Internal server error

  • 503

    Transient downstream failure — safe to retry

Next steps