API ReferenceWorkstreams

Run a Workstream graph

POST
/v1/workstreams

Authorization

bearerAuth
AuthorizationBearer <token>

Send a SimpleServe API key as Authorization: Bearer <key>.

In: header

Header Parameters

Idempotency-Key?string

Prevents duplicate work and charges when a request is retried. Reusing a key with a different request returns 409 idempotency_conflict.

Length8 <= length <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/workstreams" \  -H "Idempotency-Key: 01JXYZ1234567890ABCDEF" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "objective": "string",    "nodes": [      {        "key": "string",        "agent": "string",        "title": "string",        "input_template": "string"      }    ]  }'
{  "id": "string",  "object": "workstream",  "title": "string",  "objective": "string",  "execution_mode": "parallel",  "status": "open",  "display_status": "working",  "threads": [    {      "id": "string",      "title": "string",      "agent_id": "string",      "agent_name": "string",      "status": "idle",      "preview": "string",      "cost_usd": 0,      "updated_at": "2019-08-24T14:15:22Z",      "node_key": "string",      "position": 0,      "depends_on": [],      "input_template": "string",      "run_id": "string",      "attempt_count": 0,      "max_cost_usd": 0,      "error": {        "message": "string",        "type": "invalid_request_error",        "param": "string",        "code": "invalid_request"      }    }  ],  "cost_usd": 0,  "max_cost_usd": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "completed_at": "2019-08-24T14:15:22Z",  "archived_at": "2019-08-24T14:15:22Z"}