Campaigns
Stop a campaign
Cancels the campaign. Every still-queued contact is marked skipped and the campaign moves to cancelled. This is terminal — a cancelled campaign cannot be resumed.
POST
/
campaigns
/
{id}
/
stop
Stop a campaign
curl --request POST \
--url https://api.vocobase.com/api/v2/campaigns/{id}/stop \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vocobase.com/api/v2/campaigns/{id}/stop"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vocobase.com/api/v2/campaigns/{id}/stop', 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.vocobase.com/api/v2/campaigns/{id}/stop",
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://api.vocobase.com/api/v2/campaigns/{id}/stop"
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://api.vocobase.com/api/v2/campaigns/{id}/stop")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/campaigns/{id}/stop")
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{
"success": true,
"data": {
"campaign_id": "cmp_7f3a1b02-4d5e-4c11-9a88-2e6f0c4d1a90",
"name": "March renewals",
"description": "Outbound renewal reminders",
"agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"agent_name": "Renewals Agent",
"provider": null,
"type": "outbound",
"phone_numbers": [
{
"phone_number_id": "pn_1c2d3e4f-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
"phone_number": "+918065480085"
}
],
"concurrency_limit": 10,
"retry_concurrency": 3,
"retry_count": 2,
"cooldown_minutes": 60,
"retry_delays_minutes": [
30,
240
],
"callback_enabled": true,
"status": "cancelled",
"total_contacts": 1420,
"completed_count": 918,
"failed_count": 61,
"skipped_count": 4,
"started_at": "2026-08-20T09:00:00.000Z",
"paused_at": null,
"completed_at": null,
"created_at": "2026-08-19T16:41:00.000Z"
}
}{
"success": false,
"error": {
"code": "INVALID_STATE",
"message": "Can only stop RUNNING, PAUSED, or CREDIT_EXHAUSTED campaigns"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 60 seconds."
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}⌘I
Stop a campaign
curl --request POST \
--url https://api.vocobase.com/api/v2/campaigns/{id}/stop \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vocobase.com/api/v2/campaigns/{id}/stop"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vocobase.com/api/v2/campaigns/{id}/stop', 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.vocobase.com/api/v2/campaigns/{id}/stop",
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://api.vocobase.com/api/v2/campaigns/{id}/stop"
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://api.vocobase.com/api/v2/campaigns/{id}/stop")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/campaigns/{id}/stop")
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{
"success": true,
"data": {
"campaign_id": "cmp_7f3a1b02-4d5e-4c11-9a88-2e6f0c4d1a90",
"name": "March renewals",
"description": "Outbound renewal reminders",
"agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"agent_name": "Renewals Agent",
"provider": null,
"type": "outbound",
"phone_numbers": [
{
"phone_number_id": "pn_1c2d3e4f-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
"phone_number": "+918065480085"
}
],
"concurrency_limit": 10,
"retry_concurrency": 3,
"retry_count": 2,
"cooldown_minutes": 60,
"retry_delays_minutes": [
30,
240
],
"callback_enabled": true,
"status": "cancelled",
"total_contacts": 1420,
"completed_count": 918,
"failed_count": 61,
"skipped_count": 4,
"started_at": "2026-08-20T09:00:00.000Z",
"paused_at": null,
"completed_at": null,
"created_at": "2026-08-19T16:41:00.000Z"
}
}{
"success": false,
"error": {
"code": "INVALID_STATE",
"message": "Can only stop RUNNING, PAUSED, or CREDIT_EXHAUSTED campaigns"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 60 seconds."
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}