Update Campaign
curl --request PATCH \
--url https://api.ravan.ai/api/v1/campaigns/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"id": "<string>",
"name": "<string>",
"agentId": "<string>",
"phoneNumberId": "<string>",
"fromPhoneNumber": "<string>",
"status": "<string>",
"executionStatus": "<string>",
"schedule": {
"start": "<string>",
"end": "<string>",
"windowStart": "<string>",
"windowEnd": "<string>",
"windowDays": [
123
],
"timezone": "<string>",
"maxConcurrent": 123,
"retryAttempts": 123,
"retryGapMin": 123
}
}
'import requests
url = "https://api.ravan.ai/api/v1/campaigns/{id}"
payload = {
"id": "<string>",
"name": "<string>",
"agentId": "<string>",
"phoneNumberId": "<string>",
"fromPhoneNumber": "<string>",
"status": "<string>",
"executionStatus": "<string>",
"schedule": {
"start": "<string>",
"end": "<string>",
"windowStart": "<string>",
"windowEnd": "<string>",
"windowDays": [123],
"timezone": "<string>",
"maxConcurrent": 123,
"retryAttempts": 123,
"retryGapMin": 123
}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
agentId: '<string>',
phoneNumberId: '<string>',
fromPhoneNumber: '<string>',
status: '<string>',
executionStatus: '<string>',
schedule: {
start: '<string>',
end: '<string>',
windowStart: '<string>',
windowEnd: '<string>',
windowDays: [123],
timezone: '<string>',
maxConcurrent: 123,
retryAttempts: 123,
retryGapMin: 123
}
})
};
fetch('https://api.ravan.ai/api/v1/campaigns/{id}', 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.ravan.ai/api/v1/campaigns/{id}",
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([
'id' => '<string>',
'name' => '<string>',
'agentId' => '<string>',
'phoneNumberId' => '<string>',
'fromPhoneNumber' => '<string>',
'status' => '<string>',
'executionStatus' => '<string>',
'schedule' => [
'start' => '<string>',
'end' => '<string>',
'windowStart' => '<string>',
'windowEnd' => '<string>',
'windowDays' => [
123
],
'timezone' => '<string>',
'maxConcurrent' => 123,
'retryAttempts' => 123,
'retryGapMin' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.ravan.ai/api/v1/campaigns/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"agentId\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"fromPhoneNumber\": \"<string>\",\n \"status\": \"<string>\",\n \"executionStatus\": \"<string>\",\n \"schedule\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"windowStart\": \"<string>\",\n \"windowEnd\": \"<string>\",\n \"windowDays\": [\n 123\n ],\n \"timezone\": \"<string>\",\n \"maxConcurrent\": 123,\n \"retryAttempts\": 123,\n \"retryGapMin\": 123\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.ravan.ai/api/v1/campaigns/{id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"agentId\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"fromPhoneNumber\": \"<string>\",\n \"status\": \"<string>\",\n \"executionStatus\": \"<string>\",\n \"schedule\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"windowStart\": \"<string>\",\n \"windowEnd\": \"<string>\",\n \"windowDays\": [\n 123\n ],\n \"timezone\": \"<string>\",\n \"maxConcurrent\": 123,\n \"retryAttempts\": 123,\n \"retryGapMin\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravan.ai/api/v1/campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"agentId\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"fromPhoneNumber\": \"<string>\",\n \"status\": \"<string>\",\n \"executionStatus\": \"<string>\",\n \"schedule\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"windowStart\": \"<string>\",\n \"windowEnd\": \"<string>\",\n \"windowDays\": [\n 123\n ],\n \"timezone\": \"<string>\",\n \"maxConcurrent\": 123,\n \"retryAttempts\": 123,\n \"retryGapMin\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"organizationId": "<string>",
"name": "<string>",
"agentId": "<string>",
"phoneNumberId": "<string>",
"fromPhoneNumber": "<string>",
"status": "<string>",
"executionStatus": "<string>",
"schedule": {
"start": "<string>",
"end": "<string>",
"windowStart": "<string>",
"windowEnd": "<string>",
"windowDays": [
123
],
"timezone": "<string>",
"maxConcurrent": 123,
"retryAttempts": 123,
"retryGapMin": 123
},
"contactStats": {
"total": 123,
"contacted": 123,
"successful": 123,
"failed": 123,
"noAnswer": 123,
"pending": 123,
"inProgress": 123
},
"startedAt": "<string>",
"completedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"outboundMaxConcurrent": 123,
"outboundMaxCps": 123
}
}Campaign API
Update Campaign
Update Campaign.
PATCH
/
api
/
v1
/
campaigns
/
{id}
Update Campaign
curl --request PATCH \
--url https://api.ravan.ai/api/v1/campaigns/{id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"id": "<string>",
"name": "<string>",
"agentId": "<string>",
"phoneNumberId": "<string>",
"fromPhoneNumber": "<string>",
"status": "<string>",
"executionStatus": "<string>",
"schedule": {
"start": "<string>",
"end": "<string>",
"windowStart": "<string>",
"windowEnd": "<string>",
"windowDays": [
123
],
"timezone": "<string>",
"maxConcurrent": 123,
"retryAttempts": 123,
"retryGapMin": 123
}
}
'import requests
url = "https://api.ravan.ai/api/v1/campaigns/{id}"
payload = {
"id": "<string>",
"name": "<string>",
"agentId": "<string>",
"phoneNumberId": "<string>",
"fromPhoneNumber": "<string>",
"status": "<string>",
"executionStatus": "<string>",
"schedule": {
"start": "<string>",
"end": "<string>",
"windowStart": "<string>",
"windowEnd": "<string>",
"windowDays": [123],
"timezone": "<string>",
"maxConcurrent": 123,
"retryAttempts": 123,
"retryGapMin": 123
}
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
agentId: '<string>',
phoneNumberId: '<string>',
fromPhoneNumber: '<string>',
status: '<string>',
executionStatus: '<string>',
schedule: {
start: '<string>',
end: '<string>',
windowStart: '<string>',
windowEnd: '<string>',
windowDays: [123],
timezone: '<string>',
maxConcurrent: 123,
retryAttempts: 123,
retryGapMin: 123
}
})
};
fetch('https://api.ravan.ai/api/v1/campaigns/{id}', 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.ravan.ai/api/v1/campaigns/{id}",
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([
'id' => '<string>',
'name' => '<string>',
'agentId' => '<string>',
'phoneNumberId' => '<string>',
'fromPhoneNumber' => '<string>',
'status' => '<string>',
'executionStatus' => '<string>',
'schedule' => [
'start' => '<string>',
'end' => '<string>',
'windowStart' => '<string>',
'windowEnd' => '<string>',
'windowDays' => [
123
],
'timezone' => '<string>',
'maxConcurrent' => 123,
'retryAttempts' => 123,
'retryGapMin' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.ravan.ai/api/v1/campaigns/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"agentId\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"fromPhoneNumber\": \"<string>\",\n \"status\": \"<string>\",\n \"executionStatus\": \"<string>\",\n \"schedule\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"windowStart\": \"<string>\",\n \"windowEnd\": \"<string>\",\n \"windowDays\": [\n 123\n ],\n \"timezone\": \"<string>\",\n \"maxConcurrent\": 123,\n \"retryAttempts\": 123,\n \"retryGapMin\": 123\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.ravan.ai/api/v1/campaigns/{id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"agentId\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"fromPhoneNumber\": \"<string>\",\n \"status\": \"<string>\",\n \"executionStatus\": \"<string>\",\n \"schedule\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"windowStart\": \"<string>\",\n \"windowEnd\": \"<string>\",\n \"windowDays\": [\n 123\n ],\n \"timezone\": \"<string>\",\n \"maxConcurrent\": 123,\n \"retryAttempts\": 123,\n \"retryGapMin\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravan.ai/api/v1/campaigns/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"agentId\": \"<string>\",\n \"phoneNumberId\": \"<string>\",\n \"fromPhoneNumber\": \"<string>\",\n \"status\": \"<string>\",\n \"executionStatus\": \"<string>\",\n \"schedule\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"windowStart\": \"<string>\",\n \"windowEnd\": \"<string>\",\n \"windowDays\": [\n 123\n ],\n \"timezone\": \"<string>\",\n \"maxConcurrent\": 123,\n \"retryAttempts\": 123,\n \"retryGapMin\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"id": "<string>",
"organizationId": "<string>",
"name": "<string>",
"agentId": "<string>",
"phoneNumberId": "<string>",
"fromPhoneNumber": "<string>",
"status": "<string>",
"executionStatus": "<string>",
"schedule": {
"start": "<string>",
"end": "<string>",
"windowStart": "<string>",
"windowEnd": "<string>",
"windowDays": [
123
],
"timezone": "<string>",
"maxConcurrent": 123,
"retryAttempts": 123,
"retryGapMin": 123
},
"contactStats": {
"total": 123,
"contacted": 123,
"successful": 123,
"failed": 123,
"noAnswer": 123,
"pending": 123,
"inProgress": 123
},
"startedAt": "<string>",
"completedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"outboundMaxConcurrent": 123,
"outboundMaxCps": 123
}
}Actual endpoint:
PATCH https://api.ravan.ai/api/v1/campaigns/{id}/Authorizations
string
required
Your Agni API key used to authenticate the request. Pass it in the
X-Api-Key header. Find or rotate it from your Ravan AI account settings.Path Parameters
string
required
The unique ID of the campaign to update. Use the
id returned by the List or Create Campaign endpoint.Body
string
The campaign ID (can be included in the body).
string
The internal name of the campaign.
string
The unique ID of the agent assigned to this campaign.
string
The phone number record ID to use for this campaign.
string
The caller ID used for outbound calls, in E.164 format.
string
Campaign status:
draft, active, paused, completed.string
Execution state:
draft, running, paused, completed.object
Campaign schedule settings.
Show schedule
Show schedule
string
Campaign start datetime.
string
Campaign end datetime.
string
Daily calling window start time in
HH:mm 24-hour format.string
Daily calling window end time in
HH:mm 24-hour format.integer[]
Active days of the week (1=Monday … 7=Sunday).
string
IANA timezone for the schedule.
integer
Maximum number of concurrent calls.
integer
Maximum retry attempts per contact.
integer
Wait time in minutes between retries.
Response
boolean
Whether the request succeeded.
string
Human-readable status message. Example:
Campaign updated successfullyobject
Updated campaign object.
Show data
Show data
string
Campaign UUID. Example:
019ebc12-3fb2-7169-bd9c-d98c1d1a82a4string
Organization UUID. Example:
95a4e479-03a7-4f1b-834d-8705756e8e59string
Campaign name. Example:
test agent harsh fixed namestring
Assigned agent UUID. Example:
019e92f8-f032-7fb7-b294-508f4167618estring
Phone number UUID. Example:
019e92f4-097d-7a52-b5e5-fa7e0dd0761fstring
Caller ID in E.164 format. Example:
+918035088113string
Campaign status:
draft, active, paused, completed.string
Execution state:
draft, running, paused, completed.object
Campaign scheduling configuration.
Show schedule
Show schedule
string
Campaign start datetime.
string
Campaign end datetime.
string
Daily calling window start time. Example:
11:00string
Daily calling window end time. Example:
19:00integer[]
Active days of the week (1=Monday … 7=Sunday). Example:
[1, 2, 3]string
Timezone for the schedule. Example:
Asia/Kolkatainteger
Maximum concurrent calls. Example:
1integer
Number of retry attempts. Example:
2integer
Gap in minutes between retries. Example:
30object
string
Timestamp when the campaign started (ISO 8601).
string
Timestamp when the campaign completed (ISO 8601).
string
Creation timestamp. Example:
2026-06-12T13:42:53Zstring
Last updated timestamp. Example:
2026-06-12T13:58:05Zinteger
Maximum concurrent outbound calls limit. Example:
0integer
Maximum outbound calls per second. Example:
0⌘I

