curl --request POST \
--url https://api.pocketflows.com/executions/{id}/cancel \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.pocketflows.com/executions/{id}/cancel"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.pocketflows.com/executions/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pocketflows.com/executions/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pocketflows.com/executions/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pocketflows.com/executions/{id}/cancel")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pocketflows.com/executions/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"customer": "<string>",
"scheduled_at": "<string>",
"step_count": 123,
"current_step_id": "<string>",
"status": "pending",
"failed_at": "<string>",
"failed_reason": "<string>",
"finished_at": "<string>",
"finished_reason": "<string>",
"stopped_at": "<string>",
"started_at": "<string>",
"created_at": "<string>"
}Cancel a campaign or trigger execution
curl --request POST \
--url https://api.pocketflows.com/executions/{id}/cancel \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.pocketflows.com/executions/{id}/cancel"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.pocketflows.com/executions/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pocketflows.com/executions/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pocketflows.com/executions/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pocketflows.com/executions/{id}/cancel")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pocketflows.com/executions/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"customer": "<string>",
"scheduled_at": "<string>",
"step_count": 123,
"current_step_id": "<string>",
"status": "pending",
"failed_at": "<string>",
"failed_reason": "<string>",
"finished_at": "<string>",
"finished_reason": "<string>",
"stopped_at": "<string>",
"started_at": "<string>",
"created_at": "<string>"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The ID of the campaign or trigger execution
Response
The cancelled campaign or trigger execution, finished with reason User cancelled the execution
The ID of the execution
The customer executing through the campaign
The scheduled time for the next step to execute
The index of the next step to execute
The ID of the current step
The status of the execution
pending, in_progress, retrying, finished, failed, stopped The time when the execution failed in ISO 8601 format
The reason the execution failed
The time when the execution finished in ISO 8601 format
The reason the execution finished
The time when the execution was stopped in ISO 8601 format
The time when the execution started processing in ISO 8601 format
The time the execution was created โ i.e. when the customer was enrolled in the campaign โ in ISO 8601 format