curl --request PATCH \
--url https://api-eg.olimi.ai/api/v2/campaigns/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "September renewals",
"workingDays": [
"sunday",
"monday",
"tuesday",
"wednesday",
"thursday"
],
"agentId": "0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10",
"customerListIds": [
"9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24"
],
"isActive": false,
"workingStartTime": "09:00",
"workingEndTime": "17:00",
"continueOvernight": false,
"maxLines": 5,
"maxRetries": 2,
"retryDuration": 3600,
"description": "<string>"
}
'import requests
url = "https://api-eg.olimi.ai/api/v2/campaigns/{id}"
payload = {
"name": "September renewals",
"workingDays": ["sunday", "monday", "tuesday", "wednesday", "thursday"],
"agentId": "0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10",
"customerListIds": ["9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24"],
"isActive": False,
"workingStartTime": "09:00",
"workingEndTime": "17:00",
"continueOvernight": False,
"maxLines": 5,
"maxRetries": 2,
"retryDuration": 3600,
"description": "<string>"
}
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({
name: 'September renewals',
workingDays: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday'],
agentId: '0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10',
customerListIds: ['9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24'],
isActive: false,
workingStartTime: '09:00',
workingEndTime: '17:00',
continueOvernight: false,
maxLines: 5,
maxRetries: 2,
retryDuration: 3600,
description: '<string>'
})
};
fetch('https://api-eg.olimi.ai/api/v2/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-eg.olimi.ai/api/v2/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([
'name' => 'September renewals',
'workingDays' => [
'sunday',
'monday',
'tuesday',
'wednesday',
'thursday'
],
'agentId' => '0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10',
'customerListIds' => [
'9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24'
],
'isActive' => false,
'workingStartTime' => '09:00',
'workingEndTime' => '17:00',
'continueOvernight' => false,
'maxLines' => 5,
'maxRetries' => 2,
'retryDuration' => 3600,
'description' => '<string>'
]),
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-eg.olimi.ai/api/v2/campaigns/{id}"
payload := strings.NewReader("{\n \"name\": \"September renewals\",\n \"workingDays\": [\n \"sunday\",\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\"\n ],\n \"agentId\": \"0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10\",\n \"customerListIds\": [\n \"9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24\"\n ],\n \"isActive\": false,\n \"workingStartTime\": \"09:00\",\n \"workingEndTime\": \"17:00\",\n \"continueOvernight\": false,\n \"maxLines\": 5,\n \"maxRetries\": 2,\n \"retryDuration\": 3600,\n \"description\": \"<string>\"\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-eg.olimi.ai/api/v2/campaigns/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"September renewals\",\n \"workingDays\": [\n \"sunday\",\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\"\n ],\n \"agentId\": \"0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10\",\n \"customerListIds\": [\n \"9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24\"\n ],\n \"isActive\": false,\n \"workingStartTime\": \"09:00\",\n \"workingEndTime\": \"17:00\",\n \"continueOvernight\": false,\n \"maxLines\": 5,\n \"maxRetries\": 2,\n \"retryDuration\": 3600,\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eg.olimi.ai/api/v2/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 \"name\": \"September renewals\",\n \"workingDays\": [\n \"sunday\",\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\"\n ],\n \"agentId\": \"0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10\",\n \"customerListIds\": [\n \"9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24\"\n ],\n \"isActive\": false,\n \"workingStartTime\": \"09:00\",\n \"workingEndTime\": \"17:00\",\n \"continueOvernight\": false,\n \"maxLines\": 5,\n \"maxRetries\": 2,\n \"retryDuration\": 3600,\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Campaign updated successfully",
"data": {
"id": "3e8b5d21-7c4a-4f96-a1d0-6b2e9c7f4a58",
"name": "September renewals",
"description": null,
"callType": "outbound",
"isActive": true,
"workingDays": [
"sunday",
"monday",
"tuesday",
"wednesday",
"thursday"
],
"workingStartTime": "09:00:00",
"workingEndTime": "17:00:00",
"continueOvernight": false,
"maxLines": 5,
"maxRetries": 2,
"retryDuration": 3600,
"agent": {
"id": "0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10",
"name": "Renewals Agent"
},
"customerLists": [
{
"id": "9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24",
"name": "September renewals"
}
],
"createdAt": "2026-09-28T10:15:02.418Z",
"updatedAt": "2026-09-28T10:15:02.418Z"
}
}{
"statusCode": 404,
"errorCode": "agent_not_found",
"message": "Agent not found"
}{
"statusCode": 404,
"errorCode": "agent_not_found",
"message": "Agent not found"
}{
"statusCode": 404,
"errorCode": "agent_not_found",
"message": "Agent not found"
}{
"statusCode": 422,
"message": [
"name must be shorter than or equal to 100 characters"
],
"error": "Unprocessable Entity"
}Update a campaign
Changes a campaign’s settings, or starts and pauses it. Send only the fields you want to change.
curl --request PATCH \
--url https://api-eg.olimi.ai/api/v2/campaigns/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"name": "September renewals",
"workingDays": [
"sunday",
"monday",
"tuesday",
"wednesday",
"thursday"
],
"agentId": "0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10",
"customerListIds": [
"9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24"
],
"isActive": false,
"workingStartTime": "09:00",
"workingEndTime": "17:00",
"continueOvernight": false,
"maxLines": 5,
"maxRetries": 2,
"retryDuration": 3600,
"description": "<string>"
}
'import requests
url = "https://api-eg.olimi.ai/api/v2/campaigns/{id}"
payload = {
"name": "September renewals",
"workingDays": ["sunday", "monday", "tuesday", "wednesday", "thursday"],
"agentId": "0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10",
"customerListIds": ["9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24"],
"isActive": False,
"workingStartTime": "09:00",
"workingEndTime": "17:00",
"continueOvernight": False,
"maxLines": 5,
"maxRetries": 2,
"retryDuration": 3600,
"description": "<string>"
}
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({
name: 'September renewals',
workingDays: ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday'],
agentId: '0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10',
customerListIds: ['9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24'],
isActive: false,
workingStartTime: '09:00',
workingEndTime: '17:00',
continueOvernight: false,
maxLines: 5,
maxRetries: 2,
retryDuration: 3600,
description: '<string>'
})
};
fetch('https://api-eg.olimi.ai/api/v2/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-eg.olimi.ai/api/v2/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([
'name' => 'September renewals',
'workingDays' => [
'sunday',
'monday',
'tuesday',
'wednesday',
'thursday'
],
'agentId' => '0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10',
'customerListIds' => [
'9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24'
],
'isActive' => false,
'workingStartTime' => '09:00',
'workingEndTime' => '17:00',
'continueOvernight' => false,
'maxLines' => 5,
'maxRetries' => 2,
'retryDuration' => 3600,
'description' => '<string>'
]),
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-eg.olimi.ai/api/v2/campaigns/{id}"
payload := strings.NewReader("{\n \"name\": \"September renewals\",\n \"workingDays\": [\n \"sunday\",\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\"\n ],\n \"agentId\": \"0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10\",\n \"customerListIds\": [\n \"9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24\"\n ],\n \"isActive\": false,\n \"workingStartTime\": \"09:00\",\n \"workingEndTime\": \"17:00\",\n \"continueOvernight\": false,\n \"maxLines\": 5,\n \"maxRetries\": 2,\n \"retryDuration\": 3600,\n \"description\": \"<string>\"\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-eg.olimi.ai/api/v2/campaigns/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"September renewals\",\n \"workingDays\": [\n \"sunday\",\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\"\n ],\n \"agentId\": \"0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10\",\n \"customerListIds\": [\n \"9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24\"\n ],\n \"isActive\": false,\n \"workingStartTime\": \"09:00\",\n \"workingEndTime\": \"17:00\",\n \"continueOvernight\": false,\n \"maxLines\": 5,\n \"maxRetries\": 2,\n \"retryDuration\": 3600,\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-eg.olimi.ai/api/v2/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 \"name\": \"September renewals\",\n \"workingDays\": [\n \"sunday\",\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\"\n ],\n \"agentId\": \"0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10\",\n \"customerListIds\": [\n \"9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24\"\n ],\n \"isActive\": false,\n \"workingStartTime\": \"09:00\",\n \"workingEndTime\": \"17:00\",\n \"continueOvernight\": false,\n \"maxLines\": 5,\n \"maxRetries\": 2,\n \"retryDuration\": 3600,\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Campaign updated successfully",
"data": {
"id": "3e8b5d21-7c4a-4f96-a1d0-6b2e9c7f4a58",
"name": "September renewals",
"description": null,
"callType": "outbound",
"isActive": true,
"workingDays": [
"sunday",
"monday",
"tuesday",
"wednesday",
"thursday"
],
"workingStartTime": "09:00:00",
"workingEndTime": "17:00:00",
"continueOvernight": false,
"maxLines": 5,
"maxRetries": 2,
"retryDuration": 3600,
"agent": {
"id": "0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10",
"name": "Renewals Agent"
},
"customerLists": [
{
"id": "9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24",
"name": "September renewals"
}
],
"createdAt": "2026-09-28T10:15:02.418Z",
"updatedAt": "2026-09-28T10:15:02.418Z"
}
}{
"statusCode": 404,
"errorCode": "agent_not_found",
"message": "Agent not found"
}{
"statusCode": 404,
"errorCode": "agent_not_found",
"message": "Agent not found"
}{
"statusCode": 404,
"errorCode": "agent_not_found",
"message": "Agent not found"
}{
"statusCode": 422,
"message": [
"name must be shorter than or equal to 100 characters"
],
"error": "Unprocessable Entity"
}- Start or pause: send
"isActive": trueto start dialing, or"isActive": falseto pause. Starting is refused withno_available_creditsif your company doesn’t have enough credits. - Customer lists:
customerListIdsreplaces the campaign’s lists. To add one, send the current IDs plus the new one. Adding a list to a running campaign starts calling its contacts.
Authorizations
Path Parameters
The campaign's id.
Body
Surrounding spaces are trimmed.
1 - 100"September renewals"
Days the campaign may call.
1monday, tuesday, wednesday, thursday, friday, saturday, sunday [
"sunday",
"monday",
"tuesday",
"wednesday",
"thursday"
]
The outbound agent that makes the calls. Needed before the campaign can dial.
"0d6a3f7e-5b8c-4b1e-9a51-2f1d7c9e4a10"
Replaces the campaign's lists. To add one, send the current IDs plus the new one.
["9c4e1b7a-2d5f-4a83-b6e0-3f7d9a1c5e24"]
true starts dialing, false pauses. Starting is refused if your company doesn't have enough credits.
false
Time of day calls may start, as HH:mm (24-hour).
"09:00"
Time of day calls must stop, as HH:mm. If it's earlier than workingStartTime, the window runs past midnight.
"17:00"
Which day the hours after midnight belong to. See Overnight windows.
false
How many contacts the campaign dials in each batch. No more than your company's line limit.
1 <= x <= 1005
How many more times to call a contact who didn't answer.
0 <= x <= 102
Seconds to wait before retrying a contact. If you leave it out, the wait isn't guaranteed, so set it explicitly.
0 <= x <= 120003600
Free text for your own reference.