Workflows
API reference for workflows endpoints.
Auto-generated
make generate-docs to refresh after spec changes.POST /api/v1/workflows
/api/v1/workflowsCreate Workflow
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Name |
| description | string | Optional | description |
| graph | object | Optional | The complete workflow DAG. |
| settings | object | Optional | Settings |
| inputs_schema | object | Optional | inputs_schema |
| cron_expression | string | Optional | cron_expression |
| timezone | string | Optional | TimezoneDefault: UTC |
| is_reusable | boolean | Optional | When true, this workflow can be referenced as a sub_workflow node by other workflows belonging to the same user.Default: False |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name"
}'Response Example
{
"status": "ok"
}GET /api/v1/workflows
/api/v1/workflowsList Workflows
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| status | string | Optional | Filter by status |
| limit | integer | Optional | limitDefault: 50 |
| offset | integer | Optional | offsetDefault: 0 |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"workflows": [],
"total": 0
}POST /api/v1/workflows/from-recording
/api/v1/workflows/from-recordingCreate Workflow From Recording
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Name |
| description | string | Optional | description |
| start_url | string | Required | Start Url |
| session | string | Optional | session |
| steps | object[] | Required | Steps |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/from-recording \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "example_name",
"start_url": "example_start_url",
"steps": []
}'Response Example
{
"status": "ok"
}GET /api/v1/workflows/reusable
/api/v1/workflows/reusableList Reusable Workflows
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | Optional | limitDefault: 200 |
| offset | integer | Optional | offsetDefault: 0 |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/reusable \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"workflows": [],
"total": 0
}GET /api/v1/workflows/runs/{run_id}
/api/v1/workflows/runs/{run_id}Get Workflow Run
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| run_id | string | Required | run_id |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/runs/<run_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"id": "example",
"workflow_id": "example",
"status": "example",
"node_states": {},
"total_credits_used": "example",
"triggered_by": "example"
}DELETE /api/v1/workflows/runs/{run_id}
/api/v1/workflows/runs/{run_id}Cancel Workflow Run
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| run_id | string | Required | run_id |
Request Example
curl -X DELETE https://api.alterlab.io/api/v1/workflows/runs/<run_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"status": "ok"
}GET /api/v1/workflows/runs/{run_id}/export
/api/v1/workflows/runs/{run_id}/exportExport Workflow Run
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| run_id | string | Required | run_id |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/runs/<run_id>/export \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"status": "ok"
}POST /api/v1/workflows/runs/{run_id}/retry
/api/v1/workflows/runs/{run_id}/retryRetry Workflow Run
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| run_id | string | Required | run_id |
| from_node | string | Optional | from_node |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/runs/<run_id>/retry \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"run_id": "example",
"workflow_id": "example",
"status": "example",
"message": "example"
}GET /api/v1/workflows/runs/{run_id}/stream
/api/v1/workflows/runs/{run_id}/streamStream Workflow Run
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| run_id | string | Required | run_id |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/runs/<run_id>/stream \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"status": "ok"
}GET /api/v1/workflows/templates
/api/v1/workflows/templatesList Templates
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| category | string | Optional | Filter by category |
| search | string | Optional | Search by name or description |
| featured | boolean | Optional | Filter featured only |
| limit | integer | Optional | limitDefault: 50 |
| offset | integer | Optional | offsetDefault: 0 |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/templates \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"templates": [],
"total": 0,
"categories": []
}POST /api/v1/workflows/templates/publish
/api/v1/workflows/templates/publishPublish Template
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | ID of the user-owned workflow to publish |
| name | string | Required | Display name for the template |
| description | string | Optional | description |
| category | string | Required | Category (e.g. Sales, Marketing, Real Estate, Recruiting, E-commerce, Research) |
| tags | string[] | Optional | Searchable tags |
| price_cents | integer | Optional | Buyer price in USD cents (0 = free, max $99,999.99). Paid templates require a verified Stripe Connect account.Default: 0 |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/templates/publish \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workflow_id": "example_workflow_id",
"name": "example_name",
"category": "example_category"
}'Response Example
{
"status": "ok"
}GET /api/v1/workflows/templates/{template_id}
/api/v1/workflows/templates/{template_id}Get Template
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| template_id | string | Required | template_id |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/templates/<template_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"id": "example",
"author_id": "example",
"name": "example",
"slug": "example",
"description": "example",
"category": "example"
}POST /api/v1/workflows/templates/{template_id}/fork
/api/v1/workflows/templates/{template_id}/forkFork Template
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| template_id | string | Required | template_id |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/templates/<template_id>/fork \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"status": "ok"
}GET /api/v1/workflows/templates/{template_id}/reviews
/api/v1/workflows/templates/{template_id}/reviewsList Reviews
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| template_id | string | Required | template_id |
| limit | integer | Optional | limitDefault: 20 |
| offset | integer | Optional | offsetDefault: 0 |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/templates/<template_id>/reviews \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"reviews": [],
"total": 0,
"avg_rating": 0,
"review_count": 0
}POST /api/v1/workflows/templates/{template_id}/reviews
/api/v1/workflows/templates/{template_id}/reviewsCreate Review
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| template_id | string | Required | template_id |
| rating | integer | Required | Star rating (1–5) |
| body | string | Optional | body |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/templates/<template_id>/reviews \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"rating": 0
}'Response Example
{
"status": "ok"
}POST /api/v1/workflows/templates/{template_id}/use
/api/v1/workflows/templates/{template_id}/useUse Template
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| template_id | string | Required | template_id |
| name | string | Optional | name |
| config_overrides | object | Optional | Values for template config fields (key → value) |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/templates/<template_id>/use \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"workflow_id": "example",
"name": "example",
"message": "example"
}GET /api/v1/workflows/{workflow_id}
/api/v1/workflows/{workflow_id}Get Workflow
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/<workflow_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"id": "example",
"name": "example",
"description": "example",
"graph": {},
"settings": {},
"inputs_schema": "example"
}PATCH /api/v1/workflows/{workflow_id}
/api/v1/workflows/{workflow_id}Update Workflow
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
| name | string | Optional | name |
| description | string | Optional | description |
| graph | object | Optional | The complete workflow DAG. |
| settings | object | Optional | settings |
| inputs_schema | object | Optional | inputs_schema |
| status | "draft" | "active" | "paused" | "archived" | Optional | status |
| cron_expression | string | Optional | cron_expression |
| timezone | string | Optional | timezone |
| is_reusable | boolean | Optional | is_reusable |
Request Example
curl -X PATCH https://api.alterlab.io/api/v1/workflows/<workflow_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"id": "example",
"name": "example",
"description": "example",
"graph": {},
"settings": {},
"inputs_schema": "example"
}DELETE /api/v1/workflows/{workflow_id}
/api/v1/workflows/{workflow_id}Delete Workflow
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
Request Example
curl -X DELETE https://api.alterlab.io/api/v1/workflows/<workflow_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"status": "ok"
}GET /api/v1/workflows/{workflow_id}/analytics
/api/v1/workflows/{workflow_id}/analyticsGet Workflow Analytics
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
| days | integer | Optional | daysDefault: 30 |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/<workflow_id>/analytics \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"workflow_id": "example",
"run_count": 0,
"success_rate": 0,
"avg_duration_ms": "example",
"p50_duration_ms": "example",
"p95_duration_ms": "example"
}POST /api/v1/workflows/{workflow_id}/estimate
/api/v1/workflows/{workflow_id}/estimateEstimate Workflow Cost
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/<workflow_id>/estimate \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"estimated_microcents": 0,
"breakdown": {},
"message": "example",
"warnings": []
}POST /api/v1/workflows/{workflow_id}/run
/api/v1/workflows/{workflow_id}/runTrigger Workflow Run
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
| input_data | object | Optional | input_data |
| inputs | object | Optional | inputs |
| version | string | Optional | version |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/<workflow_id>/run \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"run_id": "example",
"workflow_id": "example",
"status": "example",
"message": "example"
}GET /api/v1/workflows/{workflow_id}/runs
/api/v1/workflows/{workflow_id}/runsList Workflow Runs
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
| limit | integer | Optional | limitDefault: 20 |
| offset | integer | Optional | offsetDefault: 0 |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/<workflow_id>/runs \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"runs": [],
"total": 0
}POST /api/v1/workflows/{workflow_id}/sequences
/api/v1/workflows/{workflow_id}/sequencesEnroll Contact List
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
| contact_list_id | string | Required | Contact list to enroll into this sequence |
| rate_limit_per_hour | integer | Optional | rate_limit_per_hour |
| auto_stop_on_reply | boolean | Optional | Skip contacts whose status is 'replied' at dispatch time.Default: True |
| idempotency_key | string | Optional | idempotency_key |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/<workflow_id>/sequences \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact_list_id": "example_contact_list_id",
"auto_stop_on_reply": false
}'Response Example
{
"status": "ok"
}GET /api/v1/workflows/{workflow_id}/sequences
/api/v1/workflows/{workflow_id}/sequencesList Sequence Enrollments
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
| page | integer | Optional | pageDefault: 1 |
| limit | integer | Optional | limitDefault: 20 |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/<workflow_id>/sequences \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"enrollments": [],
"total": 0,
"page": 0,
"limit": 0,
"total_pages": 0
}PATCH /api/v1/workflows/{workflow_id}/sequences/{enrollment_id}
/api/v1/workflows/{workflow_id}/sequences/{enrollment_id}Update Sequence Enrollment
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
| enrollment_id | string | Required | enrollment_id |
| status | "paused" | "active" | Required | 'paused' = pause entire enrollment; 'active' = resume a paused enrollment |
Request Example
curl -X PATCH https://api.alterlab.io/api/v1/workflows/<workflow_id>/sequences/<enrollment_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "..."
}'Response Example
{
"id": "example",
"workflow_id": "example",
"contact_list_id": "example",
"status": "example",
"rate_limit_per_hour": "example",
"total_contacts": 0
}GET /api/v1/workflows/{workflow_id}/sequences/{enrollment_id}/analytics
/api/v1/workflows/{workflow_id}/sequences/{enrollment_id}/analyticsGet Sequence Enrollment Analytics
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
| enrollment_id | string | Required | enrollment_id |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/<workflow_id>/sequences/<enrollment_id>/analytics \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"enrollment_id": "example",
"workflow_id": "example",
"funnel": "example",
"replies": "example",
"conversions": "example",
"variants": []
}GET /api/v1/workflows/{workflow_id}/sequences/{enrollment_id}/contacts
/api/v1/workflows/{workflow_id}/sequences/{enrollment_id}/contactsList Enrollment Contacts
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
| enrollment_id | string | Required | enrollment_id |
| page | integer | Optional | pageDefault: 1 |
| limit | integer | Optional | limitDefault: 50 |
| status | string | Optional | Filter by contact run status |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/<workflow_id>/sequences/<enrollment_id>/contacts \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"contacts": [],
"total": 0,
"page": 0,
"limit": 0,
"total_pages": 0
}PATCH /api/v1/workflows/{workflow_id}/sequences/{enrollment_id}/contacts/{contact_id}
/api/v1/workflows/{workflow_id}/sequences/{enrollment_id}/contacts/{contact_id}Update Enrollment Contact
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
| enrollment_id | string | Required | enrollment_id |
| contact_id | string | Required | contact_id |
| status | "paused" | "active" | Required | 'paused' = skip this contact; 'active' = re-enable a paused contact |
Request Example
curl -X PATCH https://api.alterlab.io/api/v1/workflows/<workflow_id>/sequences/<enrollment_id>/contacts/<contact_id> \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "..."
}'Response Example
{
"id": "example",
"contact_id": "example",
"contact_email": "example",
"contact_name": "example",
"run_id": "example",
"status": "example"
}POST /api/v1/workflows/{workflow_id}/token
/api/v1/workflows/{workflow_id}/tokenGenerate Trigger Token
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/<workflow_id>/token \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"trigger_url": "example",
"message": "example"
}DELETE /api/v1/workflows/{workflow_id}/token
/api/v1/workflows/{workflow_id}/tokenRevoke Trigger Token
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
Request Example
curl -X DELETE https://api.alterlab.io/api/v1/workflows/<workflow_id>/token \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"status": "ok"
}POST /api/v1/workflows/{workflow_id}/trigger
/api/v1/workflows/{workflow_id}/triggerWebhook Trigger Workflow
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/<workflow_id>/trigger \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"run_id": "example",
"workflow_id": "example",
"status": "example",
"message": "example"
}POST /api/v1/workflows/{workflow_id}/validate
/api/v1/workflows/{workflow_id}/validateValidate Workflow
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/<workflow_id>/validate \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"valid": true,
"errors": [],
"node_count": 0,
"edge_count": 0
}POST /api/v1/workflows/{workflow_id}/versions
/api/v1/workflows/{workflow_id}/versionsCreate Workflow Version
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
| version | string | Required | Version |
| notes | string | Optional | notes |
Request Example
curl -X POST https://api.alterlab.io/api/v1/workflows/<workflow_id>/versions \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"version": "example_version"
}'Response Example
{
"status": "ok"
}GET /api/v1/workflows/{workflow_id}/versions
/api/v1/workflows/{workflow_id}/versionsList Workflow Versions
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | Required | workflow_id |
Request Example
curl -X GET https://api.alterlab.io/api/v1/workflows/<workflow_id>/versions \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Response Example
{
"items": [],
"total": 0
}