Update Campaign Status
curl --request PATCH \
--url https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "ACTIVE"
}
'import requests
url = "https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status"
payload = { "status": "ACTIVE" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'ACTIVE'})
};
fetch('https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status', 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.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'ACTIVE'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status"
payload := strings.NewReader("{\n \"status\": \"ACTIVE\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <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.patch("https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"ACTIVE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"ACTIVE\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Campaign status updated successfully"
}{
"message": "Invalid status. Must be one of: DRAFT, SCHEDULED, ACTIVE, PAUSED, ENDED",
"valid_statuses": [
"DRAFT",
"SCHEDULED",
"ACTIVE",
"PAUSED",
"ENDED"
]
}{
"message": "<string>"
}{
"message": "Campaign not found"
}{
"success": false,
"message": "Unable to update the campaign status",
"error": "<string>"
}Campaigns
Update Campaign Status
Updates the status of a campaign to one of the allowed values.
Authentication
All requests require an Authorization header using Bearer token authentication:
Authorization: Bearer <api_key>
PATCH
/
api
/
v2
/
voice-campaigns
/
{campaign_id}
/
status
Update Campaign Status
curl --request PATCH \
--url https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "ACTIVE"
}
'import requests
url = "https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status"
payload = { "status": "ACTIVE" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'ACTIVE'})
};
fetch('https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status', 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.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'ACTIVE'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status"
payload := strings.NewReader("{\n \"status\": \"ACTIVE\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <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.patch("https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"ACTIVE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.voiceaiwrapper.app/api/v2/voice-campaigns/{campaign_id}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"ACTIVE\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Campaign status updated successfully"
}{
"message": "Invalid status. Must be one of: DRAFT, SCHEDULED, ACTIVE, PAUSED, ENDED",
"valid_statuses": [
"DRAFT",
"SCHEDULED",
"ACTIVE",
"PAUSED",
"ENDED"
]
}{
"message": "<string>"
}{
"message": "Campaign not found"
}{
"success": false,
"message": "Unable to update the campaign status",
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Global ID of the campaign. Required.
Example:
"Vm9pY2VDYW1wYWlnbjoxMjM="
Body
application/json
New campaign status
New campaign status. Required.
Available options:
DRAFT, SCHEDULED, ACTIVE, PAUSED, ENDED Example:
"ACTIVE"
Was this page helpful?
⌘I

