Update a campaign
curl --request PATCH \
--url https://api.callin.io/api/public/v1/campaigns/{campaignId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contacts": [
{
"phoneNumber": "<string>",
"contactId": "<string>",
"name": "<string>",
"email": "<string>"
}
],
"contactIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"active": true,
"scheduled": true,
"startTime": "<string>",
"endTime": "<string>",
"timezone": "<string>",
"followUpCall": true,
"followUpAttempts": 123,
"followUpIntervals": [
123
]
}
'import requests
url = "https://api.callin.io/api/public/v1/campaigns/{campaignId}"
payload = {
"name": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contacts": [
{
"phoneNumber": "<string>",
"contactId": "<string>",
"name": "<string>",
"email": "<string>"
}
],
"contactIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"active": True,
"scheduled": True,
"startTime": "<string>",
"endTime": "<string>",
"timezone": "<string>",
"followUpCall": True,
"followUpAttempts": 123,
"followUpIntervals": [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({
name: '<string>',
agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contacts: [
{
phoneNumber: '<string>',
contactId: '<string>',
name: '<string>',
email: '<string>'
}
],
contactIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
active: true,
scheduled: true,
startTime: '<string>',
endTime: '<string>',
timezone: '<string>',
followUpCall: true,
followUpAttempts: 123,
followUpIntervals: [123]
})
};
fetch('https://api.callin.io/api/public/v1/campaigns/{campaignId}', 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.callin.io/api/public/v1/campaigns/{campaignId}",
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>',
'agentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contacts' => [
[
'phoneNumber' => '<string>',
'contactId' => '<string>',
'name' => '<string>',
'email' => '<string>'
]
],
'contactIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'active' => true,
'scheduled' => true,
'startTime' => '<string>',
'endTime' => '<string>',
'timezone' => '<string>',
'followUpCall' => true,
'followUpAttempts' => 123,
'followUpIntervals' => [
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.callin.io/api/public/v1/campaigns/{campaignId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contacts\": [\n {\n \"phoneNumber\": \"<string>\",\n \"contactId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"active\": true,\n \"scheduled\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"followUpCall\": true,\n \"followUpAttempts\": 123,\n \"followUpIntervals\": [\n 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.callin.io/api/public/v1/campaigns/{campaignId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contacts\": [\n {\n \"phoneNumber\": \"<string>\",\n \"contactId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"active\": true,\n \"scheduled\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"followUpCall\": true,\n \"followUpAttempts\": 123,\n \"followUpIntervals\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.callin.io/api/public/v1/campaigns/{campaignId}")
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\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contacts\": [\n {\n \"phoneNumber\": \"<string>\",\n \"contactId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"active\": true,\n \"scheduled\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"followUpCall\": true,\n \"followUpAttempts\": 123,\n \"followUpIntervals\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"campaignId": "<string>",
"name": "<string>",
"agentId": "<string>",
"active": true,
"scheduled": true,
"startTime": "<string>",
"endTime": "<string>",
"timezone": "<string>",
"status": "<string>",
"startIndex": 123,
"contactCount": 123,
"contacts": [
{
"phoneNumber": "<string>",
"contactId": "<string>",
"name": "<string>",
"email": "<string>"
}
],
"followUp": {
"enabled": true,
"attempts": 123,
"intervalsMinutes": [
123
]
},
"metadata": {
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>"
}
},
"warning": "<string>",
"requestId": "<string>"
}Campaigns
Update a campaign
Rejected while the campaign is running. Changing contacts, the agent, or the schedule replaces a waiting job.
PATCH
/
public
/
v1
/
campaigns
/
{campaignId}
Update a campaign
curl --request PATCH \
--url https://api.callin.io/api/public/v1/campaigns/{campaignId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contacts": [
{
"phoneNumber": "<string>",
"contactId": "<string>",
"name": "<string>",
"email": "<string>"
}
],
"contactIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"active": true,
"scheduled": true,
"startTime": "<string>",
"endTime": "<string>",
"timezone": "<string>",
"followUpCall": true,
"followUpAttempts": 123,
"followUpIntervals": [
123
]
}
'import requests
url = "https://api.callin.io/api/public/v1/campaigns/{campaignId}"
payload = {
"name": "<string>",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contacts": [
{
"phoneNumber": "<string>",
"contactId": "<string>",
"name": "<string>",
"email": "<string>"
}
],
"contactIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"active": True,
"scheduled": True,
"startTime": "<string>",
"endTime": "<string>",
"timezone": "<string>",
"followUpCall": True,
"followUpAttempts": 123,
"followUpIntervals": [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({
name: '<string>',
agentId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contacts: [
{
phoneNumber: '<string>',
contactId: '<string>',
name: '<string>',
email: '<string>'
}
],
contactIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
active: true,
scheduled: true,
startTime: '<string>',
endTime: '<string>',
timezone: '<string>',
followUpCall: true,
followUpAttempts: 123,
followUpIntervals: [123]
})
};
fetch('https://api.callin.io/api/public/v1/campaigns/{campaignId}', 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.callin.io/api/public/v1/campaigns/{campaignId}",
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>',
'agentId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contacts' => [
[
'phoneNumber' => '<string>',
'contactId' => '<string>',
'name' => '<string>',
'email' => '<string>'
]
],
'contactIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'active' => true,
'scheduled' => true,
'startTime' => '<string>',
'endTime' => '<string>',
'timezone' => '<string>',
'followUpCall' => true,
'followUpAttempts' => 123,
'followUpIntervals' => [
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.callin.io/api/public/v1/campaigns/{campaignId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contacts\": [\n {\n \"phoneNumber\": \"<string>\",\n \"contactId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"active\": true,\n \"scheduled\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"followUpCall\": true,\n \"followUpAttempts\": 123,\n \"followUpIntervals\": [\n 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.callin.io/api/public/v1/campaigns/{campaignId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contacts\": [\n {\n \"phoneNumber\": \"<string>\",\n \"contactId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"active\": true,\n \"scheduled\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"followUpCall\": true,\n \"followUpAttempts\": 123,\n \"followUpIntervals\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.callin.io/api/public/v1/campaigns/{campaignId}")
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\": \"<string>\",\n \"agentId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contacts\": [\n {\n \"phoneNumber\": \"<string>\",\n \"contactId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n }\n ],\n \"contactIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"active\": true,\n \"scheduled\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"timezone\": \"<string>\",\n \"followUpCall\": true,\n \"followUpAttempts\": 123,\n \"followUpIntervals\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"campaignId": "<string>",
"name": "<string>",
"agentId": "<string>",
"active": true,
"scheduled": true,
"startTime": "<string>",
"endTime": "<string>",
"timezone": "<string>",
"status": "<string>",
"startIndex": 123,
"contactCount": 123,
"contacts": [
{
"phoneNumber": "<string>",
"contactId": "<string>",
"name": "<string>",
"email": "<string>"
}
],
"followUp": {
"enabled": true,
"attempts": 123,
"intervalsMinutes": [
123
]
},
"metadata": {
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>"
}
},
"warning": "<string>",
"requestId": "<string>"
}Authorizations
ApiKeyHeaderBearerAuth
Send your Callin API key in the x-api-key header.
Path Parameters
Body
application/json
Was this page helpful?

