Skip to main content
PATCH
/
api
/
v1
/
campaign
/
{campaign_id}
Update Campaign
curl --request PATCH \
  --url https://app.asisso.com/api/v1/campaign/{campaign_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "retry_config": {
    "enabled": true,
    "max_retries": 2,
    "retry_delay_seconds": 120,
    "retry_on_busy": true,
    "retry_on_no_answer": true,
    "retry_on_voicemail": true
  },
  "max_concurrency": 50,
  "schedule_config": {
    "slots": [
      {
        "day_of_week": 3,
        "start_time": "<string>",
        "end_time": "<string>"
      }
    ],
    "enabled": true,
    "timezone": "UTC"
  },
  "circuit_breaker": {
    "enabled": true,
    "failure_threshold": 0.5,
    "window_seconds": 120,
    "min_calls_in_window": 5
  }
}
'
import requests

url = "https://app.asisso.com/api/v1/campaign/{campaign_id}"

payload = {
"name": "<string>",
"retry_config": {
"enabled": True,
"max_retries": 2,
"retry_delay_seconds": 120,
"retry_on_busy": True,
"retry_on_no_answer": True,
"retry_on_voicemail": True
},
"max_concurrency": 50,
"schedule_config": {
"slots": [
{
"day_of_week": 3,
"start_time": "<string>",
"end_time": "<string>"
}
],
"enabled": True,
"timezone": "UTC"
},
"circuit_breaker": {
"enabled": True,
"failure_threshold": 0.5,
"window_seconds": 120,
"min_calls_in_window": 5
}
}
headers = {"Content-Type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
retry_config: {
enabled: true,
max_retries: 2,
retry_delay_seconds: 120,
retry_on_busy: true,
retry_on_no_answer: true,
retry_on_voicemail: true
},
max_concurrency: 50,
schedule_config: {
slots: [{day_of_week: 3, start_time: '<string>', end_time: '<string>'}],
enabled: true,
timezone: 'UTC'
},
circuit_breaker: {
enabled: true,
failure_threshold: 0.5,
window_seconds: 120,
min_calls_in_window: 5
}
})
};

fetch('https://app.asisso.com/api/v1/campaign/{campaign_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://app.asisso.com/api/v1/campaign/{campaign_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' => '<string>',
'retry_config' => [
'enabled' => true,
'max_retries' => 2,
'retry_delay_seconds' => 120,
'retry_on_busy' => true,
'retry_on_no_answer' => true,
'retry_on_voicemail' => true
],
'max_concurrency' => 50,
'schedule_config' => [
'slots' => [
[
'day_of_week' => 3,
'start_time' => '<string>',
'end_time' => '<string>'
]
],
'enabled' => true,
'timezone' => 'UTC'
],
'circuit_breaker' => [
'enabled' => true,
'failure_threshold' => 0.5,
'window_seconds' => 120,
'min_calls_in_window' => 5
]
]),
CURLOPT_HTTPHEADER => [
"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://app.asisso.com/api/v1/campaign/{campaign_id}"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"retry_config\": {\n \"enabled\": true,\n \"max_retries\": 2,\n \"retry_delay_seconds\": 120,\n \"retry_on_busy\": true,\n \"retry_on_no_answer\": true,\n \"retry_on_voicemail\": true\n },\n \"max_concurrency\": 50,\n \"schedule_config\": {\n \"slots\": [\n {\n \"day_of_week\": 3,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\"\n }\n ],\n \"enabled\": true,\n \"timezone\": \"UTC\"\n },\n \"circuit_breaker\": {\n \"enabled\": true,\n \"failure_threshold\": 0.5,\n \"window_seconds\": 120,\n \"min_calls_in_window\": 5\n }\n}")

