Skip to main content
POST
/
workflows
/
{workflowId}
/
batch
Batch run
curl --request POST \
  --url https://script.so/api/v1/workflows/{workflowId}/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "items": [
    {
      "company": "Acme Corp",
      "email": "john@acme.com"
    },
    {
      "company": "Globex",
      "email": "jane@globex.com"
    },
    {
      "company": "Initech",
      "email": "bob@initech.com"
    }
  ],
  "concurrency": 3
}
'
{
  "batch_id": "batch_xyz789",
  "workflow_id": "wf_xyz789",
  "status": "pending",
  "total": 3,
  "completed": 3,
  "failed": 0,
  "executions": [
    {
      "execution_id": "<string>",
      "inputs": {},
      "status": "<string>",
      "duration_ms": 123
    }
  ],
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication. Get your key from Settings → API Keys.

Use sk_live_ prefix for production, sk_test_ for development.

Path Parameters

workflowId
string
required

Workflow ID

Example:

"wf_xyz789"

Body

application/json
items
object[]
required

Array of input objects

concurrency
integer
default:5

Max parallel executions

Response

Batch started

batch_id
string
Example:

"batch_xyz789"

workflow_id
string
Example:

"wf_xyz789"

status
enum<string>
Available options:
pending,
running,
completed,
failed
total
integer
Example:

3

completed
integer
Example:

3

failed
integer
Example:

0

executions
object[]
started_at
string<date-time>
completed_at
string<date-time>