Delete workflow
Deletes a workflow together with all its versions and executions. A published workflow stops running immediately.
Base URL:
DELETE: https://api.smsgatewayapi.com/v1/flows/{flow_id}Example:
DELETE: 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, 'DELETE');
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:
{
"success": true
}
Example error response:
{
"error": 163,
"errorMsg": "Flow [flw_3520a1ec234dbabe1232def67e858855] not found"
}