List executions
Lists the executions of a workflow, newest first, optionally filtered by status and source. The list contains a summary per execution; the payload and the result are returned by Get execution. Send the parameters as query string.
Base URL:
GET: https://api.smsgatewayapi.com/v1/flows/{flow_id}/executionsExample:
GET: https://api.smsgatewayapi.com/v1/flows/flw_5d41402abc4b2a76b9719d911017c592/executions
| Parameter | Input | Description | |
|---|---|---|---|
| client_id | API client ID | Developer › API & Webhooks › API credentials | Required |
| client_secret | API client secret | A cs_ credential, shown once when you create it under Developer › API & Webhooks › API credentials | Required |
| flow_id | workflow ID | The public ID (flw_...) of the workflow as returned by List workflows; the numeric ID is accepted too | Required |
| status | running, waiting, completed, stopped or failed | Only list executions with this status | Optional |
| source | test, manual or a source ID | Only list dry runs (test), manual runs (manual) or the runs started by that message, delivery report or contact | Optional |
| limit | Maximum results per page | Default 50, can't be bigger than 100 | Optional |
| page | Page of results | Default 1 | Optional |
<?php
//PHP - cURL
$ch = curl_init();
$url = "https://api.smsgatewayapi.com/v1/flows/{flow_id}/executions";
$client_id = "XXX"; // Your API client ID (required)
$client_secret = "YYY"; // Your API client secret (required)
curl_setopt($ch, CURLOPT_URL, "$url");
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-Client-Id: $client_id",
"X-Client-Secret: $client_secret",
"Content-Type: application/json",
]);
$response = curl_exec($ch);
?>
Example request:
GET: https://api.smsgatewayapi.com/v1/flows/flw_5d41402abc4b2a76b9719d911017c592/executions?status=completed&limit=50
Example success response:
{
"total": 2,
"shown": 2,
"page": 1,
"limit": 50,
"executions": [
{
"id": "7c1e5b2a-3d4f-4a6b-9c8d-0e1f2a3b4c5d",
"source": "manual",
"status": "completed",
"trigger_type": "inbound_message",
"stopped_reason": "completed",
"version_number": 1,
"created_at": "2026-09-08T11:05:12+02:00"
},
{
"id": "0f2d9c4e-7b1a-4e6d-8c3f-5a6b7c8d9e0f",
"source": "test",
"status": "completed",
"trigger_type": "inbound_message",
"stopped_reason": "completed",
"version_number": 1,
"created_at": "2026-09-08T10:18:40+02:00"
}
]
}
Example error response:
{
"error": 139,
"errorMsg": "Invalid status; use one of: running, waiting, completed, stopped, failed"
}