staxaAPI
Help centerTemplatesPricing
Get an API key
Contents ▾▴

Basics

Getting StartedAuthenticationResponse FormatError HandlingRate LimitsWebhooks (Coming Soon)Changelog

Tenants

List tenantsGETCreate a tenantPOSTGet a tenantGETUpdate a tenantPATCHDelete a tenantDELETE

Services

List servicesGETAdd a servicePOSTUpdate a servicePATCHRemove a serviceDELETEDeploy a servicePOSTRestart a servicePOSTList a service's deploymentsGETRoll a service backPOST

Deployments

Deploy every servicePOSTRestart a single-service tenantPOSTList a tenant's deploymentsGETDeploy a tenantPOSTGet a deploymentGETGet build logsGETRoll a tenant backPOST

Environment variables

List a service's variablesGETReplace a service's variablesPUTDelete a service variableDELETEList tenant variablesGETSet tenant variablesPUTDelete a tenant variableDELETE

Domains

List custom domainsGETAdd a custom domainPOSTVerify a custom domainPOSTRemove a custom domainDELETE

Network rules

List network rulesGETCreate a network rulePOSTGet a network ruleGETDelete a network ruleDELETE

Logs and events

Get a service's logsGETStream deployment eventsGETGet a tenant's logsGET

Templates

List templatesGETGet a templateGETList runtime versionsGET

Registries

List registry credentialsGETAdd a registry credentialPOSTGet a registry credentialGETUpdate a registry credentialPATCHDelete a registry credentialDELETECheck a registry credentialPOSTList a registry's repositoriesGETList a repository's tagsGET

GitHub

Get the GitHub connectionGETLink a GitHub installationPOSTUnlink GitHubDELETEList repositoriesGETList branchesGETAnalyze a repositoryGETFind apps in a monorepoGET

Notifications

List notificationsGETMark a notification readPOSTMark every notification readPOST

API keys

List API keysGETCreate an API keyPOSTRevoke an API keyDELETE

Account

Get the accountGETUpdate the accountPATCHGet email preferencesGETUpdate email preferencesPATCH

Billing

Get plan and usageGETStart a checkoutPOSTOpen the billing portalPOST

Health

LivenessGETReadinessGET

Basics

Getting StartedAuthenticationResponse FormatError HandlingRate LimitsWebhooks (Coming Soon)Changelog

Tenants

List tenantsGETCreate a tenantPOSTGet a tenantGETUpdate a tenantPATCHDelete a tenantDELETE

Services

List servicesGETAdd a servicePOSTUpdate a servicePATCHRemove a serviceDELETEDeploy a servicePOSTRestart a servicePOSTList a service's deploymentsGETRoll a service backPOST

Deployments

Deploy every servicePOSTRestart a single-service tenantPOSTList a tenant's deploymentsGETDeploy a tenantPOSTGet a deploymentGETGet build logsGETRoll a tenant backPOST

Environment variables

List a service's variablesGETReplace a service's variablesPUTDelete a service variableDELETEList tenant variablesGETSet tenant variablesPUTDelete a tenant variableDELETE

Domains

List custom domainsGETAdd a custom domainPOSTVerify a custom domainPOSTRemove a custom domainDELETE

Network rules

List network rulesGETCreate a network rulePOSTGet a network ruleGETDelete a network ruleDELETE

Logs and events

Get a service's logsGETStream deployment eventsGETGet a tenant's logsGET

Templates

List templatesGETGet a templateGETList runtime versionsGET

Registries

List registry credentialsGETAdd a registry credentialPOSTGet a registry credentialGETUpdate a registry credentialPATCHDelete a registry credentialDELETECheck a registry credentialPOSTList a registry's repositoriesGETList a repository's tagsGET

GitHub

Get the GitHub connectionGETLink a GitHub installationPOSTUnlink GitHubDELETEList repositoriesGETList branchesGETAnalyze a repositoryGETFind apps in a monorepoGET

Notifications

List notificationsGETMark a notification readPOSTMark every notification readPOST

API keys

List API keysGETCreate an API keyPOSTRevoke an API keyDELETE

Account

Get the accountGETUpdate the accountPATCHGet email preferencesGETUpdate email preferencesPATCH

Billing

Get plan and usageGETStart a checkoutPOSTOpen the billing portalPOST

Health

LivenessGETReadinessGET

Reference

API reference

Everything the dashboard does is an HTTP call you can make yourself. Authenticate with an API key as a bearer token.

Base URLhttps://api.staxa.dev/api/v1

Getting Started

The Staxa API lets you programmatically create and manage isolated tenant environments. Every action available in the dashboard is also available through the API.

Base URL: https://api.staxa.dev/api/v1

Quick Example: Create a Tenant

curl -X POST https://api.staxa.dev/api/v1/tenants \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "acme-corp",
    "source_type": "github",
    "repo_url": "https://github.com/acme/webapp",
    "branch": "main"
  }'

This creates a tenant named "acme-corp" with one service, detects the framework, builds it and deploys it, all from a single API call. The response is the tenant, and its deployment_url is where the app is served once the deploy finishes. Follow progress on GET /api/v1/tenants/{id}/events (Server-Sent Events) or by reading the tenant until its status is ready.

Advanced: Pass "deploy_on_create": false in the request body to create the tenant + services + env vars without enqueueing a deploy. Useful for templating, multi-step provisioning, or uploading secrets before the first build. Trigger the deploy later with POST /api/v1/tenants/{id}/deployments.

Authentication

The Staxa API accepts two authentication modes:

API Key (Programmatic)

For server-to-server integrations and automation. Create API keys from the dashboard at Settings → API Keys, or via POST /api/v1/api-keys.

curl https://api.staxa.dev/api/v1/tenants \
  -H "Authorization: Bearer sk_live_a1b2c3d4e5f6..."

A key is created as live (sk_live_..., the default) or test (sk_test_...). Both work the same way today; the prefix only tells your own keys apart. A key with the read scope can only read.

The key is shown once, when it is created. Revoking a key takes effect at once.

Clerk JWT (Dashboard)

Used automatically by the dashboard. Most developers won't need this. Use API keys for programmatic access.

curl https://api.staxa.dev/api/v1/tenants \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."

Response Format

All API responses follow one of three shapes:

Single resource:

{
  "data": { ... },
  "meta": { "request_id": "..." }
}

List (paginated):

{
  "data": [ ... ],
  "pagination": { "total": 42, "limit": 20, "offset": 0 },
  "meta": { "request_id": "..." }
}

Paged lists take limit (default 20, up to 100) and offset. Short lists, such as a tenant's services or domains, return everything in data with no pagination.

Error:

{
  "error": {
    "code": "...",
    "message": "...",
    "details": { ... }
  }
}

Error Handling

The API uses standard HTTP status codes:

CodeMeaning
200Success (GET, PATCH)
201Created (synchronous POST)
202Accepted (async operations such as tenant creation and deploys)
204No Content (DELETE)
400Bad Request (validation)
401Unauthorized
403Forbidden (for example an unverified email, or a suspended account)
404Not Found. A resource that belongs to another account also answers 404
409Conflict (a name that is taken, or a deployment already running)
422Understood and refused (for example a plan limit: code limit_exceeded)
429Rate limited
500Internal Server Error
503Not available right now. During a maintenance window writes answer 503 with Retry-After

Every error carries a stable code and a message. Quote meta.request_id, or the X-Request-ID response header, when contacting support.

Rate Limits

Each account may make 100 requests per minute. A request over the limit answers 429 Too Many Requests.

Every response says where you stand:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1708790460

A 401 is not a rate limit: retrying the same credentials returns the same 401.

Webhooks (Coming Soon)

Webhooks will allow you to receive real-time notifications when events occur in your tenant environments.

Planned event format:

{
  "event": "tenant.ready",
  "tenant_id": "ten_a1b2c3d4e5f6",
  "data": {
    "status": "ready",
    "url": "https://web-acme.staxa.app"
  },
  "timestamp": "2025-02-24T14:31:00Z"
}

Planned events: tenant.ready, tenant.failed, tenant.deleted, deployment.started, deployment.succeeded, deployment.failed.

Coming soon. Contact us if you need webhook integration today.

Changelog

2026-05-12

  • POST /api/v1/tenants now auto-deploys by default. Creating a tenant also creates the first deployment row (version 1, trigger tenant.create) and enqueues the build/deploy pipeline. The response is still 202 Accepted and the deployment can be observed via GET /api/v1/tenants/{id}/deployments or the SSE events stream. Pass "deploy_on_create": false to preserve the previous behavior of create-without-deploy. Backward compatible: clients that were chaining POST /tenants/{id}/deployments as a second step will simply get one extra deployment per create.

Tenants

Create, list, update and delete tenants.

Tenants

List tenants

GET/api/v1/tenants

The account's tenants with their services, newest first.

Parameters

limitinteger (query)default 20
Page size, up to 100.
offsetinteger (query)default 0
Items to skip.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

Takes `limit` (1–100, default 20), `offset`, and `status` as query parameters. The live URL is `deployment_url`, and it stays empty until the first deploy routes successfully. Deleted tenants are excluded.

Request · curl
curl https://api.staxa.dev/api/v1/tenants \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "app_port": 3000,
      "branch": "main",
      "build_context": "string",
      "build_context_scope": "string",
      "cpu_limit": "string",
      "cpu_request": "string",
      "created_at": "2026-01-15T10:30:00Z",
      "current_image": "string",
      "current_stage": "string",
      "db_engine": "string",
      "db_version": "string",
      "deleted_at": "2026-01-15T10:30:00Z",
      "deployment_url": "string",
      "diagnostic_message": "string",
      "diagnostic_sent_at": "2026-01-15T10:30:00Z",
      "display_name": "Acme",
      "dockerfile_path": "string",
      "egress_mode": "allow_all",
      "error_stage": "string",
      "framework": "string",
      "health_check_path": "string",
      "health_check_port": 1,
      "health_check_type": "string",
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "idle_slept_at": "2026-01-15T10:30:00Z",
      "image_url": "ghcr.io/acme/app:1.4.2",
      "k8s_namespace": "string",
      "last_error": "string",
      "last_request_at": "2026-01-15T10:30:00Z",
      "memory_limit": "string",
      "memory_request": "string",
      "metadata": {
        "KEY": null
      },
      "name": "acme",
      "plan_suspended_at": "2026-01-15T10:30:00Z",
      "plan_suspended_reason": "string",
      "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
      "repo_url": "https://github.com/acme/app",
      "resource_size": "string",
      "root_directory": "string",
      "runtime": "string",
      "runtime_version": "string",
      "services": [
        {}
      ],
      "source_type": "string",
      "status": "pending",
      "storage_limit": "string",
      "target_arch": "string",
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  },
  "pagination": {
    "total": 42,
    "limit": 20,
    "offset": 0
  }
}

