Force complete campaign
curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/campaign-force-completed \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"campaign_id": 123,
"campaign_status": "force_completed"
}
'import requests
url = "https://www.tryunleashx.com/api/v1/global/campaign-force-completed"
payload = {
"campaign_id": 123,
"campaign_status": "force_completed"
}
headers = {
"token": "<token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<token>', 'Content-Type': 'application/json'},
body: JSON.stringify({campaign_id: 123, campaign_status: 'force_completed'})
};
fetch('https://www.tryunleashx.com/api/v1/global/campaign-force-completed', 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://www.tryunleashx.com/api/v1/global/campaign-force-completed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'campaign_id' => 123,
'campaign_status' => 'force_completed'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.tryunleashx.com/api/v1/global/campaign-force-completed"
payload := strings.NewReader("{\n \"campaign_id\": 123,\n \"campaign_status\": \"force_completed\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.tryunleashx.com/api/v1/global/campaign-force-completed")
.header("token", "<token>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_id\": 123,\n \"campaign_status\": \"force_completed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.tryunleashx.com/api/v1/global/campaign-force-completed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"campaign_id\": 123,\n \"campaign_status\": \"force_completed\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}Campaigns
Force Complete Campaign
Force complete a running campaign immediately, halting all pending audience calls.
POST
/
campaign-force-completed
Force complete campaign
curl --request POST \
--url https://www.tryunleashx.com/api/v1/global/campaign-force-completed \
--header 'Content-Type: application/json' \
--header 'token: <token>' \
--data '
{
"campaign_id": 123,
"campaign_status": "force_completed"
}
'import requests
url = "https://www.tryunleashx.com/api/v1/global/campaign-force-completed"
payload = {
"campaign_id": 123,
"campaign_status": "force_completed"
}
headers = {
"token": "<token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<token>', 'Content-Type': 'application/json'},
body: JSON.stringify({campaign_id: 123, campaign_status: 'force_completed'})
};
fetch('https://www.tryunleashx.com/api/v1/global/campaign-force-completed', 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://www.tryunleashx.com/api/v1/global/campaign-force-completed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'campaign_id' => 123,
'campaign_status' => 'force_completed'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.tryunleashx.com/api/v1/global/campaign-force-completed"
payload := strings.NewReader("{\n \"campaign_id\": 123,\n \"campaign_status\": \"force_completed\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.tryunleashx.com/api/v1/global/campaign-force-completed")
.header("token", "<token>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_id\": 123,\n \"campaign_status\": \"force_completed\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.tryunleashx.com/api/v1/global/campaign-force-completed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"campaign_id\": 123,\n \"campaign_status\": \"force_completed\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}Use this endpoint to force complete a running campaign immediately, halting all pending audience calls.
Endpoint
POST/campaign-force-completed
Content-Type: application/json
Authentication: Required (workspace auth)
Request Body
{
"campaign_id": 42,
"campaign_status": "force_completed"
}
| Field | Type | Required | Description |
|---|---|---|---|
campaign_id | number | Yes | ID of the campaign to update |
campaign_status | string | Yes | Target status as a string (see values below) |
Campaign Status Values
| Value | Description |
|---|---|
draft | Campaign is in draft state |
inprogress | Campaign is actively running |
hold | Campaign is on hold |
pause | Campaign is paused |
force_completed | Immediately halts all pending calls and marks campaign as completed |
deleted | Marks the campaign as deleted |
Response
{
"message": "Campaign force completed successfully"
}
Behavior
- Maps the string
campaign_statusto its internal numeric code before processing. - When set to
force_completed: all audience records with statusfreshorinqueueare immediately set tohalted. - This action is irreversible — the campaign cannot be resumed after force completion.
Example cURL
curl -X POST https://www.tryunleashx.com/api/v1/global/campaign-force-completed \
-H "Content-Type: application/json" \
-H "Authorization: <api_key>" \
-d '{
"campaign_id": 42,
"campaign_status": "force_completed"
}'
Headers
API token for authentication
Body
application/json
Response
Campaign force completed successfully
Was this page helpful?
⌘I