req, _ := http.NewRequest("PATCH", url, payload)

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://app.asisso.com/api/v1/campaign/{campaign_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"retry_config\": {\n \"enabled\": true,\n \"max_retries\": 2,\n \"retry_delay_seconds\": 120,\n \"retry_on_busy\": true,\n \"retry_on_no_answer\": true,\n \"retry_on_voicemail\": true\n },\n \"max_concurrency\": 50,\n \"schedule_config\": {\n \"slots\": [\n {\n \"day_of_week\": 3,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\"\n }\n ],\n \"enabled\": true,\n \"timezone\": \"UTC\"\n },\n \"circuit_breaker\": {\n \"enabled\": true,\n \"failure_threshold\": 0.5,\n \"window_seconds\": 120,\n \"min_calls_in_window\": 5\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.asisso.com/api/v1/campaign/{campaign_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"retry_config\": {\n \"enabled\": true,\n \"max_retries\": 2,\n \"retry_delay_seconds\": 120,\n \"retry_on_busy\": true,\n \"retry_on_no_answer\": true,\n \"retry_on_voicemail\": true\n },\n \"max_concurrency\": 50,\n \"schedule_config\": {\n \"slots\": [\n {\n \"day_of_week\": 3,\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\"\n }\n ],\n \"enabled\": true,\n \"timezone\": \"UTC\"\n },\n \"circuit_breaker\": {\n \"enabled\": true,\n \"failure_threshold\": 0.5,\n \"window_seconds\": 120,\n \"min_calls_in_window\": 5\n }\n}"

response = http.request(request)
puts response.read_body
{
  "id": 123,
  "name": "<string>",
  "workflow_id": 123,
  "workflow_name": "<string>",
  "state": "<string>",
  "source_type": "<string>",
  "source_id": "<string>",
  "total_rows": 123,
  "processed_rows": 123,
  "failed_rows": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "retry_config": {
    "enabled": true,
    "max_retries": 123,
    "retry_delay_seconds": 123,
    "retry_on_busy": true,
    "retry_on_no_answer": true,
    "retry_on_voicemail": true
  },
  "max_concurrency": 123,
  "schedule_config": {
    "enabled": true,
    "timezone": "<string>",
    "slots": [
      {
        "day_of_week": 123,
        "start_time": "<string>",
        "end_time": "<string>"
      }
    ]
  },
  "circuit_breaker": {
    "enabled": false,
    "failure_threshold": 0.5,
    "window_seconds": 120,
    "min_calls_in_window": 5
  },
  "executed_count": 0,
  "total_queued_count": 0,
  "parent_campaign_id": 123,
  "redialed_campaign_id": 123,
  "telephony_configuration_id": 123,
  "telephony_configuration_name": "<string>",
  "logs": [
    {
      "ts": "<string>",
      "level": "<string>",
      "event": "<string>",
      "message": "<string>",
      "details": {}
    }
  ]
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
You can update name, concurrency, time slots, and retry config. Updates are only allowed on campaigns in draft or paused status — pause the campaign first if it is currently running.

Headers

authorization
string | null
X-API-Key
string | null

Path Parameters

campaign_id
integer
required

Body

application/json
name
string | null
Required string length: 1 - 255
retry_config
RetryConfigRequest · object | null
max_concurrency
integer | null
Required range: 1 <= x <= 100
schedule_config
ScheduleConfigRequest · object | null
circuit_breaker
CircuitBreakerConfigRequest · object | null

Response

Successful Response

id
integer
required
name
string
required
workflow_id
integer
required
workflow_name
string
required
state
string
required
source_type
string
required
source_id
string
required
total_rows
integer | null
required
processed_rows
integer
required
failed_rows
integer
required
created_at
string<date-time>
required
started_at
string<date-time> | null
required
completed_at
string<date-time> | null
required
retry_config
RetryConfigResponse · object
required
max_concurrency
integer | null
schedule_config
ScheduleConfigResponse · object | null
circuit_breaker
CircuitBreakerConfigResponse · object | null
executed_count
integer
default:0
total_queued_count
integer
default:0
parent_campaign_id
integer | null
redialed_campaign_id
integer | null
telephony_configuration_id
integer | null
telephony_configuration_name
string | null
logs
CampaignLogEntryResponse · object[]