Get workflow
Returns a workflow with its full definition. The nodes and edges are those of the builder version: the draft
when there is one, otherwise the published version. version_number and version_status tell you
which one you got; trigger_type and trigger_config describe that version.
Base URL:
GET: https://api.smsgatewayapi.com/v1/flows/{flow_id}Example:
GET: https://api.smsgatewayapi.com/v1/flows/flw_5d41402abc4b2a76b9719d911017c592
| 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 |
<?php
//PHP - cURL
$ch = curl_init();
$url = "https://api.smsgatewayapi.com/v1/flows/{flow_id}";
$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 success response:
{
"id": "flw_3520a1ec234dbabe1232def67e858855",
"uuid": "6f1c2b7e-1d2a-4c3b-9e8f-0a1b2c3d4e5f",
"name": "Office hours routing",
"status": "active",
"trigger_type": "inbound_message",
"trigger_config": {
"triggerType": "inbound_message",
"inboxId": 0
},
"published_version_number": 2,
"draft_version_number": 3,
"has_draft_changes": true,
"published_at": "2026-09-08T10:15:00+02:00",
"updated_at": "2026-09-08T11:02:41+02:00",
"nodes": [
{
"id": "trigger",
"type": "triggerNode",
"position": { "x": 0, "y": 0 },
"data": {
"title": "Inbound message",
"config": { "triggerType": "inbound_message", "inboxId": 0 }
}
},
{
"id": "office_hours",
"type": "conditionNode",
"position": { "x": 0, "y": 150 },
"data": {
"title": "Within office hours?",
"config": {
"conditionType": "office_hours",
"officeHours": {
"days": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"start": "09:00",
"end": "17:00",
"timezone": "Europe/Brussels"
}
}
}
},
{
"id": "assign",
"type": "actionNode",
"position": { "x": -250, "y": 300 },
"data": {
"title": "Assign to support",
"config": {
"actionType": "assign_conversation",
"assignMode": "round_robin",
"teamMember": null,
"teamMembers": ["sub_3520a1ec234dbabe1232def67e858855", "sub_9b74c9897bac770ffc029102a200c5de"],
"onlyIfUnassigned": true,
"status": "open"
}
}
},
{
"id": "auto_reply",
"type": "actionNode",
"position": { "x": 250, "y": 300 },
"data": {
"title": "Closed auto-reply",
"config": {
"actionType": "send_sms",
"messageType": "reply_message",
"sender": null,
"receiver": null,
"message": "Hi {{ contact.firstname }}, thanks for your message. We are closed right now and will get back to you on the next working day.",
"channel": null
}
}
}
],
"edges": [
{ "id": "e1", "source": "trigger", "sourceHandle": "out", "target": "office_hours", "targetHandle": "in" },
{ "id": "e2", "source": "office_hours", "sourceHandle": "true", "target": "assign", "targetHandle": "in" },
{ "id": "e3", "source": "office_hours", "sourceHandle": "false", "target": "auto_reply", "targetHandle": "in" }
],
"viewport": { "x": 0, "y": 0, "zoom": 1 },
"meta": null,
"version_number": 3,
"version_status": "draft"
}
Example error response:
{
"error": 163,
"errorMsg": "Flow [flw_3520a1ec234dbabe1232def67e858855] not found"
}