Tenants

Create a tenant

POST/api/v1/tenants

Creates a tenant with its services and, unless `deploy_on_create` is false, starts its first deploy. Follow progress on the event stream or by reading the tenant.

Parameters

namestringrequired
3 to 31 lowercase letters, digits or hyphens, starting with a letter. Unique across Staxa: it is the tenant's hostname.
display_namestring
display_name
db_enginestring
The tenant's database, shared by its services. Valkey is a cache-grade store and is not backed up. One of: postgres, mysql, valkey, none.
db_versionstring
`postgres`: 17 (default) or 16. `mysql`: 8.4. `valkey`: 8.0 (default) or 7.2.
servicesarray
The tenant's services. Omit to create one service from the top-level source fields.
envobject
Tenant-level environment variables, shared by every service.
secret_keysarray
Keys of `env` to store as secrets.
build_secret_keysarray
build_secret_keys
deploy_on_createboolean
Default `true`: the first deploy starts with the create.
source_typestring
With no `services`: the source of the tenant's one service. One of: github, image.
repo_urlstring
repo_url
branchstring
branch
root_directorystring
root_directory
dockerfile_pathstring
dockerfile_path
build_contextstring
build_context
build_context_scopestring
One of: root, repo.
image_urlstring
image_url
frameworkstring
framework
runtimestring
runtime
runtime_versionstring
runtime_version
app_portinteger
app_port
resource_sizestring
One of: small, medium, large.
health_check_typestring
One of: http, tcp, none.
health_check_pathstring
health_check_path
health_check_portinteger
health_check_port
autoscale_disabledboolean
autoscale_disabled

Errors

  • 400 An invalid or reserved name, an unknown `db_engine`, or an invalid build path.
  • 401 The credentials are missing or not valid.
  • 403 The account's email is not verified, or its deploys are held.
  • 409 The tenant name, or a hostname it needs, is taken.
  • 422 A plan limit was reached, or the request was refused.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Returns 202 Accepted: the work runs in the background.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"acme","display_name":"Acme","db_engine":"postgres","db_version":"string"}'
