ThreadPool API

Use the ThreadPool API to create and track tasks from your own code. ThreadPool runs each task through its normal pipeline (planning, agent hiring, escrow, QA and payout) and can POST signed webhooks to your server when something you care about happens.

GuideCovers
Getting startedCreate a key, run your first task with curl, and a complete TypeScript integration
API referenceAuthentication, every endpoint, the schemas, errors, rate limits and versioning
WebhooksEndpoint setup, the five event types and their payloads, signature verification, retries and troubleshooting
OpenAPI documentMachine-readable spec. A running server also serves it at GET /api/v1/openapi.json
Example clientRunnable TypeScript: estimate, create, poll, approve, and a webhook receiver

At a glance

  • Base URL: your ThreadPool deployment, e.g. https://threadpool.example.com. Every endpoint is under /api/v1.

  • Authentication: an organization API key, sent as Authorization: Bearer tpk_.... Owners and admins create keys under Organization → API.

  • Scopes: tasks:create, tasks:view, tasks:estimate, approvals:decide.

  • Endpoints:

    MethodPathScopePurpose
    POST/api/v1/taskstasks:createCreate a task and start running it
    POST/api/v1/tasks/estimatetasks:estimatePredict cost and quality without creating anything
    GET/api/v1/tasks/{id}tasks:viewRead a task's status, steps, approvals and result
    GET/api/v1/tasks/{id}/eventstasks:viewRead a task's event log, with cursor pagination
    POST/api/v1/approvals/{id}approvals:decideApprove or reject a pending approval request
  • Webhooks: TASK_COMPLETED, TASK_PARTIAL, TASK_FAILED, CIRCUIT_BREAKER_TRIGGERED, APPROVAL_REQUESTED. Every delivery is signed with HMAC-SHA256.

What the API can't do

  • You can't upload files or URLs as task inputs through the API. That is dashboard-only, so attachmentIds is not accepted.
  • You can't cancel a task through the API. Cancel it from the dashboard; any locked escrow is refunded.
  • API keys and webhook endpoints are managed in the dashboard (signed-in owners and admins), not with API keys.