Get workflow steps
Returns the steps that make up a workflow as a flat array, starting from the trigger node. Steps are returned in batches of up to 500. Use the batch_no parameter to page through large workflows. Each step includes the number of subscribers currently waiting at that step (active_subscribers_count).
Endpoint
Section titled “Endpoint”HTTP method: GET
https://api.sender.net/v2/workflows/{id}/steps
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id | string required | Hashed workflow ID. |
batch_no | integer | Zero-based batch index for paging through large workflows. The response includes next_batch when additional batches are available. Defaults to 0. |
Request Examples
Section titled “Request Examples”const url = new URL("https://api.sender.net/v2/workflows/{id}/steps");
let headers = { "Authorization": "Bearer [your-token]", "Content-Type": "application/json", "Accept": "application/json",};
fetch(url, { method: "GET", headers,}).then(response => response.json()).then(data => console.log(data)).catch(error => console.error('Error:', error));$client = new \GuzzleHttp\Client();$response = $client->get( 'https://api.sender.net/v2/workflows/{id}/steps', [ 'headers' => [ 'Authorization' => 'Bearer [your-token]', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ]);
$body = $response->getBody()->getContents();$data = json_decode($body, true);print_r($data);import requestsimport json
url = "https://api.sender.net/v2/workflows/{id}/steps"
headers = { "Authorization": "Bearer [your-token]", "Content-Type": "application/json", "Accept": "application/json",}
response = requests.request('GET', url, headers=headers)
print(response.json())curl -X GET \-G "https://api.sender.net/v2/workflows/{id}/steps" \-H "Authorization: Bearer [your-token]" \-H "Content-Type: application/json" \-H "Accept: application/json"Response
Section titled “Response”{ "data": [ { "id": "def456ZW", "workflow_id": "abc123XY", "parent_id": null, "type": "TRIGGER", "trigger_type": "LIST_ADD", "delay_type": null, "condition_path": null, "complete": true, "active_subscribers_count": 0, "thumbnail_url": null, "trigger_definition": { "triggerType": "LIST_ADD", "listId": "list_abc" }, "children": [] }, { "id": "ghi789CD", "workflow_id": "abc123XY", "parent_id": "def456ZW", "type": "DELAY", "trigger_type": null, "delay_type": "DAYS", "condition_path": null, "complete": true, "active_subscribers_count": 12, "thumbnail_url": null, "children": [] }, { "id": "jkl012EF", "workflow_id": "abc123XY", "parent_id": "ghi789CD", "type": "EMAIL", "trigger_type": null, "delay_type": null, "condition_path": null, "complete": true, "active_subscribers_count": 5, "thumbnail_url": "https://cdn.example.com/thumbnails/step_jkl012.png", "children": [] } ]}