Skip to main content

API Reference

The Benchwork REST API is available on Enterprise plans. Manage workflows, trigger executions, and query data programmatically.

Enterprise Only

API access requires an Enterprise plan. To upgrade, go to Settings → Billing or contact [email protected].

Authentication

All API requests require a Bearer token. Generate your API key from Settings → API Keys.

Authorization: Bearer bw_live_xxxxxxxxxxxx

Base URL

https://benchwork.app/api/v1

Endpoints

Workflows

List Workflows

GET /api/v1/workflows

Query params:
  storeId    string  Filter by store
  status     string  active | paused | draft
  limit      number  Max results (default 20, max 100)

Response: { workflows: Workflow[] }

Get Workflow

GET /api/v1/workflows/:workflowId

Response: Workflow

Trigger Workflow (Manual)

POST /api/v1/workflows/:workflowId/trigger

Body: {
  payload?: Record<string, unknown>  // Optional trigger data
}

Response: { executionId: string }

Executions

List Executions

GET /api/v1/executions

Query params:
  workflowId  string  Filter by workflow
  status      string  running | success | failed
  limit       number  Max results (default 20, max 100)

Response: { executions: Execution[] }

Get Execution

GET /api/v1/executions/:executionId

Response: Execution (with full node results)

Webhooks

You can configure Benchwork to call your endpoint when a workflow completes or fails:

POST /api/v1/webhooks

Body: {
  url:     string  Your endpoint URL
  events:  string[]  ["execution.completed", "execution.failed"]
  secret:  string  For HMAC verification
}

Response: { webhookId: string }

Rate Limits

API requests are limited to 60 requests/minute per API key. Rate limit headers are included in all responses:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1706745600

Error Codes

  • 400 — Bad Request: invalid parameters
  • 401 — Unauthorized: missing or invalid API key
  • 403 — Forbidden: plan limit exceeded
  • 404 — Not Found
  • 429 — Too Many Requests: rate limit exceeded
  • 500 — Internal Server Error