Request body
{
  "name": "acme",
  "display_name": "Acme",
  "db_engine": "postgres",
  "db_version": "string"
}
Response
{
  "data": {
    "app_port": 3000,
    "branch": "main",
    "build_context": "string",
    "build_context_scope": "string",
    "cpu_limit": "string",
    "cpu_request": "string",
    "created_at": "2026-01-15T10:30:00Z",
    "current_image": "string",
    "current_stage": "string",
    "db_engine": "string",
    "db_version": "string",
    "deleted_at": "2026-01-15T10:30:00Z",
    "deployment_url": "string",
    "diagnostic_message": "string",
    "diagnostic_sent_at": "2026-01-15T10:30:00Z",
    "display_name": "Acme",
    "dockerfile_path": "string",
    "egress_mode": "allow_all",
    "error_stage": "string",
    "framework": "string",
    "health_check_path": "string",
    "health_check_port": 1,
    "health_check_type": "string",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "idle_slept_at": "2026-01-15T10:30:00Z",
    "image_url": "ghcr.io/acme/app:1.4.2",
    "k8s_namespace": "string",
    "last_error": "string",
    "last_request_at": "2026-01-15T10:30:00Z",
    "memory_limit": "string",
    "memory_request": "string",
    "metadata": {
      "KEY": null
    },
    "name": "acme",
    "plan_suspended_at": "2026-01-15T10:30:00Z",
    "plan_suspended_reason": "string",
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "repo_url": "https://github.com/acme/app",
    "resource_size": "string",
    "root_directory": "string",
    "runtime": "string",
    "runtime_version": "string",
    "services": [
      {
        "autoscale_disabled": true,
        "branch": "main",
        "build_context": "string",
        "build_context_scope": "string",
        "created_at": "2026-01-15T10:30:00Z",
        "current_stage": "string",
        "deploy_priority": 1,
        "display_name": "Acme",
        "dockerfile_path": "string",
        "framework": "string",
        "health_check_path": "string",
        "health_check_port": 1,
        "health_check_type": "string",
        "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
        "image_tag": "ghcr.io/acme/app:1.4.2",
        "image_url": "ghcr.io/acme/app:1.4.2",
        "is_primary": true,
        "is_routable": true,
        "name": "acme",
        "port": 3000,
        "repo_url": "https://github.com/acme/app",
        "resource_size": "string",
        "root_directory": "string",
        "runtime": "string",
        "runtime_version": "string",
        "source_type": "string",
        "status": "string",
        "target_arch": "string",
        "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
        "updated_at": "2026-01-15T10:30:00Z"
      }
    ],
    "source_type": "string",
    "status": "pending",
    "storage_limit": "string",
    "target_arch": "string",
    "updated_at": "2026-01-15T10:30:00Z",
    "auto_deploy_started": true,
    "auto_deploy_error": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Tenants

Get a tenant

GET/api/v1/tenants/{id}

One tenant with its services.

Parameters

idstring (path)required
The tenant id (`ten_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

Domains are not included here. Fetch them from `GET /tenants/{id}/domains`. When a deploy fails, `last_error` and `error_stage` carry the reason; `diagnostic_message` may appear mid-deploy with a non-fatal hint, such as a readiness probe that is not passing yet.

Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id> \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "app_port": 3000,
    "branch": "main",
    "build_context": "string",
    "build_context_scope": "string",
    "cpu_limit": "string",
    "cpu_request": "string",
    "created_at": "2026-01-15T10:30:00Z",
    "current_image": "string",
    "current_stage": "string",
    "db_engine": "string",
    "db_version": "string",
    "deleted_at": "2026-01-15T10:30:00Z",
    "deployment_url": "string",
    "diagnostic_message": "string",
    "diagnostic_sent_at": "2026-01-15T10:30:00Z",
    "display_name": "Acme",
    "dockerfile_path": "string",
    "egress_mode": "allow_all",
    "error_stage": "string",
    "framework": "string",
    "health_check_path": "string",
    "health_check_port": 1,
    "health_check_type": "string",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "idle_slept_at": "2026-01-15T10:30:00Z",
    "image_url": "ghcr.io/acme/app:1.4.2",
    "k8s_namespace": "string",
    "last_error": "string",
    "last_request_at": "2026-01-15T10:30:00Z",
    "memory_limit": "string",
    "memory_request": "string",
    "metadata": {
      "KEY": null
    },
    "name": "acme",
    "plan_suspended_at": "2026-01-15T10:30:00Z",
    "plan_suspended_reason": "string",
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "repo_url": "https://github.com/acme/app",
    "resource_size": "string",
    "root_directory": "string",
    "runtime": "string",
    "runtime_version": "string",
    "services": [
      {
        "autoscale_disabled": true,
        "branch": "main",
        "build_context": "string",
        "build_context_scope": "string",
        "created_at": "2026-01-15T10:30:00Z",
        "current_stage": "string",
        "deploy_priority": 1,
        "display_name": "Acme",
        "dockerfile_path": "string",
        "framework": "string",
        "health_check_path": "string",
        "health_check_port": 1,
        "health_check_type": "string",
        "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
        "image_tag": "ghcr.io/acme/app:1.4.2",
        "image_url": "ghcr.io/acme/app:1.4.2",
        "is_primary": true,
        "is_routable": true,
        "name": "acme",
        "port": 3000,
        "repo_url": "https://github.com/acme/app",
        "resource_size": "string",
        "root_directory": "string",
        "runtime": "string",
        "runtime_version": "string",
        "source_type": "string",
        "status": "string",
        "target_arch": "string",
        "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
        "updated_at": "2026-01-15T10:30:00Z"
      }
    ],
    "source_type": "string",
    "status": "pending",
    "storage_limit": "string",
    "target_arch": "string",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Tenants

Update a tenant

PATCH/api/v1/tenants/{id}

Changes a tenant's settings. Build and size changes take effect on the next deploy.

Parameters

idstring (path)required
The tenant id (`ten_...`).
display_namestring
display_name
repo_urlstring
repo_url
branchstring
branch
root_directorystring
root_directory
dockerfile_pathstring
dockerfile_path
build_contextstring
build_context
build_context_scopestring
One of: root, repo.
resource_sizestring
One of: small, medium, large.
app_portinteger
app_port
egress_modestring
One of: allow_all, restricted.
health_check_typestring
One of: http, tcp, none.
health_check_pathstring
health_check_path
health_check_portinteger
health_check_port

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 422 A size the plan does not include, or the request was refused.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

`resource_size` must be `small`, `medium`, or `large`; `egress_mode` must be `allow_all` or `restricted`; `app_port` must be between 1 and 65535. Changes to build or runtime settings take effect on the next deploy. Trigger one with `POST /tenants/{id}/deployments`.

Request · curl
curl -X PATCH https://api.staxa.dev/api/v1/tenants/<id> \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"display_name":"Acme","repo_url":"https://github.com/acme/app","branch":"main","root_directory":"string"}'
Request body
{
  "display_name": "Acme",
  "repo_url": "https://github.com/acme/app",
  "branch": "main",
  "root_directory": "string"
}
Response
{
  "data": {
    "app_port": 3000,
    "branch": "main",
    "build_context": "string",
    "build_context_scope": "string",
    "cpu_limit": "string",
    "cpu_request": "string",
    "created_at": "2026-01-15T10:30:00Z",
    "current_image": "string",
    "current_stage": "string",
    "db_engine": "string",
    "db_version": "string",
    "deleted_at": "2026-01-15T10:30:00Z",
    "deployment_url": "string",
    "diagnostic_message": "string",
    "diagnostic_sent_at": "2026-01-15T10:30:00Z",
    "display_name": "Acme",
    "dockerfile_path": "string",
    "egress_mode": "allow_all",
    "error_stage": "string",
    "framework": "string",
    "health_check_path": "string",
    "health_check_port": 1,
    "health_check_type": "string",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "idle_slept_at": "2026-01-15T10:30:00Z",
    "image_url": "ghcr.io/acme/app:1.4.2",
    "k8s_namespace": "string",
    "last_error": "string",
    "last_request_at": "2026-01-15T10:30:00Z",
    "memory_limit": "string",
    "memory_request": "string",
    "metadata": {
      "KEY": null
    },
    "name": "acme",
    "plan_suspended_at": "2026-01-15T10:30:00Z",
    "plan_suspended_reason": "string",
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "repo_url": "https://github.com/acme/app",
    "resource_size": "string",
    "root_directory": "string",
    "runtime": "string",
    "runtime_version": "string",
    "services": [
      {
        "autoscale_disabled": true,
        "branch": "main",
        "build_context": "string",
        "build_context_scope": "string",
        "created_at": "2026-01-15T10:30:00Z",
        "current_stage": "string",
        "deploy_priority": 1,
        "display_name": "Acme",
        "dockerfile_path": "string",
        "framework": "string",
        "health_check_path": "string",
        "health_check_port": 1,
        "health_check_type": "string",
        "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
        "image_tag": "ghcr.io/acme/app:1.4.2",
        "image_url": "ghcr.io/acme/app:1.4.2",
        "is_primary": true,
        "is_routable": true,
        "name": "acme",
        "port": 3000,
        "repo_url": "https://github.com/acme/app",
        "resource_size": "string",
        "root_directory": "string",
        "runtime": "string",
        "runtime_version": "string",
        "source_type": "string",
        "status": "string",
        "target_arch": "string",
        "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
        "updated_at": "2026-01-15T10:30:00Z"
      }
    ],
    "source_type": "string",
    "status": "pending",
    "storage_limit": "string",
    "target_arch": "string",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Tenants

Delete a tenant

DELETE/api/v1/tenants/{id}

Deletes a tenant with its services, database and data. This cannot be undone. The teardown runs in the background.

Parameters

idstring (path)required
The tenant id (`ten_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 The deletion could not be queued. Nothing was deleted.

Returns 202 Accepted: the work runs in the background.

Request · curl
curl -X DELETE https://api.staxa.dev/api/v1/tenants/<id> \
  -H "Authorization: Bearer sk_live_..."
Response
202 Deletion started.

Services

Add, deploy, restart and remove the services of a tenant.

Services

List services

GET/api/v1/tenants/{id}/services

The tenant's services.

Parameters

idstring (path)required
The tenant id (`ten_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

A plain array, not paginated. Services deploy in `deploy_priority` order, lowest first.

Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/services \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "autoscale_disabled": true,
      "branch": "main",
      "build_context": "string",
      "build_context_scope": "string",
      "created_at": "2026-01-15T10:30:00Z",
      "current_stage": "string",
      "deploy_priority": 1,
      "display_name": "Acme",
      "dockerfile_path": "string",
      "framework": "string",
      "health_check_path": "string",
      "health_check_port": 1,
      "health_check_type": "string",
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "image_tag": "ghcr.io/acme/app:1.4.2",
      "image_url": "ghcr.io/acme/app:1.4.2",
      "is_primary": true,
      "is_routable": true,
      "name": "acme",
      "port": 3000,
      "repo_url": "https://github.com/acme/app",
      "resource_size": "string",
      "root_directory": "string",
      "runtime": "string",
      "runtime_version": "string",
      "source_type": "string",
      "status": "string",
      "target_arch": "string",
      "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Services

Add a service

POST/api/v1/tenants/{id}/services

Adds a service to the tenant and starts its first deploy. Set its environment variables afterwards and restart.

Parameters

idstring (path)required
The tenant id (`ten_...`).
namestringrequired
1 to 31 lowercase letters, digits or hyphens, starting and ending with a letter or digit. Part of the service's hostname.
display_namestring
display_name
source_typestringrequired
`github` builds from a repository; `image` runs a pre-built image. One of: github, image.
repo_urlstring
The repository to build, for `github`.
branchstring
Default `main`.
root_directorystring
The service's directory in a monorepo.
dockerfile_pathstring
dockerfile_path
build_contextstring
build_context
build_context_scopestring
`repo` builds with the whole repository as context. One of: root, repo.
image_urlstring
The image to run, for `image`.
frameworkstring
framework
runtimestring
runtime
runtime_versionstring
One of the versions `GET /config/runtimes` lists.
portinteger
The port the app listens on.
is_routableboolean
Whether the service gets a public hostname.
deploy_priorityinteger
Lower numbers deploy first in a deploy-all.
resource_sizestring
One of: small, medium, large.
health_check_typestring
One of: http, tcp, none.
health_check_pathstring
health_check_path
health_check_portinteger
health_check_port
autoscale_disabledboolean
`true` keeps the service at one pod whatever the plan allows.

Errors

  • 400 A missing, invalid or reserved name, or an invalid build path.
  • 401 The credentials are missing or not valid.
  • 403 The account's email is not verified, or its deploys are held.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 409 A service with this name exists, or its hostname is taken.
  • 422 A plan limit was reached, or the request was refused.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Returns 202 Accepted: the work runs in the background.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants/<id>/services \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"acme","source_type":"github","display_name":"Acme","repo_url":"https://github.com/acme/app","branch":"main"}'
Request body
{
  "name": "acme",
  "source_type": "github",
  "display_name": "Acme",
  "repo_url": "https://github.com/acme/app",
  "branch": "main"
}
Response
{
  "data": {
    "autoscale_disabled": true,
    "branch": "main",
    "build_context": "string",
    "build_context_scope": "string",
    "created_at": "2026-01-15T10:30:00Z",
    "current_stage": "string",
    "deploy_priority": 1,
    "display_name": "Acme",
    "dockerfile_path": "string",
    "framework": "string",
    "health_check_path": "string",
    "health_check_port": 1,
    "health_check_type": "string",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "image_tag": "ghcr.io/acme/app:1.4.2",
    "image_url": "ghcr.io/acme/app:1.4.2",
    "is_primary": true,
    "is_routable": true,
    "name": "acme",
    "port": 3000,
    "repo_url": "https://github.com/acme/app",
    "resource_size": "string",
    "root_directory": "string",
    "runtime": "string",
    "runtime_version": "string",
    "source_type": "string",
    "status": "string",
    "target_arch": "string",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Services

Update a service

PATCH/api/v1/tenants/{id}/services/{serviceName}

Changes a service's settings. Build settings take effect on its next deploy; size, port and health check on its next deploy or restart.

Parameters

idstring (path)required
The tenant id (`ten_...`).
serviceNamestring (path)required
The service's name within the tenant.
display_namestring
display_name
repo_urlstring
The repository to build, for `github`.
branchstring
Default `main`.
root_directorystring
The service's directory in a monorepo.
dockerfile_pathstring
dockerfile_path
build_contextstring
build_context
build_context_scopestring
`repo` builds with the whole repository as context. One of: root, repo.
resource_sizestring
One of: small, medium, large.
portinteger
The port the app listens on.
is_routableboolean
Whether the service gets a public hostname.
deploy_priorityinteger
Lower numbers deploy first in a deploy-all.
health_check_typestring
One of: http, tcp, none.
health_check_pathstring
health_check_path
health_check_portinteger
health_check_port
autoscale_disabledboolean
`true` keeps the service at one pod whatever the plan allows.

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 422 A size the plan does not include, or the request was refused.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.
Request · curl
curl -X PATCH https://api.staxa.dev/api/v1/tenants/<id>/services/<serviceName> \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"display_name":"Acme","repo_url":"https://github.com/acme/app","branch":"main","root_directory":"string"}'
Request body
{
  "display_name": "Acme",
  "repo_url": "https://github.com/acme/app",
  "branch": "main",
  "root_directory": "string"
}
Response
{
  "data": {
    "autoscale_disabled": true,
    "branch": "main",
    "build_context": "string",
    "build_context_scope": "string",
    "created_at": "2026-01-15T10:30:00Z",
    "current_stage": "string",
    "deploy_priority": 1,
    "display_name": "Acme",
    "dockerfile_path": "string",
    "framework": "string",
    "health_check_path": "string",
    "health_check_port": 1,
    "health_check_type": "string",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "image_tag": "ghcr.io/acme/app:1.4.2",
    "image_url": "ghcr.io/acme/app:1.4.2",
    "is_primary": true,
    "is_routable": true,
    "name": "acme",
    "port": 3000,
    "repo_url": "https://github.com/acme/app",
    "resource_size": "string",
    "root_directory": "string",
    "runtime": "string",
    "runtime_version": "string",
    "source_type": "string",
    "status": "string",
    "target_arch": "string",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Services

Remove a service

DELETE/api/v1/tenants/{id}/services/{serviceName}

Removes a service that is not the tenant's primary, with its deployment history and its own environment variables.

Parameters

idstring (path)required
The tenant id (`ten_...`).
serviceNamestring (path)required
The service's name within the tenant.

Errors

  • 400 It is the primary service.
  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 409 A deployment that overlaps it is running. Nothing was removed.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Returns 204 No Content.

Request · curl
curl -X DELETE https://api.staxa.dev/api/v1/tenants/<id>/services/<serviceName> \
  -H "Authorization: Bearer sk_live_..."
Response
204 Done. No body.

Services

Deploy a service

POST/api/v1/tenants/{id}/services/{serviceName}/deploy

Builds the service from the tip of its branch (or pulls its image) and rolls it out. To apply a configuration change without new code, restart instead.

Parameters

idstring (path)required
The tenant id (`ten_...`).
serviceNamestring (path)required
The service's name within the tenant.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 409 Another deployment that overlaps this one is running. Retry when it finishes.
  • 422 The tenant is deploying, being deleted, or paused over its plan limit.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Deploys are not available right now.

Returns 202 Accepted: the work runs in the background.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants/<id>/services/<serviceName>/deploy \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "build_logs": "string",
    "completed_at": "2026-01-15T10:30:00Z",
    "created_at": "2026-01-15T10:30:00Z",
    "deploy_type": "full",
    "duration_ms": 1,
    "error_message": "string",
    "error_stage": "string",
    "has_config_snapshot": true,
    "has_retained_secrets": true,
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "image_tag": "ghcr.io/acme/app:1.4.2",
    "is_current": true,
    "metadata": {
      "KEY": null
    },
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
    "source_ref": "string",
    "source_type": "string",
    "started_at": "2026-01-15T10:30:00Z",
    "status": "pending",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "trigger": "string",
    "version": 3
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Services

Restart a service

POST/api/v1/tenants/{id}/services/{serviceName}/restart

Re-applies the service's current configuration and environment variables to what is running. No build, and no change to the code that runs.

Parameters

idstring (path)required
The tenant id (`ten_...`).
serviceNamestring (path)required
The service's name within the tenant.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 409 Another deployment that overlaps this one is running. Retry when it finishes.
  • 422 The tenant is deploying, being deleted, or paused over its plan limit.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Deploys are not available right now.

Returns 202 Accepted: the work runs in the background.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants/<id>/services/<serviceName>/restart \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "build_logs": "string",
    "completed_at": "2026-01-15T10:30:00Z",
    "created_at": "2026-01-15T10:30:00Z",
    "deploy_type": "full",
    "duration_ms": 1,
    "error_message": "string",
    "error_stage": "string",
    "has_config_snapshot": true,
    "has_retained_secrets": true,
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "image_tag": "ghcr.io/acme/app:1.4.2",
    "is_current": true,
    "metadata": {
      "KEY": null
    },
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
    "source_ref": "string",
    "source_type": "string",
    "started_at": "2026-01-15T10:30:00Z",
    "status": "pending",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "trigger": "string",
    "version": 3
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Services

List a service's deployments

GET/api/v1/tenants/{id}/services/{serviceName}/deployments

One service's deployments, newest first.

Parameters

idstring (path)required
The tenant id (`ten_...`).
serviceNamestring (path)required
The service's name within the tenant.
limitinteger (query)default 20
Page size, up to 100.
offsetinteger (query)default 0
Items to skip.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

Paginated with `limit` and `offset`. `is_current` is scoped to this service: it marks the deployment currently serving traffic for THIS service, and every service in a tenant has its own current deployment. `has_config_snapshot` reports whether the deployment's configuration was captured, and `has_retained_secrets` whether its secret values are still held. A deployment that captured no secrets reports `has_retained_secrets: true`, because a rollback restores it in full. Together they tell you what a rollback to that deployment would restore before you request it. Roll one of these back with `POST /api/v1/tenants/{id}/services/{serviceName}/deployments/{depId}/rollback`.

Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/services/<serviceName>/deployments \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "build_logs": "string",
      "completed_at": "2026-01-15T10:30:00Z",
      "created_at": "2026-01-15T10:30:00Z",
      "deploy_type": "full",
      "duration_ms": 1,
      "error_message": "string",
      "error_stage": "string",
      "has_config_snapshot": true,
      "has_retained_secrets": true,
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "image_tag": "ghcr.io/acme/app:1.4.2",
      "is_current": true,
      "metadata": {
        "KEY": null
      },
      "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
      "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
      "source_ref": "string",
      "source_type": "string",
      "started_at": "2026-01-15T10:30:00Z",
      "status": "pending",
      "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "trigger": "string",
      "version": 3
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  },
  "pagination": {
    "total": 42,
    "limit": 20,
    "offset": 0
  }
}

Services

Roll a service back

POST/api/v1/tenants/{id}/services/{serviceName}/deployments/{depId}/rollback

Rolls the service back to one of its earlier successful deployments. No build.

Parameters

idstring (path)required
The tenant id (`ten_...`).
serviceNamestring (path)required
The service's name within the tenant.
depIdstring (path)required
The deployment id (`dep_...`).
refresh_configboolean
`true` keeps the old image but uses today's configuration. Default `false`: the configuration that deployment ran with is restored.

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 409 Another deployment that overlaps this one is running. Retry when it finishes.
  • 422 The tenant is deploying, being deleted, or paused over its plan limit.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Deploys are not available right now.

Returns 202 Accepted: the work runs in the background. The body is optional.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants/<id>/services/<serviceName>/deployments/<depId>/rollback \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"refresh_config":true}'
Request body
{
  "refresh_config": true
}
Response
{
  "data": {
    "build_logs": "string",
    "completed_at": "2026-01-15T10:30:00Z",
    "created_at": "2026-01-15T10:30:00Z",
    "deploy_type": "full",
    "duration_ms": 1,
    "error_message": "string",
    "error_stage": "string",
    "has_config_snapshot": true,
    "has_retained_secrets": true,
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "image_tag": "ghcr.io/acme/app:1.4.2",
    "is_current": true,
    "metadata": {
      "KEY": null
    },
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
    "source_ref": "string",
    "source_type": "string",
    "started_at": "2026-01-15T10:30:00Z",
    "status": "pending",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "trigger": "string",
    "version": 3,
    "config_source": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Deployments

Deploy a tenant, follow a deployment and roll back.

Deployments

Deploy every service

POST/api/v1/tenants/{id}/deploy

Builds or pulls every service of the tenant and rolls them out under one deployment. Its status ends `success`, `partial` or `failed`.

Parameters

idstring (path)required
The tenant id (`ten_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 409 Another deployment that overlaps this one is running. Retry when it finishes.
  • 422 The tenant is deploying, being deleted, or paused over its plan limit.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Deploys are not available right now.

Returns 202 Accepted: the work runs in the background.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants/<id>/deploy \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "build_logs": "string",
    "completed_at": "2026-01-15T10:30:00Z",
    "created_at": "2026-01-15T10:30:00Z",
    "deploy_type": "full",
    "duration_ms": 1,
    "error_message": "string",
    "error_stage": "string",
    "has_config_snapshot": true,
    "has_retained_secrets": true,
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "image_tag": "ghcr.io/acme/app:1.4.2",
    "is_current": true,
    "metadata": {
      "KEY": null
    },
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
    "source_ref": "string",
    "source_type": "string",
    "started_at": "2026-01-15T10:30:00Z",
    "status": "pending",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "trigger": "string",
    "version": 3
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Deployments

Restart a single-service tenant

POST/api/v1/tenants/{id}/restart

Re-applies the current configuration to what is running, with no build. For a tenant with several services, restart each service instead.

Parameters

idstring (path)required
The tenant id (`ten_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 409 Another deployment that overlaps this one is running. Retry when it finishes.
  • 422 The tenant is deploying, being deleted, or paused over its plan limit.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Deploys are not available right now.

Returns 202 Accepted: the work runs in the background.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants/<id>/restart \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "build_logs": "string",
    "completed_at": "2026-01-15T10:30:00Z",
    "created_at": "2026-01-15T10:30:00Z",
    "deploy_type": "full",
    "duration_ms": 1,
    "error_message": "string",
    "error_stage": "string",
    "has_config_snapshot": true,
    "has_retained_secrets": true,
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "image_tag": "ghcr.io/acme/app:1.4.2",
    "is_current": true,
    "metadata": {
      "KEY": null
    },
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
    "source_ref": "string",
    "source_type": "string",
    "started_at": "2026-01-15T10:30:00Z",
    "status": "pending",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "trigger": "string",
    "version": 3
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Deployments

List a tenant's deployments

GET/api/v1/tenants/{id}/deployments

Every deployment of the tenant across its services, newest first.

Parameters

idstring (path)required
The tenant id (`ten_...`).
limitinteger (query)default 20
Page size, up to 100.
offsetinteger (query)default 0
Items to skip.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

Paginated with `limit` and `offset`. Status moves through `pending` → `building` → `deploying` → `succeeded` or `failed`. Deployments scoped to a single service also carry a `service_id`. `has_config_snapshot` reports whether the deployment's configuration was captured, and `has_retained_secrets` whether its secret values are still held. A deployment that captured no secrets reports `has_retained_secrets: true`, because a rollback restores it in full. Together they tell you what a rollback to that deployment would restore before you request it.

Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/deployments \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "build_logs": "string",
      "completed_at": "2026-01-15T10:30:00Z",
      "created_at": "2026-01-15T10:30:00Z",
      "deploy_type": "full",
      "duration_ms": 1,
      "error_message": "string",
      "error_stage": "string",
      "has_config_snapshot": true,
      "has_retained_secrets": true,
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "image_tag": "ghcr.io/acme/app:1.4.2",
      "is_current": true,
      "metadata": {
        "KEY": null
      },
      "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
      "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
      "source_ref": "string",
      "source_type": "string",
      "started_at": "2026-01-15T10:30:00Z",
      "status": "pending",
      "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "trigger": "string",
      "version": 3
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  },
  "pagination": {
    "total": 42,
    "limit": 20,
    "offset": 0
  }
}

Deployments

Deploy a tenant

POST/api/v1/tenants/{id}/deployments

Starts a deployment of the tenant. On a tenant with several services this deploys all of them.

Parameters

idstring (path)required
The tenant id (`ten_...`).
deploy_typestring
`image` deploys without building. One of: full, image.
source_typestring
One of: github, image.
image_tagstring
The image to deploy, for a tenant that has no services of its own.
triggerstring
A label recorded on the deployment, for example `api`.

Errors

  • 400 An unknown `source_type` or `deploy_type`.
  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 409 Another deployment that overlaps this one is running. Retry when it finishes.
  • 422 The tenant is deploying, being deleted, or paused over its plan limit.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Deploys are not available right now.

Returns 202 Accepted: the work runs in the background. The body is optional.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants/<id>/deployments \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"deploy_type":"full","source_type":"github","image_tag":"ghcr.io/acme/app:1.4.2","trigger":"string"}'
Request body
{
  "deploy_type": "full",
  "source_type": "github",
  "image_tag": "ghcr.io/acme/app:1.4.2",
  "trigger": "string"
}
Response
{
  "data": {
    "build_logs": "string",
    "completed_at": "2026-01-15T10:30:00Z",
    "created_at": "2026-01-15T10:30:00Z",
    "deploy_type": "full",
    "duration_ms": 1,
    "error_message": "string",
    "error_stage": "string",
    "has_config_snapshot": true,
    "has_retained_secrets": true,
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "image_tag": "ghcr.io/acme/app:1.4.2",
    "is_current": true,
    "metadata": {
      "KEY": null
    },
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
    "source_ref": "string",
    "source_type": "string",
    "started_at": "2026-01-15T10:30:00Z",
    "status": "pending",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "trigger": "string",
    "version": 3
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Deployments

Get a deployment

GET/api/v1/tenants/{id}/deployments/{depId}

One deployment and how it ended.

Parameters

idstring (path)required
The tenant id (`ten_...`).
depIdstring (path)required
The deployment id (`dep_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

On a failure, `error_stage` names the pipeline stage that broke and `build_logs` holds the captured build output. Both are omitted on a clean deploy. `has_config_snapshot` reports whether the deployment's configuration was captured, and `has_retained_secrets` whether its secret values are still held. A deployment that captured no secrets reports `has_retained_secrets: true`, because a rollback restores it in full. Together they tell you what a rollback to that deployment would restore before you request it.

Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/deployments/<depId> \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "build_logs": "string",
    "completed_at": "2026-01-15T10:30:00Z",
    "created_at": "2026-01-15T10:30:00Z",
    "deploy_type": "full",
    "duration_ms": 1,
    "error_message": "string",
    "error_stage": "string",
    "has_config_snapshot": true,
    "has_retained_secrets": true,
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "image_tag": "ghcr.io/acme/app:1.4.2",
    "is_current": true,
    "metadata": {
      "KEY": null
    },
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
    "source_ref": "string",
    "source_type": "string",
    "started_at": "2026-01-15T10:30:00Z",
    "status": "pending",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "trigger": "string",
    "version": 3
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Deployments

Get build logs

GET/api/v1/tenants/{id}/deployments/{depId}/build-logs

The build output of a deployment, as plain text. Empty for a deployment that did not build (an image deploy, a restart or a rollback).

Parameters

idstring (path)required
The tenant id (`ten_...`).
depIdstring (path)required
The deployment id (`dep_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/deployments/<depId>/build-logs \
  -H "Authorization: Bearer sk_live_..."
Response
(plain text)

Deployments

Roll a tenant back

POST/api/v1/tenants/{id}/deployments/{depId}/rollback

Rolls a single-service tenant back to an earlier successful deployment. No build: the stored image is rolled out again.

Parameters

idstring (path)required
The tenant id (`ten_...`).
depIdstring (path)required
The deployment id (`dep_...`).
refresh_configboolean
`true` keeps the old image but uses today's configuration. Default `false`: the configuration that deployment ran with is restored.

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 409 Another deployment that overlaps this one is running. Retry when it finishes.
  • 422 The tenant is deploying, being deleted, or paused over its plan limit.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Deploys are not available right now.

Returns 202 Accepted: the work runs in the background. The body is optional.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants/<id>/deployments/<depId>/rollback \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"refresh_config":true}'
Request body
{
  "refresh_config": true
}
Response
{
  "data": {
    "build_logs": "string",
    "completed_at": "2026-01-15T10:30:00Z",
    "created_at": "2026-01-15T10:30:00Z",
    "deploy_type": "full",
    "duration_ms": 1,
    "error_message": "string",
    "error_stage": "string",
    "has_config_snapshot": true,
    "has_retained_secrets": true,
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "image_tag": "ghcr.io/acme/app:1.4.2",
    "is_current": true,
    "metadata": {
      "KEY": null
    },
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
    "source_ref": "string",
    "source_type": "string",
    "started_at": "2026-01-15T10:30:00Z",
    "status": "pending",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "trigger": "string",
    "version": 3,
    "config_source": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Environment variables

Set the variables your services run with, for a tenant or for one service.

Environment variables

List a service's variables

GET/api/v1/tenants/{id}/services/{serviceName}/env

The variables set on this service. Tenant-level variables also reach it; the service's own value wins.

Parameters

idstring (path)required
The tenant id (`ten_...`).
serviceNamestring (path)required
The service's name within the tenant.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/services/<serviceName>/env \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "build_secret": true,
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "is_secret": true,
      "key": "DATABASE_POOL",
      "source": "string",
      "value": "10"
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Environment variables

Replace a service's variables

PUT/api/v1/tenants/{id}/services/{serviceName}/env

Sets the service's own variables to exactly the body: a variable missing from it is deleted. Applies on the next deploy or restart.

Parameters

idstring (path)required
The tenant id (`ten_...`).
serviceNamestring (path)required
The service's name within the tenant.

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 422 The request was refused.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.
Request · curl
curl -X PUT https://api.staxa.dev/api/v1/tenants/<id>/services/<serviceName>/env \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
Request body
{}
Response
{
  "data": {
    "updated": 1,
    "service": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Environment variables

Delete a service variable

DELETE/api/v1/tenants/{id}/services/{serviceName}/env/{key}

Deletes one variable from the service.

Parameters

idstring (path)required
The tenant id (`ten_...`).
serviceNamestring (path)required
The service's name within the tenant.
keystring (path)required
The variable's name.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.
Request · curl
curl -X DELETE https://api.staxa.dev/api/v1/tenants/<id>/services/<serviceName>/env/<key> \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "deleted": "string",
    "service": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Environment variables

List tenant variables

GET/api/v1/tenants/{id}/env

The tenant-level variables, shared by every service. Secret values read `[redacted]`.

Parameters

idstring (path)required
The tenant id (`ten_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/env \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "build_secret": true,
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "is_secret": true,
      "key": "DATABASE_POOL",
      "source": "string",
      "value": "10"
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Environment variables

Set tenant variables

PUT/api/v1/tenants/{id}/env

Adds or updates tenant-level variables. Variables not named are kept. Applies on each service's next deploy or restart.

Parameters

idstring (path)required
The tenant id (`ten_...`).

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 422 The request was refused.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.
Request · curl
curl -X PUT https://api.staxa.dev/api/v1/tenants/<id>/env \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{}'
Request body
{}
Response
{
  "data": {
    "updated": 1
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Environment variables

Delete a tenant variable

DELETE/api/v1/tenants/{id}/env/{key}

Deletes one tenant-level variable.

Parameters

idstring (path)required
The tenant id (`ten_...`).
keystring (path)required
The variable's name.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.
Request · curl
curl -X DELETE https://api.staxa.dev/api/v1/tenants/<id>/env/<key> \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "deleted": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Domains

Attach your own domains to a tenant.

Domains

List custom domains

GET/api/v1/tenants/{id}/domains

The tenant's custom domains and their verification and certificate state.

Parameters

idstring (path)required
The tenant id (`ten_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

The `server_ip` field provides the IP address for A record configuration.

Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/domains \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "domains": [
      {
        "created_at": "2026-01-15T10:30:00Z",
        "domain": "app.example.com",
        "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
        "is_primary": true,
        "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
        "ssl_expires_at": "2026-01-15T10:30:00Z",
        "ssl_status": "string",
        "status": "string",
        "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
        "type": "string",
        "updated_at": "2026-01-15T10:30:00Z",
        "verification_record": "string",
        "verified_at": "2026-01-15T10:30:00Z"
      }
    ],
    "server_ip": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Domains

Add a custom domain

POST/api/v1/tenants/{id}/domains

Adds a domain you own. The response carries the DNS record to create; verify the domain once it is in place.

Parameters

idstring (path)required
The tenant id (`ten_...`).
domainstringrequired
A domain you own, for example `app.example.com`.
typestring
type
is_primaryboolean
is_primary
service_idstring
The service the domain serves. Default: the primary service.

Errors

  • 400 Not a valid domain, or a subdomain of the platform's own.
  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 409 The domain is already in use.
  • 422 The plan does not include custom domains.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Returns 201. `type` defaults to `custom`, which is what generates the `verification_record` you need for the TXT check. `service_id` is optional and must be a service ID (`svc_...`) belonging to this tenant. Leave it out to route the domain at the primary service. Domains must be valid hostnames of 253 characters or fewer.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants/<id>/domains \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"domain":"app.example.com","type":"string","is_primary":true,"service_id":"svc_c2d18b4e7a6fa3f94b1c9e02"}'
Request body
{
  "domain": "app.example.com",
  "type": "string",
  "is_primary": true,
  "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02"
}
Response
{
  "data": {
    "created_at": "2026-01-15T10:30:00Z",
    "domain": "app.example.com",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "is_primary": true,
    "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
    "ssl_expires_at": "2026-01-15T10:30:00Z",
    "ssl_status": "string",
    "status": "string",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "type": "string",
    "updated_at": "2026-01-15T10:30:00Z",
    "verification_record": "string",
    "verified_at": "2026-01-15T10:30:00Z",
    "server_ip": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Domains

Verify a custom domain

POST/api/v1/tenants/{id}/domains/{domId}/verify

Checks the domain's DNS record. Once verified, the domain is routed and its certificate issued. Until then the response repeats the record to create.

Parameters

idstring (path)required
The tenant id (`ten_...`).
domIdstring (path)required
The domain id (`dom_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

DNS records must be configured before verification will succeed. SSL certificate is provisioned automatically after verification.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants/<id>/domains/<domId>/verify \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "created_at": "2026-01-15T10:30:00Z",
    "domain": "app.example.com",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "is_primary": true,
    "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
    "ssl_expires_at": "2026-01-15T10:30:00Z",
    "ssl_status": "string",
    "status": "string",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "type": "string",
    "updated_at": "2026-01-15T10:30:00Z",
    "verification_record": "string",
    "verified_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Domains

Remove a custom domain

DELETE/api/v1/tenants/{id}/domains/{domId}

Removes the domain and its certificate.

Parameters

idstring (path)required
The tenant id (`ten_...`).
domIdstring (path)required
The domain id (`dom_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Returns 204 No Content.

Request · curl
curl -X DELETE https://api.staxa.dev/api/v1/tenants/<id>/domains/<domId> \
  -H "Authorization: Bearer sk_live_..."
Response
204 Done. No body.

Network rules

Control what can reach a tenant and what it can reach.

Network rules

List network rules

GET/api/v1/tenants/{id}/network-rules

The tenant's inbound and outbound rules.

Parameters

idstring (path)required
The tenant id (`ten_...`).
directionstring (query)
Only rules of this direction.
statusstring (query)
Only rules in this status.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

A plain array, not paginated. Filter with `direction` (`inbound` or `outbound`) and `status`, which defaults to `active`. `connection_string` is computed on create and read, not stored, so it is absent from this list.

Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/network-rules \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "allocated_port": 1,
      "connection_string": "string",
      "created_at": "2026-01-15T10:30:00Z",
      "description": "string",
      "destination_cidrs": [
        "string"
      ],
      "destination_port": 1,
      "direction": "inbound",
      "expires_at": "2026-01-15T10:30:00Z",
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "protocol": "tcp",
      "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
      "source_cidrs": [
        "string"
      ],
      "status": "string",
      "target_port": 1,
      "target_service": "string",
      "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Network rules

Create a network rule

POST/api/v1/tenants/{id}/network-rules

Opens a service or the database to named addresses (inbound), or lets a tenant in restricted egress mode reach named public addresses (outbound). Rules cannot be edited: delete and create.

Parameters

idstring (path)required
The tenant id (`ten_...`).
directionstringrequired
One of: inbound, outbound.
protocolstringrequired
One of: tcp, udp.
descriptionstring
description
target_servicestring
Inbound: the service, or the database, to open.
target_portinteger
target_port
source_cidrsarray
Inbound: the addresses allowed in.
destination_cidrsarray
Outbound: the public addresses the tenant may reach.
destination_portinteger
destination_port
ttl_hoursinteger
Remove the rule after this many hours.

Errors

  • 400 An address range that does not parse, is too wide, or is private.
  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 422 A plan limit was reached, the range names a platform address, or an outbound rule on a tenant not in restricted mode.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Returns 201. `direction` and `protocol` are required: `inbound` or `outbound`, `tcp` or `udp`. Inbound TCP rules get a port from the platform pool in `allocated_port`; when the pool is empty you get 409 `PORT_POOL_EXHAUSTED`. Outbound rules only work on a tenant with `egress_mode: "restricted"`, otherwise 422 `EGRESS_MODE_REQUIRED`. Each one is folded into a single network policy covering every active outbound rule. `ttl_hours` sets an expiry, after which the rule is cleaned up automatically; leave it out to use the platform default. CIDRs are validated on the way in: 400 with `INVALID_CIDR`, `CIDR_TOO_WIDE` (`/0` and `/1` are blocked), or `TOO_MANY_CIDRS`. Past your rule limit you get 422 `RULE_LIMIT_REACHED`.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/tenants/<id>/network-rules \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"direction":"inbound","protocol":"tcp","description":"string","target_service":"string","target_port":1}'
Request body
{
  "direction": "inbound",
  "protocol": "tcp",
  "description": "string",
  "target_service": "string",
  "target_port": 1
}
Response
{
  "data": {
    "allocated_port": 1,
    "connection_string": "string",
    "created_at": "2026-01-15T10:30:00Z",
    "description": "string",
    "destination_cidrs": [
      "string"
    ],
    "destination_port": 1,
    "direction": "inbound",
    "expires_at": "2026-01-15T10:30:00Z",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "protocol": "tcp",
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "source_cidrs": [
      "string"
    ],
    "status": "string",
    "target_port": 1,
    "target_service": "string",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Network rules

Get a network rule

GET/api/v1/tenants/{id}/network-rules/{ruleId}

One rule.

Parameters

idstring (path)required
The tenant id (`ten_...`).
ruleIdstring (path)required
The network rule id.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

A rule belonging to another tenant returns 404 rather than 403.

Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/network-rules/<ruleId> \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "allocated_port": 1,
    "connection_string": "string",
    "created_at": "2026-01-15T10:30:00Z",
    "description": "string",
    "destination_cidrs": [
      "string"
    ],
    "destination_port": 1,
    "direction": "inbound",
    "expires_at": "2026-01-15T10:30:00Z",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "protocol": "tcp",
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "source_cidrs": [
      "string"
    ],
    "status": "string",
    "target_port": 1,
    "target_service": "string",
    "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Network rules

Delete a network rule

DELETE/api/v1/tenants/{id}/network-rules/{ruleId}

Deletes a rule and closes what it opened.

Parameters

idstring (path)required
The tenant id (`ten_...`).
ruleIdstring (path)required
The network rule id.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Returns 204 No Content.

Request · curl
curl -X DELETE https://api.staxa.dev/api/v1/tenants/<id>/network-rules/<ruleId> \
  -H "Authorization: Bearer sk_live_..."
Response
204 Done. No body.

Logs and events

Read logs and follow deployment progress live.

Logs and events

Get a service's logs

GET/api/v1/tenants/{id}/services/{serviceName}/logs

The service's recent log lines as plain text, or a live stream with `follow`.

Parameters

idstring (path)required
The tenant id (`ten_...`).
serviceNamestring (path)required
The service's name within the tenant.
linesinteger (query)default 100
How many recent lines to return.
followboolean (query)default false
Keep the response open and stream new lines, for up to 10 minutes.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/services/<serviceName>/logs \
  -H "Authorization: Bearer sk_live_..."
Response
(plain text)

Logs and events

Stream deployment events

GET/api/v1/tenants/{id}/events

A Server-Sent Events stream of the tenant's deployment progress. Each event's data is a deployment event.

Parameters

idstring (path)required
The tenant id (`ten_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/events \
  -H "Authorization: Bearer sk_live_..."
Response
event: deployment
data: {"deploy_type":"string","deployment_id":"dep_7a6fa3f9c2d18b4e4b1c9e02","message":"...","progress":1,"service_id":"svc_c2d18b4e7a6fa3f94b1c9e02","stage":"string","status":"string","tenant_id":"ten_a3f9c2d18b4e7a6f4b1c9e02","timestamp":"2026-01-15T10:30:00Z","type":"string"}

Logs and events

Get a tenant's logs

GET/api/v1/tenants/{id}/logs

Recent log lines of a single-service tenant as plain text, or a live stream with `follow`. For a tenant with several services, read each service's logs.

Parameters

idstring (path)required
The tenant id (`ten_...`).
linesinteger (query)default 100
How many recent lines to return.
followboolean (query)default false
Keep the response open and stream new lines, for up to 10 minutes.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/tenants/<id>/logs \
  -H "Authorization: Bearer sk_live_..."
Response
(plain text)

Templates

Ready-made starting points, and the runtime versions you can build with.

Templates

List templates

GET/api/v1/templates

Ready-made starting points for a tenant.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

Public: no authentication needed, limited to 60 requests per minute per IP. Narrow the list with a `category` query parameter.

Request · curl
curl https://api.staxa.dev/api/v1/templates \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "category": "string",
      "created_at": "2026-01-15T10:30:00Z",
      "db_engine": "string",
      "db_version": "string",
      "default_env": {
        "KEY": null
      },
      "default_port": 1,
      "default_size": "string",
      "description": "string",
      "dockerfile": "string",
      "framework": "string",
      "icon_url": "string",
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "image": "string",
      "is_active": true,
      "is_featured": true,
      "name": "acme",
      "runtime": "string",
      "runtime_version": "string",
      "slug": "string",
      "sort_order": 1,
      "starter_repo": "string",
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Templates

Get a template

GET/api/v1/templates/{id}

One template.

Parameters

idstring (path)required
The template id or slug.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

Public, same as the list endpoint. The path segment is matched against the template ID first and then its slug, so `/templates/nextjs-postgres` works as well as `/templates/tmpl_nextjs_postgres`. Image-based templates carry an `image` instead of a `starter_repo`.

Request · curl
curl https://api.staxa.dev/api/v1/templates/<id> \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "category": "string",
    "created_at": "2026-01-15T10:30:00Z",
    "db_engine": "string",
    "db_version": "string",
    "default_env": {
      "KEY": null
    },
    "default_port": 1,
    "default_size": "string",
    "description": "string",
    "dockerfile": "string",
    "framework": "string",
    "icon_url": "string",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "image": "string",
    "is_active": true,
    "is_featured": true,
    "name": "acme",
    "runtime": "string",
    "runtime_version": "string",
    "slug": "string",
    "sort_order": 1,
    "starter_repo": "string",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Templates

List runtime versions

GET/api/v1/config/runtimes

The runtime versions a service can be built with, by runtime.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/config/runtimes \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "node": [
      "22",
      "20",
      "18"
    ]
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Registries

Credentials for private container registries.

Registries

List registry credentials

GET/api/v1/registries

The account's credentials for private container registries.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

Credentials themselves are never returned by any endpoint. They are encrypted at rest and only decrypted when Staxa talks to the registry. `status` is `active` or `error`; when it is `error`, `last_error` carries the reason from the last attempt.

Request · curl
curl https://api.staxa.dev/api/v1/registries \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "created_at": "2026-01-15T10:30:00Z",
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "last_error": "string",
      "last_verified": "2026-01-15T10:30:00Z",
      "name": "acme",
      "namespace": "string",
      "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
      "registry_type": "dockerhub",
      "registry_url": "string",
      "status": "string",
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Registries

Add a registry credential

POST/api/v1/registries

Stores a credential after checking it against the registry. Images on that registry are then pulled with it.

Parameters

namestringrequired
name
registry_typestringrequired
One of: dockerhub, ghcr, ecr, gcr.
registry_urlstring
Required for `ecr`.
namespacestring
namespace
credentialsobjectrequired
`dockerhub` and `ghcr`: `username` and `password`. `ecr`: the three AWS fields. `gcr`: `service_account_json`.

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 422 The registry refused the credential, or the plan's registry limit was reached.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Returns 201. `registry_type` must be `dockerhub`, `ghcr`, `ecr`, or `gcr`, and the shape of `credentials` follows from it. `registry_url` defaults per type (`https://index.docker.io/v1/`, `https://ghcr.io`, `https://gcr.io`) but is required for ECR, since the URL carries your account and region. Credentials are checked against the registry before they are stored, so a bad secret returns 422 `REGISTRY_VERIFICATION_FAILED` and nothing is saved. That is also why the credential comes back already `active`. Past your credential limit you get 422 `REGISTRY_LIMIT_REACHED`. `namespace` scopes repository listings to one organisation or project.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/registries \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"acme","registry_type":"dockerhub","credentials":{"username":"string","password":"string","aws_access_key_id":"aws_a3f9c2d18b4e","aws_secret_access_key":"string","aws_region":"string","service_account_json":"string"},"registry_url":"string","namespace":"string"}'
Request body
{
  "name": "acme",
  "registry_type": "dockerhub",
  "credentials": {
    "username": "string",
    "password": "string",
    "aws_access_key_id": "aws_a3f9c2d18b4e",
    "aws_secret_access_key": "string",
    "aws_region": "string",
    "service_account_json": "string"
  },
  "registry_url": "string",
  "namespace": "string"
}
Response
{
  "data": {
    "created_at": "2026-01-15T10:30:00Z",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "last_error": "string",
    "last_verified": "2026-01-15T10:30:00Z",
    "name": "acme",
    "namespace": "string",
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "registry_type": "dockerhub",
    "registry_url": "string",
    "status": "string",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Registries

Get a registry credential

GET/api/v1/registries/{credId}

One credential, without its secret.

Parameters

credIdstring (path)required
The registry credential id (`rcr_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

A credential belonging to another provider returns 404 rather than 403.

Request · curl
curl https://api.staxa.dev/api/v1/registries/<credId> \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "created_at": "2026-01-15T10:30:00Z",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "last_error": "string",
    "last_verified": "2026-01-15T10:30:00Z",
    "name": "acme",
    "namespace": "string",
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "registry_type": "dockerhub",
    "registry_url": "string",
    "status": "string",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Registries

Update a registry credential

PATCH/api/v1/registries/{credId}

Changes the name, the credentials, or both. New credentials are checked against the registry first.

Parameters

credIdstring (path)required
The registry credential id (`rcr_...`).
namestring
name
credentialsobject
`dockerhub` and `ghcr`: `username` and `password`. `ecr`: the three AWS fields. `gcr`: `service_account_json`.

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 422 The registry refused the new credentials. The stored ones are kept.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Updating credentials resets the `verified` status. Run verify again after updating.

Request · curl
curl -X PATCH https://api.staxa.dev/api/v1/registries/<credId> \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"acme","credentials":{"username":"string","password":"string","aws_access_key_id":"aws_a3f9c2d18b4e","aws_secret_access_key":"string","aws_region":"string","service_account_json":"string"}}'
Request body
{
  "name": "acme",
  "credentials": {
    "username": "string",
    "password": "string",
    "aws_access_key_id": "aws_a3f9c2d18b4e",
    "aws_secret_access_key": "string",
    "aws_region": "string",
    "service_account_json": "string"
  }
}
Response
{
  "data": {
    "created_at": "2026-01-15T10:30:00Z",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "last_error": "string",
    "last_verified": "2026-01-15T10:30:00Z",
    "name": "acme",
    "namespace": "string",
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "registry_type": "dockerhub",
    "registry_url": "string",
    "status": "string",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Registries

Delete a registry credential

DELETE/api/v1/registries/{credId}

Deletes a credential. Services already running keep running.

Parameters

credIdstring (path)required
The registry credential id (`rcr_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Returns 204 No Content.

Request · curl
curl -X DELETE https://api.staxa.dev/api/v1/registries/<credId> \
  -H "Authorization: Bearer sk_live_..."
Response
204 Done. No body.

Registries

Check a registry credential

POST/api/v1/registries/{credId}/verify

Checks the stored credential against the registry again and records the outcome.

Parameters

credIdstring (path)required
The registry credential id (`rcr_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 422 The registry refused the credential. Its status is now `error`.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Attempts a login to the registry with the saved credentials. Updates the `verified` field on the credential.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/registries/<credId>/verify \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "created_at": "2026-01-15T10:30:00Z",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "last_error": "string",
    "last_verified": "2026-01-15T10:30:00Z",
    "name": "acme",
    "namespace": "string",
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "registry_type": "dockerhub",
    "registry_url": "string",
    "status": "string",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Registries

List a registry's repositories

GET/api/v1/registries/{credId}/repos

The repositories the credential can see.

Parameters

credIdstring (path)required
The registry credential id (`rcr_...`).
qstring (query)
A search term.
limitinteger (query)
How many to return.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

Takes `q` to filter by name and `limit` (1–100, default 25). Results are scoped to the credential's `namespace` where the registry supports it.

Request · curl
curl https://api.staxa.dev/api/v1/registries/<credId>/repos \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "description": "string",
      "full_url": "string",
      "is_private": true,
      "name": "acme",
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Registries

List a repository's tags

GET/api/v1/registries/{credId}/repos/{repository}/tags

The tags of one repository.

Parameters

credIdstring (path)required
The registry credential id (`rcr_...`).
repositorystring (path)required
The repository's name in the registry. May contain slashes.
limitinteger (query)
How many to return.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

The repo path may contain slashes (e.g., `library/nginx`). The API handles this via wildcard path matching.

Request · curl
curl https://api.staxa.dev/api/v1/registries/<credId>/repos/<repository>/tags \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "digest": "string",
      "name": "acme",
      "pushed_at": "2026-01-15T10:30:00Z",
      "size_bytes": 1
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

GitHub

The Staxa GitHub App connection and the repositories it can read.

GitHub

Get the GitHub connection

GET/api/v1/github/installation

Whether the Staxa GitHub App is linked to the account, and where to install it if not.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/github/installation \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "connected": true,
    "installation": {
      "account_id": 1,
      "account_login": "string",
      "account_type": "string",
      "app_slug": "string",
      "created_at": "2026-01-15T10:30:00Z",
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "installation_id": 1,
      "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
      "repository_selection": "string",
      "status": "string",
      "suspended_at": "2026-01-15T10:30:00Z",
      "updated_at": "2026-01-15T10:30:00Z"
    },
    "install_url": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

GitHub

Link a GitHub installation

POST/api/v1/github/installation

Links an installation of the Staxa GitHub App to the account, using the two values GitHub appends to the redirect after an install.

Parameters

installation_idintegerrequired
installation_id
codestringrequired
The `code` GitHub appends to the redirect after an install.

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 403 The installation is not one this GitHub user can access.
  • 409 The installation is linked to another account.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 GitHub connection is not available right now.
Request · curl
curl -X POST https://api.staxa.dev/api/v1/github/installation \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"installation_id":1,"code":"string"}'
Request body
{
  "installation_id": 1,
  "code": "string"
}
Response
{
  "data": {
    "account_id": 1,
    "account_login": "string",
    "account_type": "string",
    "app_slug": "string",
    "created_at": "2026-01-15T10:30:00Z",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "installation_id": 1,
    "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
    "repository_selection": "string",
    "status": "string",
    "suspended_at": "2026-01-15T10:30:00Z",
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

GitHub

Unlink GitHub

DELETE/api/v1/github/installation

Unlinks the installation from the account. It does not uninstall the app on GitHub.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Returns 204 No Content.

Request · curl
curl -X DELETE https://api.staxa.dev/api/v1/github/installation \
  -H "Authorization: Bearer sk_live_..."
Response
204 Done. No body.

GitHub

List repositories

GET/api/v1/github/repos

The repositories the installation can access.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/github/repos \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "default_branch": "string",
      "full_name": "string",
      "html_url": "string",
      "id": 1,
      "private": true
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

GitHub

List branches

GET/api/v1/github/repos/{owner}/{repo}/branches

The repository's branches.

Parameters

ownerstring (path)required
The repository's owner on GitHub.
repostring (path)required
The repository's name on GitHub.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/github/repos/<owner>/<repo>/branches \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "name": "acme"
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

GitHub

Analyze a repository

GET/api/v1/github/repos/{owner}/{repo}/analyze

Reports the framework, runtime, port and Dockerfile Staxa detects. Nothing is created.

Parameters

ownerstring (path)required
The repository's owner on GitHub.
repostring (path)required
The repository's name on GitHub.
branchstring (query)default main
The branch to read.
pathstring (query)
A directory of a monorepo to analyze instead of the root.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/github/repos/<owner>/<repo>/analyze \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "build_command": "string",
    "confidence": "string",
    "detected_port": 1,
    "detected_runtime": "string",
    "detected_version": "string",
    "dockerfile_path": "string",
    "framework": "string",
    "from_line": "string",
    "has_dockerfile": true,
    "start_command": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

GitHub

Find apps in a monorepo

GET/api/v1/github/repos/{owner}/{repo}/monorepo

Lists the deployable apps found in a repository. Nothing is created: pass the ones you want as `services` when creating a tenant.

Parameters

ownerstring (path)required
The repository's owner on GitHub.
repostring (path)required
The repository's name on GitHub.
branchstring (query)default main
The branch to read.

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/github/repos/<owner>/<repo>/monorepo \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "candidates": [
      {
        "build_command": "string",
        "build_context_scope": "string",
        "confidence": "string",
        "detected_port": 1,
        "framework": "string",
        "has_dockerfile": true,
        "markers": [],
        "root_directory": "string",
        "runtime": "string",
        "start_command": "string",
        "suggested_name": "string"
      }
    ],
    "is_monorepo": true,
    "truncated": true,
    "workspace_type": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Notifications

What finished or needs your attention.

Notifications

List notifications

GET/api/v1/notifications

The account's notifications, newest first. `meta.unread_count` is the total unread, whatever the page.

Parameters

unreadboolean (query)default false
Only unread notifications.
limitinteger (query)default 20
Page size, up to 100.
offsetinteger (query)default 0
Items to skip.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/notifications \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "created_at": "2026-01-15T10:30:00Z",
      "deploy_type": "string",
      "deployment_id": "dep_7a6fa3f9c2d18b4e4b1c9e02",
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "message": "...",
      "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
      "read_at": "2026-01-15T10:30:00Z",
      "resets_at": "2026-01-15T10:30:00Z",
      "service_id": "svc_c2d18b4e7a6fa3f94b1c9e02",
      "stage": "string",
      "tenant_id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "tenant_name": "string",
      "title": "string",
      "type": "string"
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e",
    "unread_count": 1
  },
  "pagination": {
    "total": 42,
    "limit": 20,
    "offset": 0
  }
}

Notifications

Mark a notification read

POST/api/v1/notifications/{id}/read

Marks one notification read.

Parameters

idstring (path)required
The notification id (`ntf_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.
Request · curl
curl -X POST https://api.staxa.dev/api/v1/notifications/<id>/read \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "status": "string"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Notifications

Mark every notification read

POST/api/v1/notifications/read-all

Marks all of the account's notifications read.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.
Request · curl
curl -X POST https://api.staxa.dev/api/v1/notifications/read-all \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "marked_read": 1
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

API keys

Create and revoke API keys.

API keys

List API keys

GET/api/v1/api-keys

The account's API keys, without the keys themselves. Revoked keys are left out.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.

`prefix` is the first 16 characters of the key: enough to identify it in a list, not enough to use it. Revoked keys stay in the list with `status: "revoked"`.

Request · curl
curl https://api.staxa.dev/api/v1/api-keys \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": [
    {
      "created_at": "2026-01-15T10:30:00Z",
      "expires_at": "2026-01-15T10:30:00Z",
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "last_used": "2026-01-15T10:30:00Z",
      "mode": "string",
      "name": "acme",
      "prefix": "string",
      "provider_id": "prov_a3f9c2d18b4e7a6f4b1c9e02",
      "scopes": [
        "string"
      ],
      "status": "string"
    }
  ],
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

API keys

Create an API key

POST/api/v1/api-keys

Creates a key and returns it once. Store it: it cannot be read again.

Parameters

namestringrequired
name
scopesarray
`*` for full access, `read` for read-only.
modestring
mode
expires_atstring
expires_at

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

The `key` field containing the raw token (`sk_live_...` or `sk_test_...`) is only shown once at creation time. Store it immediately.

Request · curl
curl -X POST https://api.staxa.dev/api/v1/api-keys \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"acme","scopes":["*"],"mode":"string","expires_at":"2026-01-15T10:30:00Z"}'
Request body
{
  "name": "acme",
  "scopes": [
    "*"
  ],
  "mode": "string",
  "expires_at": "2026-01-15T10:30:00Z"
}
Response
{
  "data": {
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "name": "acme",
    "prefix": "string",
    "key": "DATABASE_POOL",
    "mode": "string",
    "scopes": [
      "string"
    ],
    "expires_at": "2026-01-15T10:30:00Z",
    "created_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

API keys

Revoke an API key

DELETE/api/v1/api-keys/{id}

Revokes a key at once. Requests made with it are refused from then on.

Parameters

idstring (path)required
The API key id (`key_...`).

Errors

  • 401 The credentials are missing or not valid.
  • 404 No such resource. A resource that belongs to another account also answers 404.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.

Returns 204 No Content.

Request · curl
curl -X DELETE https://api.staxa.dev/api/v1/api-keys/<id> \
  -H "Authorization: Bearer sk_live_..."
Response
204 Done. No body.

Account

Your account and its email preferences.

Account

Get the account

GET/api/v1/account

The account, its plan, how many tenants it has and how many its plan allows.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/account \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "awake_budget": {
      "enforced": true,
      "exhausted": true,
      "hours_limit": 1,
      "hours_used": 1,
      "resets_at": "2026-01-15T10:30:00Z"
    },
    "billing_customer_id": "bil_a3f9c2d18b4e",
    "billing_interval": "string",
    "billing_status": "string",
    "billing_subscription_id": "bil_a3f9c2d18b4e",
    "card_step_up": {
      "brand": "string",
      "last4": "string",
      "required": true,
      "verified": true,
      "verified_at": "2026-01-15T10:30:00Z"
    },
    "clerk_id": "cle_a3f9c2d18b4e",
    "created_at": "2026-01-15T10:30:00Z",
    "current_period_end": "2026-01-15T10:30:00Z",
    "current_period_start": "2026-01-15T10:30:00Z",
    "email": "you@example.com",
    "email_verified_at": "2026-01-15T10:30:00Z",
    "entitlement_overrides": null,
    "entitlement_overrides_until": "2026-01-15T10:30:00Z",
    "grace_until": "2026-01-15T10:30:00Z",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "ip_held_at": "2026-01-15T10:30:00Z",
    "ip_hold_cleared_at": "2026-01-15T10:30:00Z",
    "max_tenants": 1,
    "metadata": {
      "KEY": null
    },
    "name": "acme",
    "plan": "string",
    "status": "string",
    "tenant_count": 1,
    "tenant_limit": 1,
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Account

Update the account

PATCH/api/v1/account

Changes the account's name.

Parameters

namestring
name

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.
Request · curl
curl -X PATCH https://api.staxa.dev/api/v1/account \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"acme"}'
Request body
{
  "name": "acme"
}
Response
{
  "data": {
    "awake_budget": {
      "enforced": true,
      "exhausted": true,
      "hours_limit": 1,
      "hours_used": 1,
      "resets_at": "2026-01-15T10:30:00Z"
    },
    "billing_customer_id": "bil_a3f9c2d18b4e",
    "billing_interval": "string",
    "billing_status": "string",
    "billing_subscription_id": "bil_a3f9c2d18b4e",
    "card_step_up": {
      "brand": "string",
      "last4": "string",
      "required": true,
      "verified": true,
      "verified_at": "2026-01-15T10:30:00Z"
    },
    "clerk_id": "cle_a3f9c2d18b4e",
    "created_at": "2026-01-15T10:30:00Z",
    "current_period_end": "2026-01-15T10:30:00Z",
    "current_period_start": "2026-01-15T10:30:00Z",
    "email": "you@example.com",
    "email_verified_at": "2026-01-15T10:30:00Z",
    "entitlement_overrides": null,
    "entitlement_overrides_until": "2026-01-15T10:30:00Z",
    "grace_until": "2026-01-15T10:30:00Z",
    "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
    "ip_held_at": "2026-01-15T10:30:00Z",
    "ip_hold_cleared_at": "2026-01-15T10:30:00Z",
    "max_tenants": 1,
    "metadata": {
      "KEY": null
    },
    "name": "acme",
    "plan": "string",
    "status": "string",
    "tenant_count": 1,
    "tenant_limit": 1,
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Account

Get email preferences

GET/api/v1/account/email-preferences

Which notification emails the account receives. In-app notifications are not affected.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/account/email-preferences \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "account_notices": true,
    "deploy_failed": true,
    "deploy_succeeded": true
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Account

Update email preferences

PATCH/api/v1/account/email-preferences

Turns notification emails on or off.

Parameters

deploy_succeededboolean
deploy_succeeded
deploy_failedboolean
deploy_failed
account_noticesboolean
account_notices

Errors

  • 400 An unknown field, a value that is not true or false, or an empty body.
  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Not available right now. A write refused during maintenance carries `Retry-After`.
Request · curl
curl -X PATCH https://api.staxa.dev/api/v1/account/email-preferences \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"deploy_succeeded":true,"deploy_failed":true,"account_notices":true}'
Request body
{
  "deploy_succeeded": true,
  "deploy_failed": true,
  "account_notices": true
}
Response
{
  "data": {
    "account_notices": true,
    "deploy_failed": true,
    "deploy_succeeded": true
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Billing

Your plan, your usage and your subscription.

Billing

Get plan and usage

GET/api/v1/billing

The account's plan, what it allows, this period's usage and the billing state.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
Request · curl
curl https://api.staxa.dev/api/v1/billing \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "awake_budget": {
      "enforced": true,
      "exhausted": true,
      "hours_limit": 1,
      "hours_used": 1,
      "resets_at": "2026-01-15T10:30:00Z"
    },
    "billing": {
      "allow_overage": true,
      "awake_budget_enforce": true,
      "enabled": true,
      "enforce_limits": true,
      "grace_period_days": 1,
      "webhook_tolerance_secs": 1
    },
    "checkout_ready": true,
    "environment": "string",
    "plan": {
      "awake_hours_month": 1,
      "builds": 1,
      "custom_domains": true,
      "egress_bandwidth": "string",
      "idle_sleep_days": 1,
      "image_deploys": true,
      "max_replicas": 1,
      "network_rules_per_tenant": 1,
      "overage_cents": 1,
      "registries": 1,
      "replicas": 1,
      "services_per_tenant": 1,
      "size_surcharge_cents": {
        "KEY": 1
      },
      "sizes": [
        "string"
      ],
      "tenants": 1
    },
    "plans": {
      "KEY": {
        "awake_hours_month": 1,
        "builds": 1,
        "custom_domains": true,
        "egress_bandwidth": "string",
        "idle_sleep_days": 1,
        "image_deploys": true,
        "max_replicas": 1,
        "network_rules_per_tenant": 1,
        "overage_cents": 1,
        "registries": 1,
        "replicas": 1,
        "services_per_tenant": 1,
        "size_surcharge_cents": {},
        "sizes": [],
        "tenants": 1
      }
    },
    "provider": {
      "billing_customer_id": "bil_a3f9c2d18b4e",
      "billing_interval": "string",
      "billing_status": "string",
      "billing_subscription_id": "bil_a3f9c2d18b4e",
      "clerk_id": "cle_a3f9c2d18b4e",
      "created_at": "2026-01-15T10:30:00Z",
      "current_period_end": "2026-01-15T10:30:00Z",
      "current_period_start": "2026-01-15T10:30:00Z",
      "email": "you@example.com",
      "email_verified_at": "2026-01-15T10:30:00Z",
      "entitlement_overrides": null,
      "entitlement_overrides_until": "2026-01-15T10:30:00Z",
      "grace_until": "2026-01-15T10:30:00Z",
      "id": "ten_a3f9c2d18b4e7a6f4b1c9e02",
      "ip_held_at": "2026-01-15T10:30:00Z",
      "ip_hold_cleared_at": "2026-01-15T10:30:00Z",
      "max_tenants": 1,
      "metadata": {
        "KEY": null
      },
      "name": "acme",
      "plan": "string",
      "status": "string",
      "updated_at": "2026-01-15T10:30:00Z"
    },
    "size_surcharge": {
      "amount_cents": 1,
      "interval": "string",
      "large_unit_cents": "string",
      "medium_unit_cents": "string",
      "peak_large": 1,
      "peak_medium": 1,
      "period_end": "2026-01-15T10:30:00Z",
      "period_start": "2026-01-15T10:30:00Z"
    },
    "usage": {
      "builds_run": 1,
      "databases_large": 1,
      "databases_medium": 1,
      "databases_small": 1,
      "extra_pod_hours_large": 1,
      "extra_pod_hours_medium": 1,
      "extra_pod_hours_small": 1,
      "max_services_per_tenant": 1,
      "max_services_tenant_id": "max_a3f9c2d18b4e",
      "service_count": 1,
      "services_large": 1,
      "services_medium": 1,
      "services_small": 1,
      "storage_gb": 1,
      "tenant_count": 1
    }
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Billing

Start a checkout

POST/api/v1/billing/checkout

Returns the URL of a checkout page for a paid plan. The plan takes effect once the checkout completes.

Parameters

planstringrequired
One of: starter, growth, scale.
intervalstring
Default `month`. One of: month, year.

Errors

  • 400 The request is not valid.
  • 401 The credentials are missing or not valid.
  • 409 The account already has a subscription. Change it through the billing portal.
  • 422 An unknown plan or interval.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Billing is not available right now.
Request · curl
curl -X POST https://api.staxa.dev/api/v1/billing/checkout \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"plan":"starter","interval":"month"}'
Request body
{
  "plan": "starter",
  "interval": "month"
}
Response
{
  "data": {
    "url": "https://example.com/..."
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Billing

Open the billing portal

POST/api/v1/billing/portal

Returns the URL of the billing portal, where a subscription is changed, cancelled or its payment method updated.

Errors

  • 401 The credentials are missing or not valid.
  • 429 Too many requests. See the `X-RateLimit-*` headers and retry later.
  • 503 Billing is not available right now.
Request · curl
curl -X POST https://api.staxa.dev/api/v1/billing/portal \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "data": {
    "url": "https://example.com/..."
  },
  "meta": {
    "request_id": "req_a3f9c2d18b4e"
  }
}

Health

Whether the API is up.

Health

Liveness

GET/healthz

Answers 200 while the API process is up. No authentication.

Request · curl
curl https://api.staxa.dev/healthz
Response
200 The API is up.

Health

Readiness

GET/readyz

Answers 200 when the API can reach its database and queue. No authentication.

Errors

  • 503 Not ready.
Request · curl
curl https://api.staxa.dev/readyz
Response
200 Ready.

Guides

Step-by-step help for the same tasks in the dashboard, from the Help center.

Getting Started

  • Platform Overview
  • Your First Deployment
  • Account & Settings
  • Deploying from GitHub
  • Starting from a Template
  • Notifications

Deployments

  • Deployment Lifecycle
  • Multi-Service Tenants
  • Environment Variables
  • Troubleshooting Deployments
  • Databases
  • Resource Sizes & Health Checks

Security & Configuration

  • API Key Authentication
  • Secrets & Encryption
  • Custom Domains & SSL
  • Container Registries
  • Network Rules & Database Access

Plans & Billing

  • Plans & Limits
  • Managing Your Subscription
© 2026 Stackforge Labs Limited
DocsTemplatesGuidesSupportPrivacyTermsReport abuse