cURL
curl --request PUT \
--url https://api.comm.com/api/v1/sms/campaigns/{campaign} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"meta": {
"segment_ids": [],
"sms_routing_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filter_segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"use_dedicated_domains": false,
"manual_data": {
"send_amount": 200,
"send_datetime": "<string>",
"throttle_batch_size": 0
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": true
},
"multistep_status": {
"current_step": 0,
"total_available_contacts": 0,
"total_sent": 0,
"last_sent_timestamp": 123,
"start_timestamp": 123,
"initial_brands": [],
"steps_performance": [],
"status": "in_progress",
"last_timezones": [],
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": true
}
},
"hlr_settings": {
"is_active": false,
"number_of_retries": 0,
"delay_between_retries": 0,
"additional_time_increment": 0,
"retry_until": "<string>"
}
}
}
'import requests
url = "https://api.comm.com/api/v1/sms/campaigns/{campaign}"
payload = {
"id": "<string>",
"name": "<string>",
"meta": {
"segment_ids": [],
"sms_routing_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filter_segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"use_dedicated_domains": False,
"manual_data": {
"send_amount": 200,
"send_datetime": "<string>",
"throttle_batch_size": 0
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": True
},
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": True
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": True
},
"multistep_status": {
"current_step": 0,
"total_available_contacts": 0,
"total_sent": 0,
"last_sent_timestamp": 123,
"start_timestamp": 123,
"initial_brands": [],
"steps_performance": [],
"status": "in_progress",
"last_timezones": [],
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": True
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": True
}
},
"hlr_settings": {
"is_active": False,
"number_of_retries": 0,
"delay_between_retries": 0,
"additional_time_increment": 0,
"retry_until": "<string>"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
meta: {
segment_ids: [],
sms_routing_plan_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
filter_segment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
domain_plan_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
use_dedicated_domains: false,
manual_data: {send_amount: 200, send_datetime: '<string>', throttle_batch_size: 0},
multistep_data: {
step_size: 200,
step_delay: 5,
min_ctr: 123,
max_sms_to_send: 1,
max_minutes_to_send: 1,
send_datetime: '<string>',
is_active: true
},
planner_data: {
weekly_schedule: {
default: {start: '<string>', end: '<string>'},
Mon: {start: '<string>', end: '<string>'},
Tue: {start: '<string>', end: '<string>'},
Wed: {start: '<string>', end: '<string>'},
Thu: {start: '<string>', end: '<string>'},
Fri: {start: '<string>', end: '<string>'},
Sat: {start: '<string>', end: '<string>'},
Sun: {start: '<string>', end: '<string>'}
},
multistep_data: {
step_size: 200,
step_delay: 5,
min_ctr: 123,
max_sms_to_send: 1,
max_minutes_to_send: 1,
send_datetime: '<string>',
is_active: true
},
weekly_sms_contact_limit: 5,
daily_sms_contact_limit: 1,
is_active: true
},
multistep_status: {
current_step: 0,
total_available_contacts: 0,
total_sent: 0,
last_sent_timestamp: 123,
start_timestamp: 123,
initial_brands: [],
steps_performance: [],
status: 'in_progress',
last_timezones: [],
planner_data: {
weekly_schedule: {
default: {start: '<string>', end: '<string>'},
Mon: {start: '<string>', end: '<string>'},
Tue: {start: '<string>', end: '<string>'},
Wed: {start: '<string>', end: '<string>'},
Thu: {start: '<string>', end: '<string>'},
Fri: {start: '<string>', end: '<string>'},
Sat: {start: '<string>', end: '<string>'},
Sun: {start: '<string>', end: '<string>'}
},
multistep_data: {
step_size: 200,
step_delay: 5,
min_ctr: 123,
max_sms_to_send: 1,
max_minutes_to_send: 1,
send_datetime: '<string>',
is_active: true
},
weekly_sms_contact_limit: 5,
daily_sms_contact_limit: 1,
is_active: true
}
},
hlr_settings: {
is_active: false,
number_of_retries: 0,
delay_between_retries: 0,
additional_time_increment: 0,
retry_until: '<string>'
}
}
})
};
fetch('https://api.comm.com/api/v1/sms/campaigns/{campaign}', 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.comm.com/api/v1/sms/campaigns/{campaign}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'name' => '<string>',
'meta' => [
'segment_ids' => [
],
'sms_routing_plan_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'filter_segment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'domain_plan_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'use_dedicated_domains' => false,
'manual_data' => [
'send_amount' => 200,
'send_datetime' => '<string>',
'throttle_batch_size' => 0
],
'multistep_data' => [
'step_size' => 200,
'step_delay' => 5,
'min_ctr' => 123,
'max_sms_to_send' => 1,
'max_minutes_to_send' => 1,
'send_datetime' => '<string>',
'is_active' => true
],
'planner_data' => [
'weekly_schedule' => [
'default' => [
'start' => '<string>',
'end' => '<string>'
],
'Mon' => [
'start' => '<string>',
'end' => '<string>'
],
'Tue' => [
'start' => '<string>',
'end' => '<string>'
],
'Wed' => [
'start' => '<string>',
'end' => '<string>'
],
'Thu' => [
'start' => '<string>',
'end' => '<string>'
],
'Fri' => [
'start' => '<string>',
'end' => '<string>'
],
'Sat' => [
'start' => '<string>',
'end' => '<string>'
],
'Sun' => [
'start' => '<string>',
'end' => '<string>'
]
],
'multistep_data' => [
'step_size' => 200,
'step_delay' => 5,
'min_ctr' => 123,
'max_sms_to_send' => 1,
'max_minutes_to_send' => 1,
'send_datetime' => '<string>',
'is_active' => true
],
'weekly_sms_contact_limit' => 5,
'daily_sms_contact_limit' => 1,
'is_active' => true
],
'multistep_status' => [
'current_step' => 0,
'total_available_contacts' => 0,
'total_sent' => 0,
'last_sent_timestamp' => 123,
'start_timestamp' => 123,
'initial_brands' => [
],
'steps_performance' => [
],
'status' => 'in_progress',
'last_timezones' => [
],
'planner_data' => [
'weekly_schedule' => [
'default' => [
'start' => '<string>',
'end' => '<string>'
],
'Mon' => [
'start' => '<string>',
'end' => '<string>'
],
'Tue' => [
'start' => '<string>',
'end' => '<string>'
],
'Wed' => [
'start' => '<string>',
'end' => '<string>'
],
'Thu' => [
'start' => '<string>',
'end' => '<string>'
],
'Fri' => [
'start' => '<string>',
'end' => '<string>'
],
'Sat' => [
'start' => '<string>',
'end' => '<string>'
],
'Sun' => [
'start' => '<string>',
'end' => '<string>'
]
],
'multistep_data' => [
'step_size' => 200,
'step_delay' => 5,
'min_ctr' => 123,
'max_sms_to_send' => 1,
'max_minutes_to_send' => 1,
'send_datetime' => '<string>',
'is_active' => true
],
'weekly_sms_contact_limit' => 5,
'daily_sms_contact_limit' => 1,
'is_active' => true
]
],
'hlr_settings' => [
'is_active' => false,
'number_of_retries' => 0,
'delay_between_retries' => 0,
'additional_time_increment' => 0,
'retry_until' => '<string>'
]
]
]),
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.comm.com/api/v1/sms/campaigns/{campaign}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"meta\": {\n \"segment_ids\": [],\n \"sms_routing_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filter_segment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"use_dedicated_domains\": false,\n \"manual_data\": {\n \"send_amount\": 200,\n \"send_datetime\": \"<string>\",\n \"throttle_batch_size\": 0\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n },\n \"multistep_status\": {\n \"current_step\": 0,\n \"total_available_contacts\": 0,\n \"total_sent\": 0,\n \"last_sent_timestamp\": 123,\n \"start_timestamp\": 123,\n \"initial_brands\": [],\n \"steps_performance\": [],\n \"status\": \"in_progress\",\n \"last_timezones\": [],\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n }\n },\n \"hlr_settings\": {\n \"is_active\": false,\n \"number_of_retries\": 0,\n \"delay_between_retries\": 0,\n \"additional_time_increment\": 0,\n \"retry_until\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.comm.com/api/v1/sms/campaigns/{campaign}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"meta\": {\n \"segment_ids\": [],\n \"sms_routing_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filter_segment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"use_dedicated_domains\": false,\n \"manual_data\": {\n \"send_amount\": 200,\n \"send_datetime\": \"<string>\",\n \"throttle_batch_size\": 0\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n },\n \"multistep_status\": {\n \"current_step\": 0,\n \"total_available_contacts\": 0,\n \"total_sent\": 0,\n \"last_sent_timestamp\": 123,\n \"start_timestamp\": 123,\n \"initial_brands\": [],\n \"steps_performance\": [],\n \"status\": \"in_progress\",\n \"last_timezones\": [],\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n }\n },\n \"hlr_settings\": {\n \"is_active\": false,\n \"number_of_retries\": 0,\n \"delay_between_retries\": 0,\n \"additional_time_increment\": 0,\n \"retry_until\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comm.com/api/v1/sms/campaigns/{campaign}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"meta\": {\n \"segment_ids\": [],\n \"sms_routing_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filter_segment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"use_dedicated_domains\": false,\n \"manual_data\": {\n \"send_amount\": 200,\n \"send_datetime\": \"<string>\",\n \"throttle_batch_size\": 0\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n },\n \"multistep_status\": {\n \"current_step\": 0,\n \"total_available_contacts\": 0,\n \"total_sent\": 0,\n \"last_sent_timestamp\": 123,\n \"start_timestamp\": 123,\n \"initial_brands\": [],\n \"steps_performance\": [],\n \"status\": \"in_progress\",\n \"last_timezones\": [],\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n }\n },\n \"hlr_settings\": {\n \"is_active\": false,\n \"number_of_retries\": 0,\n \"delay_between_retries\": 0,\n \"additional_time_increment\": 0,\n \"retry_until\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"meta": {
"segment_ids": [],
"sms_routing_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filter_segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"use_dedicated_domains": false,
"manual_data": {
"send_amount": 200,
"send_datetime": "<string>",
"throttle_batch_size": 0
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": true
},
"multistep_status": {
"current_step": 0,
"total_available_contacts": 0,
"total_sent": 0,
"last_sent_timestamp": 123,
"start_timestamp": 123,
"initial_brands": [],
"steps_performance": [],
"status": "in_progress",
"last_timezones": [],
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": true
}
},
"hlr_settings": {
"is_active": false,
"number_of_retries": 0,
"delay_between_retries": 0,
"additional_time_increment": 0,
"retry_until": "<string>"
}
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}SmsCampaigns
Put v1smscampaigns
PUT
/
v1
/
sms
/
campaigns
/
{campaign}
cURL
curl --request PUT \
--url https://api.comm.com/api/v1/sms/campaigns/{campaign} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"meta": {
"segment_ids": [],
"sms_routing_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filter_segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"use_dedicated_domains": false,
"manual_data": {
"send_amount": 200,
"send_datetime": "<string>",
"throttle_batch_size": 0
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": true
},
"multistep_status": {
"current_step": 0,
"total_available_contacts": 0,
"total_sent": 0,
"last_sent_timestamp": 123,
"start_timestamp": 123,
"initial_brands": [],
"steps_performance": [],
"status": "in_progress",
"last_timezones": [],
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": true
}
},
"hlr_settings": {
"is_active": false,
"number_of_retries": 0,
"delay_between_retries": 0,
"additional_time_increment": 0,
"retry_until": "<string>"
}
}
}
'import requests
url = "https://api.comm.com/api/v1/sms/campaigns/{campaign}"
payload = {
"id": "<string>",
"name": "<string>",
"meta": {
"segment_ids": [],
"sms_routing_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filter_segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"use_dedicated_domains": False,
"manual_data": {
"send_amount": 200,
"send_datetime": "<string>",
"throttle_batch_size": 0
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": True
},
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": True
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": True
},
"multistep_status": {
"current_step": 0,
"total_available_contacts": 0,
"total_sent": 0,
"last_sent_timestamp": 123,
"start_timestamp": 123,
"initial_brands": [],
"steps_performance": [],
"status": "in_progress",
"last_timezones": [],
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": True
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": True
}
},
"hlr_settings": {
"is_active": False,
"number_of_retries": 0,
"delay_between_retries": 0,
"additional_time_increment": 0,
"retry_until": "<string>"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
meta: {
segment_ids: [],
sms_routing_plan_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
filter_segment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
domain_plan_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
use_dedicated_domains: false,
manual_data: {send_amount: 200, send_datetime: '<string>', throttle_batch_size: 0},
multistep_data: {
step_size: 200,
step_delay: 5,
min_ctr: 123,
max_sms_to_send: 1,
max_minutes_to_send: 1,
send_datetime: '<string>',
is_active: true
},
planner_data: {
weekly_schedule: {
default: {start: '<string>', end: '<string>'},
Mon: {start: '<string>', end: '<string>'},
Tue: {start: '<string>', end: '<string>'},
Wed: {start: '<string>', end: '<string>'},
Thu: {start: '<string>', end: '<string>'},
Fri: {start: '<string>', end: '<string>'},
Sat: {start: '<string>', end: '<string>'},
Sun: {start: '<string>', end: '<string>'}
},
multistep_data: {
step_size: 200,
step_delay: 5,
min_ctr: 123,
max_sms_to_send: 1,
max_minutes_to_send: 1,
send_datetime: '<string>',
is_active: true
},
weekly_sms_contact_limit: 5,
daily_sms_contact_limit: 1,
is_active: true
},
multistep_status: {
current_step: 0,
total_available_contacts: 0,
total_sent: 0,
last_sent_timestamp: 123,
start_timestamp: 123,
initial_brands: [],
steps_performance: [],
status: 'in_progress',
last_timezones: [],
planner_data: {
weekly_schedule: {
default: {start: '<string>', end: '<string>'},
Mon: {start: '<string>', end: '<string>'},
Tue: {start: '<string>', end: '<string>'},
Wed: {start: '<string>', end: '<string>'},
Thu: {start: '<string>', end: '<string>'},
Fri: {start: '<string>', end: '<string>'},
Sat: {start: '<string>', end: '<string>'},
Sun: {start: '<string>', end: '<string>'}
},
multistep_data: {
step_size: 200,
step_delay: 5,
min_ctr: 123,
max_sms_to_send: 1,
max_minutes_to_send: 1,
send_datetime: '<string>',
is_active: true
},
weekly_sms_contact_limit: 5,
daily_sms_contact_limit: 1,
is_active: true
}
},
hlr_settings: {
is_active: false,
number_of_retries: 0,
delay_between_retries: 0,
additional_time_increment: 0,
retry_until: '<string>'
}
}
})
};
fetch('https://api.comm.com/api/v1/sms/campaigns/{campaign}', 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.comm.com/api/v1/sms/campaigns/{campaign}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'name' => '<string>',
'meta' => [
'segment_ids' => [
],
'sms_routing_plan_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'filter_segment_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'domain_plan_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'use_dedicated_domains' => false,
'manual_data' => [
'send_amount' => 200,
'send_datetime' => '<string>',
'throttle_batch_size' => 0
],
'multistep_data' => [
'step_size' => 200,
'step_delay' => 5,
'min_ctr' => 123,
'max_sms_to_send' => 1,
'max_minutes_to_send' => 1,
'send_datetime' => '<string>',
'is_active' => true
],
'planner_data' => [
'weekly_schedule' => [
'default' => [
'start' => '<string>',
'end' => '<string>'
],
'Mon' => [
'start' => '<string>',
'end' => '<string>'
],
'Tue' => [
'start' => '<string>',
'end' => '<string>'
],
'Wed' => [
'start' => '<string>',
'end' => '<string>'
],
'Thu' => [
'start' => '<string>',
'end' => '<string>'
],
'Fri' => [
'start' => '<string>',
'end' => '<string>'
],
'Sat' => [
'start' => '<string>',
'end' => '<string>'
],
'Sun' => [
'start' => '<string>',
'end' => '<string>'
]
],
'multistep_data' => [
'step_size' => 200,
'step_delay' => 5,
'min_ctr' => 123,
'max_sms_to_send' => 1,
'max_minutes_to_send' => 1,
'send_datetime' => '<string>',
'is_active' => true
],
'weekly_sms_contact_limit' => 5,
'daily_sms_contact_limit' => 1,
'is_active' => true
],
'multistep_status' => [
'current_step' => 0,
'total_available_contacts' => 0,
'total_sent' => 0,
'last_sent_timestamp' => 123,
'start_timestamp' => 123,
'initial_brands' => [
],
'steps_performance' => [
],
'status' => 'in_progress',
'last_timezones' => [
],
'planner_data' => [
'weekly_schedule' => [
'default' => [
'start' => '<string>',
'end' => '<string>'
],
'Mon' => [
'start' => '<string>',
'end' => '<string>'
],
'Tue' => [
'start' => '<string>',
'end' => '<string>'
],
'Wed' => [
'start' => '<string>',
'end' => '<string>'
],
'Thu' => [
'start' => '<string>',
'end' => '<string>'
],
'Fri' => [
'start' => '<string>',
'end' => '<string>'
],
'Sat' => [
'start' => '<string>',
'end' => '<string>'
],
'Sun' => [
'start' => '<string>',
'end' => '<string>'
]
],
'multistep_data' => [
'step_size' => 200,
'step_delay' => 5,
'min_ctr' => 123,
'max_sms_to_send' => 1,
'max_minutes_to_send' => 1,
'send_datetime' => '<string>',
'is_active' => true
],
'weekly_sms_contact_limit' => 5,
'daily_sms_contact_limit' => 1,
'is_active' => true
]
],
'hlr_settings' => [
'is_active' => false,
'number_of_retries' => 0,
'delay_between_retries' => 0,
'additional_time_increment' => 0,
'retry_until' => '<string>'
]
]
]),
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.comm.com/api/v1/sms/campaigns/{campaign}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"meta\": {\n \"segment_ids\": [],\n \"sms_routing_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filter_segment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"use_dedicated_domains\": false,\n \"manual_data\": {\n \"send_amount\": 200,\n \"send_datetime\": \"<string>\",\n \"throttle_batch_size\": 0\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n },\n \"multistep_status\": {\n \"current_step\": 0,\n \"total_available_contacts\": 0,\n \"total_sent\": 0,\n \"last_sent_timestamp\": 123,\n \"start_timestamp\": 123,\n \"initial_brands\": [],\n \"steps_performance\": [],\n \"status\": \"in_progress\",\n \"last_timezones\": [],\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n }\n },\n \"hlr_settings\": {\n \"is_active\": false,\n \"number_of_retries\": 0,\n \"delay_between_retries\": 0,\n \"additional_time_increment\": 0,\n \"retry_until\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.comm.com/api/v1/sms/campaigns/{campaign}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"meta\": {\n \"segment_ids\": [],\n \"sms_routing_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filter_segment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"use_dedicated_domains\": false,\n \"manual_data\": {\n \"send_amount\": 200,\n \"send_datetime\": \"<string>\",\n \"throttle_batch_size\": 0\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n },\n \"multistep_status\": {\n \"current_step\": 0,\n \"total_available_contacts\": 0,\n \"total_sent\": 0,\n \"last_sent_timestamp\": 123,\n \"start_timestamp\": 123,\n \"initial_brands\": [],\n \"steps_performance\": [],\n \"status\": \"in_progress\",\n \"last_timezones\": [],\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n }\n },\n \"hlr_settings\": {\n \"is_active\": false,\n \"number_of_retries\": 0,\n \"delay_between_retries\": 0,\n \"additional_time_increment\": 0,\n \"retry_until\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comm.com/api/v1/sms/campaigns/{campaign}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"meta\": {\n \"segment_ids\": [],\n \"sms_routing_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"filter_segment_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"domain_plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"use_dedicated_domains\": false,\n \"manual_data\": {\n \"send_amount\": 200,\n \"send_datetime\": \"<string>\",\n \"throttle_batch_size\": 0\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n },\n \"multistep_status\": {\n \"current_step\": 0,\n \"total_available_contacts\": 0,\n \"total_sent\": 0,\n \"last_sent_timestamp\": 123,\n \"start_timestamp\": 123,\n \"initial_brands\": [],\n \"steps_performance\": [],\n \"status\": \"in_progress\",\n \"last_timezones\": [],\n \"planner_data\": {\n \"weekly_schedule\": {\n \"default\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Mon\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Tue\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Wed\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Thu\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Fri\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sat\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n },\n \"Sun\": {\n \"start\": \"<string>\",\n \"end\": \"<string>\"\n }\n },\n \"multistep_data\": {\n \"step_size\": 200,\n \"step_delay\": 5,\n \"min_ctr\": 123,\n \"max_sms_to_send\": 1,\n \"max_minutes_to_send\": 1,\n \"send_datetime\": \"<string>\",\n \"is_active\": true\n },\n \"weekly_sms_contact_limit\": 5,\n \"daily_sms_contact_limit\": 1,\n \"is_active\": true\n }\n },\n \"hlr_settings\": {\n \"is_active\": false,\n \"number_of_retries\": 0,\n \"delay_between_retries\": 0,\n \"additional_time_increment\": 0,\n \"retry_until\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"meta": {
"segment_ids": [],
"sms_routing_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filter_segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain_plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"use_dedicated_domains": false,
"manual_data": {
"send_amount": 200,
"send_datetime": "<string>",
"throttle_batch_size": 0
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": true
},
"multistep_status": {
"current_step": 0,
"total_available_contacts": 0,
"total_sent": 0,
"last_sent_timestamp": 123,
"start_timestamp": 123,
"initial_brands": [],
"steps_performance": [],
"status": "in_progress",
"last_timezones": [],
"planner_data": {
"weekly_schedule": {
"default": {
"start": "<string>",
"end": "<string>"
},
"Mon": {
"start": "<string>",
"end": "<string>"
},
"Tue": {
"start": "<string>",
"end": "<string>"
},
"Wed": {
"start": "<string>",
"end": "<string>"
},
"Thu": {
"start": "<string>",
"end": "<string>"
},
"Fri": {
"start": "<string>",
"end": "<string>"
},
"Sat": {
"start": "<string>",
"end": "<string>"
},
"Sun": {
"start": "<string>",
"end": "<string>"
}
},
"multistep_data": {
"step_size": 200,
"step_delay": 5,
"min_ctr": 123,
"max_sms_to_send": 1,
"max_minutes_to_send": 1,
"send_datetime": "<string>",
"is_active": true
},
"weekly_sms_contact_limit": 5,
"daily_sms_contact_limit": 1,
"is_active": true
}
},
"hlr_settings": {
"is_active": false,
"number_of_retries": 0,
"delay_between_retries": 0,
"additional_time_increment": 0,
"retry_until": "<string>"
}
}
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
SmsCampaignDataRequest
Response
SmsCampaignData
Show child attributes
Show child attributes
⌘I