Campaigns
Pause a campaign
Places no new calls until it is resumed; calls already placed carry on. A paused campaign answers as it is; a finished one is refused with 409. Needs a Full access key.
POST
/
api
/
v2
/
campaigns
/
{campaignId}
/
pause
Pause a campaign
curl --request POST \
--url https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cntillion.com/api/v2/campaigns/{campaignId}/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_URL => "https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause",
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: 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 := "https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause"
req, _ := http.NewRequest("POST", 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.post("https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"agentId": "<string>",
"agentName": "<string>",
"status": "active",
"variant": "simple",
"source": "dashboard",
"channel": {
"type": "phone",
"phoneLineId": "<string>",
"phoneNumber": "<string>",
"ringingTimeoutSeconds": 123,
"answeringMachineDetection": true,
"phoneLineIds": [
"<string>"
]
},
"policy": {
"timezone": "<string>",
"useRecipientTimezone": false,
"callingWindows": [
{
"weekdays": [
3
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"retries": {
"maxTotalCalls": 15,
"maxShortRetries": 14,
"maxCallbacks": 14,
"maxRedirects": 14,
"maxConsecutiveFailures": 15,
"retryDelaySeconds": 302400,
"intervalPlacement": "start",
"rotateStepSeconds": 43200
},
"dataCollection": {
"callbacks": true,
"redirects": true,
"doNotCall": true,
"mappings": [
{
"field": "<string>",
"variable": "<string>"
}
]
},
"followUpContext": {
"callType": true,
"previousConversationId": true,
"previousSummary": true,
"previousTranscript": true
}
},
"timezone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"branchId": "<string>",
"concurrencyLimit": 123,
"callsPerMinute": 123,
"keepOpen": true,
"lastError": "<string>",
"counts": {
"leads": 123,
"finishedLeads": 123,
"openAttention": 123
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"launchedAt": "2023-11-07T05:31:56Z",
"pausedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
workspaceApiKeyworkspaceApiKeyHeader
⌘I
Pause a campaign
curl --request POST \
--url https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.cntillion.com/api/v2/campaigns/{campaignId}/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_URL => "https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause",
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: 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 := "https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause"
req, _ := http.NewRequest("POST", 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.post("https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cntillion.com/api/v2/campaigns/{campaignId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"agentId": "<string>",
"agentName": "<string>",
"status": "active",
"variant": "simple",
"source": "dashboard",
"channel": {
"type": "phone",
"phoneLineId": "<string>",
"phoneNumber": "<string>",
"ringingTimeoutSeconds": 123,
"answeringMachineDetection": true,
"phoneLineIds": [
"<string>"
]
},
"policy": {
"timezone": "<string>",
"useRecipientTimezone": false,
"callingWindows": [
{
"weekdays": [
3
],
"intervals": [
{
"start": "<string>",
"end": "<string>"
}
]
}
],
"retries": {
"maxTotalCalls": 15,
"maxShortRetries": 14,
"maxCallbacks": 14,
"maxRedirects": 14,
"maxConsecutiveFailures": 15,
"retryDelaySeconds": 302400,
"intervalPlacement": "start",
"rotateStepSeconds": 43200
},
"dataCollection": {
"callbacks": true,
"redirects": true,
"doNotCall": true,
"mappings": [
{
"field": "<string>",
"variable": "<string>"
}
]
},
"followUpContext": {
"callType": true,
"previousConversationId": true,
"previousSummary": true,
"previousTranscript": true
}
},
"timezone": "<string>",
"startsAt": "2023-11-07T05:31:56Z",
"branchId": "<string>",
"concurrencyLimit": 123,
"callsPerMinute": 123,
"keepOpen": true,
"lastError": "<string>",
"counts": {
"leads": 123,
"finishedLeads": 123,
"openAttention": 123
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"launchedAt": "2023-11-07T05:31:56Z",
"pausedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}