v37

latestOpenAPI 3.1.0raw.githubusercontent.com2025-11-11200148.2 KB
Stacks

Create a new stack

Create a new stack environment using manifest + bundle format. Upload a JSON manifest with file metadata and a tar.zst bundle containing your project files. For multi-service stacks, automatically detects and orchestrates multiple services.

post/v1/stacks

Headers

idempotency-keystring required

Unique key for idempotent requests

Example:key-12345678
content-hashstring

SHA-256 hash of the bundle for deduplication

Example:sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

Response

Stack creation initiated

idstring required

Stack identifier

kind'single' | 'stack' required

Stack kinds

urlstring uri required

Live URL for the stack

phase'starting' | 'building' | 'deploying' | 'running' | 'failed' | 'stopped' required

Stack lifecycle phases

etagstring required

ETag for caching/optimistic updates

contentHashstring required

Content hash for deduplication

idempotencyKeystring

Idempotency key echo

Example response

{
  "id": "stk_abc123",
  "kind": "single",
  "url": "https://stk-abc123.benchify.com",
  "phase": "running",
  "etag": "sha256:abc123...",
  "contentHash": "sha256:def456...",
  "idempotencyKey": "key-12345678",
  "buildStatus": {
    "phase": "running",
    "logs": "npm install\nnpm run build\nBuild completed successfully",
    "error": "Build failed: missing dependencies",
    "duration": 45000
  },
  "services": [
    {
      "id": "sb_abc123",
      "name": "web",
      "role": "frontend",
      "phase": "running",
      "workspacePath": "apps/web",
      "port": 3000
    }
  ]
}
All 20 operations