Pause a running execution
curl --request PATCH \
--url http://localhost:3000/api/program-executions/{id}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3000/api/program-executions/{id}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3000/api/program-executions/{id}/pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/program-executions/{id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://localhost:3000/api/program-executions/{id}/pause"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:3000/api/program-executions/{id}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/program-executions/{id}/pause")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"programId": "<string>",
"organizationId": "<string>",
"audienceId": "<string>",
"flowId": "<string>",
"status": "scheduled",
"totalContacts": 123,
"contactsCompleted": 123,
"contactsFailed": 123,
"contactsPending": 123,
"contactsInProgress": 123,
"scheduledStartAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"scheduledStopAt": "<string>",
"actualStartAt": "<string>",
"actualEndAt": "<string>",
"autoPauseRules": [
{
"nodeId": "node_abc123",
"threshold": 100,
"resetOnResume": true
}
]
}Program Executions
Pause a running execution
PATCH
/
api
/
program-executions
/
{id}
/
pause
Pause a running execution
curl --request PATCH \
--url http://localhost:3000/api/program-executions/{id}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3000/api/program-executions/{id}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:3000/api/program-executions/{id}/pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/program-executions/{id}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "http://localhost:3000/api/program-executions/{id}/pause"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("http://localhost:3000/api/program-executions/{id}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/program-executions/{id}/pause")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"programId": "<string>",
"organizationId": "<string>",
"audienceId": "<string>",
"flowId": "<string>",
"status": "scheduled",
"totalContacts": 123,
"contactsCompleted": 123,
"contactsFailed": 123,
"contactsPending": 123,
"contactsInProgress": 123,
"scheduledStartAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"scheduledStopAt": "<string>",
"actualStartAt": "<string>",
"actualEndAt": "<string>",
"autoPauseRules": [
{
"nodeId": "node_abc123",
"threshold": 100,
"resetOnResume": true
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Execution ID
Response
Execution ID
Program ID
Organization ID
Audience ID
Flow ID
Available options:
scheduled, running, paused, paused_no_credits, paused_threshold, completed, stopped, cancelled Total contacts in execution
Contacts completed successfully
Contacts failed
Contacts pending
Contacts currently in progress
Scheduled start time
Created at
Updated at
Scheduled stop time
Actual start time
Actual end time
Auto-pause rules
Show child attributes
Show child attributes