import os
from syllable_sdk import SyllableSDK, models
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.outbound.campaigns.update(campaign_id=187717, outbound_campaign_input=models.OutboundCampaignInput(
campaign_name="Outbound Campaign 1",
description="This is a test campaign",
mode="voice",
sms_session_ttl=720,
labels=[
"test",
"demo",
],
campaign_variables={
"key": "value",
"key2": "value2",
},
daily_start_time="09:00:00",
daily_end_time="17:00:00",
source="+19032900844",
caller_id="19995551234",
hourly_rate=25,
max_daily_calls=2500,
retry_count=1,
retry_interval="30m",
active_days=[
models.DaysOfWeek.MON,
models.DaysOfWeek.TUE,
models.DaysOfWeek.WED,
models.DaysOfWeek.THU,
models.DaysOfWeek.FRI,
],
voicemail_detection=models.VoicemailDetectionConfig(
voicemail_detection_overall_timeout=30,
voicemail_detection_pre_speech_timeout=3.5,
voicemail_detection_post_speech_timeout=1.75,
),
allowed_line_types=[
models.LineTypeBucket.MOBILE,
models.LineTypeBucket.VOIP,
],
target_filters=models.TargetFilters(
match=models.Match.ANY,
rules=[
models.TargetFilterRule(
field="line_type",
op=models.FilterOp.IN,
values=[
"landline",
"fixedVoip",
"nonFixedVoip",
],
),
models.TargetFilterRule(
field="carrier_name",
op=models.FilterOp.IN,
values=[
"Onvoy, LLC - Sinch",
],
),
],
),
webhooks=[
models.OutboundCampaignWebhookInput(
trigger_statuses=[
models.ChannelManagerStatus.COMPLETED,
],
url="https://example.com/hooks/syllable",
request_method="POST",
),
],
))
# Handle response
print(res)import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.outbound.campaigns.update({
campaignId: 679645,
outboundCampaignInput: {
campaignName: "Outbound Campaign 1",
description: "This is a test campaign",
mode: "voice",
smsSessionTtl: 720,
labels: [
"test",
"demo",
],
campaignVariables: {
"key": "value",
"key2": "value2",
},
dailyStartTime: "09:00:00",
dailyEndTime: "17:00:00",
source: "+19032900844",
callerId: "19995551234",
hourlyRate: 25,
maxDailyCalls: 2500,
retryCount: 1,
retryInterval: "30m",
activeDays: [
"mon",
"tue",
"wed",
"thu",
"fri",
],
voicemailDetection: {
voicemailDetectionOverallTimeout: 30,
voicemailDetectionPreSpeechTimeout: 3.5,
voicemailDetectionPostSpeechTimeout: 1.75,
},
allowedLineTypes: [
"mobile",
"voip",
],
targetFilters: {
match: "any",
rules: [
{
field: "line_type",
op: "in",
values: [
"landline",
"fixedVoip",
"nonFixedVoip",
],
},
{
field: "carrier_name",
op: "in",
values: [
"Onvoy, LLC - Sinch",
],
},
],
},
webhooks: [
{
triggerStatuses: [
"COMPLETED",
],
url: "https://example.com/hooks/syllable",
requestMethod: "POST",
},
],
},
});
console.log(result);
}
run();curl --request PUT \
--url https://api.syllable.cloud/api/v1/outbound/campaigns/{campaign_id} \
--header 'Content-Type: application/json' \
--header 'Syllable-API-Key: <api-key>' \
--data '
{
"campaign_name": "Outbound Campaign 1",
"campaign_variables": {
"key": "value",
"key2": "value2"
},
"caller_id": 19995551234,
"active_days": "[\"mon\", \"tue\", \"wed\", \"thu\", \"fri\"]",
"description": "This is a test campaign",
"mode": "voice",
"sms_session_ttl": 720,
"label": "test",
"labels": [
"test",
"demo"
],
"daily_start_time": "09:00:00",
"daily_end_time": "17:00:00",
"source": "+19032900844",
"hourly_rate": 25,
"max_daily_calls": 2500,
"retry_count": 1,
"retry_interval": "30m",
"voicemail_detection": {
"voicemail_detection_overall_timeout": 30,
"voicemail_detection_post_speech_timeout": 1.75,
"voicemail_detection_pre_speech_timeout": 3.5
},
"allowed_line_types": [
"mobile",
"voip"
],
"include_unknown_line_types": true,
"target_filters": {
"match": "any",
"on_unknown": "include",
"rules": [
{
"field": "line_type",
"op": "in",
"values": [
"landline",
"fixedVoip",
"nonFixedVoip"
]
},
{
"field": "carrier_name",
"op": "in",
"values": [
"Onvoy, LLC - Sinch"
]
}
]
},
"webhooks": {
"request_method": "POST",
"trigger_statuses": [
"COMPLETED"
],
"url": "https://example.com/hooks/syllable"
}
}
'const options = {
method: 'PUT',
headers: {'Syllable-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
campaign_name: 'Outbound Campaign 1',
campaign_variables: {key: 'value', key2: 'value2'},
caller_id: 19995551234,
active_days: '["mon", "tue", "wed", "thu", "fri"]',
description: 'This is a test campaign',
mode: 'voice',
sms_session_ttl: 720,
label: 'test',
labels: ['test', 'demo'],
daily_start_time: '09:00:00',
daily_end_time: '17:00:00',
source: '+19032900844',
hourly_rate: 25,
max_daily_calls: 2500,
retry_count: 1,
retry_interval: '30m',
voicemail_detection: {
voicemail_detection_overall_timeout: 30,
voicemail_detection_post_speech_timeout: 1.75,
voicemail_detection_pre_speech_timeout: 3.5
},
allowed_line_types: ['mobile', 'voip'],
include_unknown_line_types: true,
target_filters: {
match: 'any',
on_unknown: 'include',
rules: [
{
field: 'line_type',
op: 'in',
values: ['landline', 'fixedVoip', 'nonFixedVoip']
},
{field: 'carrier_name', op: 'in', values: ['Onvoy, LLC - Sinch']}
]
},
webhooks: {
request_method: 'POST',
trigger_statuses: ['COMPLETED'],
url: 'https://example.com/hooks/syllable'
}
})
};
fetch('https://api.syllable.cloud/api/v1/outbound/campaigns/{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://api.syllable.cloud/api/v1/outbound/campaigns/{campaign_id}",
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([
'campaign_name' => 'Outbound Campaign 1',
'campaign_variables' => [
'key' => 'value',
'key2' => 'value2'
],
'caller_id' => 19995551234,
'active_days' => '["mon", "tue", "wed", "thu", "fri"]',
'description' => 'This is a test campaign',
'mode' => 'voice',
'sms_session_ttl' => 720,
'label' => 'test',
'labels' => [
'test',
'demo'
],
'daily_start_time' => '09:00:00',
'daily_end_time' => '17:00:00',
'source' => '+19032900844',
'hourly_rate' => 25,
'max_daily_calls' => 2500,
'retry_count' => 1,
'retry_interval' => '30m',
'voicemail_detection' => [
'voicemail_detection_overall_timeout' => 30,
'voicemail_detection_post_speech_timeout' => 1.75,
'voicemail_detection_pre_speech_timeout' => 3.5
],
'allowed_line_types' => [
'mobile',
'voip'
],
'include_unknown_line_types' => true,
'target_filters' => [
'match' => 'any',
'on_unknown' => 'include',
'rules' => [
[
'field' => 'line_type',
'op' => 'in',
'values' => [
'landline',
'fixedVoip',
'nonFixedVoip'
]
],
[
'field' => 'carrier_name',
'op' => 'in',
'values' => [
'Onvoy, LLC - Sinch'
]
]
]
],
'webhooks' => [
'request_method' => 'POST',
'trigger_statuses' => [
'COMPLETED'
],
'url' => 'https://example.com/hooks/syllable'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Syllable-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.syllable.cloud/api/v1/outbound/campaigns/{campaign_id}"
payload := strings.NewReader("{\n \"campaign_name\": \"Outbound Campaign 1\",\n \"campaign_variables\": {\n \"key\": \"value\",\n \"key2\": \"value2\"\n },\n \"caller_id\": 19995551234,\n \"active_days\": \"[\\\"mon\\\", \\\"tue\\\", \\\"wed\\\", \\\"thu\\\", \\\"fri\\\"]\",\n \"description\": \"This is a test campaign\",\n \"mode\": \"voice\",\n \"sms_session_ttl\": 720,\n \"label\": \"test\",\n \"labels\": [\n \"test\",\n \"demo\"\n ],\n \"daily_start_time\": \"09:00:00\",\n \"daily_end_time\": \"17:00:00\",\n \"source\": \"+19032900844\",\n \"hourly_rate\": 25,\n \"max_daily_calls\": 2500,\n \"retry_count\": 1,\n \"retry_interval\": \"30m\",\n \"voicemail_detection\": {\n \"voicemail_detection_overall_timeout\": 30,\n \"voicemail_detection_post_speech_timeout\": 1.75,\n \"voicemail_detection_pre_speech_timeout\": 3.5\n },\n \"allowed_line_types\": [\n \"mobile\",\n \"voip\"\n ],\n \"include_unknown_line_types\": true,\n \"target_filters\": {\n \"match\": \"any\",\n \"on_unknown\": \"include\",\n \"rules\": [\n {\n \"field\": \"line_type\",\n \"op\": \"in\",\n \"values\": [\n \"landline\",\n \"fixedVoip\",\n \"nonFixedVoip\"\n ]\n },\n {\n \"field\": \"carrier_name\",\n \"op\": \"in\",\n \"values\": [\n \"Onvoy, LLC - Sinch\"\n ]\n }\n ]\n },\n \"webhooks\": {\n \"request_method\": \"POST\",\n \"trigger_statuses\": [\n \"COMPLETED\"\n ],\n \"url\": \"https://example.com/hooks/syllable\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Syllable-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.put("https://api.syllable.cloud/api/v1/outbound/campaigns/{campaign_id}")
.header("Syllable-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_name\": \"Outbound Campaign 1\",\n \"campaign_variables\": {\n \"key\": \"value\",\n \"key2\": \"value2\"\n },\n \"caller_id\": 19995551234,\n \"active_days\": \"[\\\"mon\\\", \\\"tue\\\", \\\"wed\\\", \\\"thu\\\", \\\"fri\\\"]\",\n \"description\": \"This is a test campaign\",\n \"mode\": \"voice\",\n \"sms_session_ttl\": 720,\n \"label\": \"test\",\n \"labels\": [\n \"test\",\n \"demo\"\n ],\n \"daily_start_time\": \"09:00:00\",\n \"daily_end_time\": \"17:00:00\",\n \"source\": \"+19032900844\",\n \"hourly_rate\": 25,\n \"max_daily_calls\": 2500,\n \"retry_count\": 1,\n \"retry_interval\": \"30m\",\n \"voicemail_detection\": {\n \"voicemail_detection_overall_timeout\": 30,\n \"voicemail_detection_post_speech_timeout\": 1.75,\n \"voicemail_detection_pre_speech_timeout\": 3.5\n },\n \"allowed_line_types\": [\n \"mobile\",\n \"voip\"\n ],\n \"include_unknown_line_types\": true,\n \"target_filters\": {\n \"match\": \"any\",\n \"on_unknown\": \"include\",\n \"rules\": [\n {\n \"field\": \"line_type\",\n \"op\": \"in\",\n \"values\": [\n \"landline\",\n \"fixedVoip\",\n \"nonFixedVoip\"\n ]\n },\n {\n \"field\": \"carrier_name\",\n \"op\": \"in\",\n \"values\": [\n \"Onvoy, LLC - Sinch\"\n ]\n }\n ]\n },\n \"webhooks\": {\n \"request_method\": \"POST\",\n \"trigger_statuses\": [\n \"COMPLETED\"\n ],\n \"url\": \"https://example.com/hooks/syllable\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/outbound/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Syllable-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"campaign_name\": \"Outbound Campaign 1\",\n \"campaign_variables\": {\n \"key\": \"value\",\n \"key2\": \"value2\"\n },\n \"caller_id\": 19995551234,\n \"active_days\": \"[\\\"mon\\\", \\\"tue\\\", \\\"wed\\\", \\\"thu\\\", \\\"fri\\\"]\",\n \"description\": \"This is a test campaign\",\n \"mode\": \"voice\",\n \"sms_session_ttl\": 720,\n \"label\": \"test\",\n \"labels\": [\n \"test\",\n \"demo\"\n ],\n \"daily_start_time\": \"09:00:00\",\n \"daily_end_time\": \"17:00:00\",\n \"source\": \"+19032900844\",\n \"hourly_rate\": 25,\n \"max_daily_calls\": 2500,\n \"retry_count\": 1,\n \"retry_interval\": \"30m\",\n \"voicemail_detection\": {\n \"voicemail_detection_overall_timeout\": 30,\n \"voicemail_detection_post_speech_timeout\": 1.75,\n \"voicemail_detection_pre_speech_timeout\": 3.5\n },\n \"allowed_line_types\": [\n \"mobile\",\n \"voip\"\n ],\n \"include_unknown_line_types\": true,\n \"target_filters\": {\n \"match\": \"any\",\n \"on_unknown\": \"include\",\n \"rules\": [\n {\n \"field\": \"line_type\",\n \"op\": \"in\",\n \"values\": [\n \"landline\",\n \"fixedVoip\",\n \"nonFixedVoip\"\n ]\n },\n {\n \"field\": \"carrier_name\",\n \"op\": \"in\",\n \"values\": [\n \"Onvoy, LLC - Sinch\"\n ]\n }\n ]\n },\n \"webhooks\": {\n \"request_method\": \"POST\",\n \"trigger_statuses\": [\n \"COMPLETED\"\n ],\n \"url\": \"https://example.com/hooks/syllable\"\n }\n}"
response = http.request(request)
puts response.read_body{
"campaign_name": "Outbound Campaign 1",
"campaign_variables": {
"key": "value",
"key2": "value2"
},
"caller_id": 19995551234,
"active_days": "[\"mon\", \"tue\", \"wed\", \"thu\", \"fri\"]",
"id": 1,
"last_updated_by": "user@email.com",
"description": "This is a test campaign",
"mode": "voice",
"sms_session_ttl": 720,
"label": "test",
"labels": [
"test",
"demo"
],
"daily_start_time": "09:00:00",
"daily_end_time": "17:00:00",
"source": "+19032900844",
"hourly_rate": 25,
"max_daily_calls": 2500,
"retry_count": 1,
"retry_interval": "30m",
"voicemail_detection": {
"voicemail_detection_overall_timeout": 30,
"voicemail_detection_post_speech_timeout": 1.75,
"voicemail_detection_pre_speech_timeout": 3.5
},
"allowed_line_types": [
"mobile",
"voip"
],
"include_unknown_line_types": true,
"target_filters": {
"match": "any",
"on_unknown": "include",
"rules": [
{
"field": "line_type",
"op": "in",
"values": [
"landline",
"fixedVoip",
"nonFixedVoip"
]
},
{
"field": "carrier_name",
"op": "in",
"values": [
"Onvoy, LLC - Sinch"
]
}
]
},
"agent_id": "agent_id",
"created_at": "2026-08-20T00:00:00Z",
"updated_at": "2026-08-20T00:00:00Z",
"webhooks": {
"id": 1,
"request_method": "POST",
"trigger_statuses": [
"COMPLETED"
],
"url": "https://example.com/hooks/syllable"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update Outbound Communication Campaign
import os
from syllable_sdk import SyllableSDK, models
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.outbound.campaigns.update(campaign_id=187717, outbound_campaign_input=models.OutboundCampaignInput(
campaign_name="Outbound Campaign 1",
description="This is a test campaign",
mode="voice",
sms_session_ttl=720,
labels=[
"test",
"demo",
],
campaign_variables={
"key": "value",
"key2": "value2",
},
daily_start_time="09:00:00",
daily_end_time="17:00:00",
source="+19032900844",
caller_id="19995551234",
hourly_rate=25,
max_daily_calls=2500,
retry_count=1,
retry_interval="30m",
active_days=[
models.DaysOfWeek.MON,
models.DaysOfWeek.TUE,
models.DaysOfWeek.WED,
models.DaysOfWeek.THU,
models.DaysOfWeek.FRI,
],
voicemail_detection=models.VoicemailDetectionConfig(
voicemail_detection_overall_timeout=30,
voicemail_detection_pre_speech_timeout=3.5,
voicemail_detection_post_speech_timeout=1.75,
),
allowed_line_types=[
models.LineTypeBucket.MOBILE,
models.LineTypeBucket.VOIP,
],
target_filters=models.TargetFilters(
match=models.Match.ANY,
rules=[
models.TargetFilterRule(
field="line_type",
op=models.FilterOp.IN,
values=[
"landline",
"fixedVoip",
"nonFixedVoip",
],
),
models.TargetFilterRule(
field="carrier_name",
op=models.FilterOp.IN,
values=[
"Onvoy, LLC - Sinch",
],
),
],
),
webhooks=[
models.OutboundCampaignWebhookInput(
trigger_statuses=[
models.ChannelManagerStatus.COMPLETED,
],
url="https://example.com/hooks/syllable",
request_method="POST",
),
],
))
# Handle response
print(res)import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.outbound.campaigns.update({
campaignId: 679645,
outboundCampaignInput: {
campaignName: "Outbound Campaign 1",
description: "This is a test campaign",
mode: "voice",
smsSessionTtl: 720,
labels: [
"test",
"demo",
],
campaignVariables: {
"key": "value",
"key2": "value2",
},
dailyStartTime: "09:00:00",
dailyEndTime: "17:00:00",
source: "+19032900844",
callerId: "19995551234",
hourlyRate: 25,
maxDailyCalls: 2500,
retryCount: 1,
retryInterval: "30m",
activeDays: [
"mon",
"tue",
"wed",
"thu",
"fri",
],
voicemailDetection: {
voicemailDetectionOverallTimeout: 30,
voicemailDetectionPreSpeechTimeout: 3.5,
voicemailDetectionPostSpeechTimeout: 1.75,
},
allowedLineTypes: [
"mobile",
"voip",
],
targetFilters: {
match: "any",
rules: [
{
field: "line_type",
op: "in",
values: [
"landline",
"fixedVoip",
"nonFixedVoip",
],
},
{
field: "carrier_name",
op: "in",
values: [
"Onvoy, LLC - Sinch",
],
},
],
},
webhooks: [
{
triggerStatuses: [
"COMPLETED",
],
url: "https://example.com/hooks/syllable",
requestMethod: "POST",
},
],
},
});
console.log(result);
}
run();curl --request PUT \
--url https://api.syllable.cloud/api/v1/outbound/campaigns/{campaign_id} \
--header 'Content-Type: application/json' \
--header 'Syllable-API-Key: <api-key>' \
--data '
{
"campaign_name": "Outbound Campaign 1",
"campaign_variables": {
"key": "value",
"key2": "value2"
},
"caller_id": 19995551234,
"active_days": "[\"mon\", \"tue\", \"wed\", \"thu\", \"fri\"]",
"description": "This is a test campaign",
"mode": "voice",
"sms_session_ttl": 720,
"label": "test",
"labels": [
"test",
"demo"
],
"daily_start_time": "09:00:00",
"daily_end_time": "17:00:00",
"source": "+19032900844",
"hourly_rate": 25,
"max_daily_calls": 2500,
"retry_count": 1,
"retry_interval": "30m",
"voicemail_detection": {
"voicemail_detection_overall_timeout": 30,
"voicemail_detection_post_speech_timeout": 1.75,
"voicemail_detection_pre_speech_timeout": 3.5
},
"allowed_line_types": [
"mobile",
"voip"
],
"include_unknown_line_types": true,
"target_filters": {
"match": "any",
"on_unknown": "include",
"rules": [
{
"field": "line_type",
"op": "in",
"values": [
"landline",
"fixedVoip",
"nonFixedVoip"
]
},
{
"field": "carrier_name",
"op": "in",
"values": [
"Onvoy, LLC - Sinch"
]
}
]
},
"webhooks": {
"request_method": "POST",
"trigger_statuses": [
"COMPLETED"
],
"url": "https://example.com/hooks/syllable"
}
}
'const options = {
method: 'PUT',
headers: {'Syllable-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
campaign_name: 'Outbound Campaign 1',
campaign_variables: {key: 'value', key2: 'value2'},
caller_id: 19995551234,
active_days: '["mon", "tue", "wed", "thu", "fri"]',
description: 'This is a test campaign',
mode: 'voice',
sms_session_ttl: 720,
label: 'test',
labels: ['test', 'demo'],
daily_start_time: '09:00:00',
daily_end_time: '17:00:00',
source: '+19032900844',
hourly_rate: 25,
max_daily_calls: 2500,
retry_count: 1,
retry_interval: '30m',
voicemail_detection: {
voicemail_detection_overall_timeout: 30,
voicemail_detection_post_speech_timeout: 1.75,
voicemail_detection_pre_speech_timeout: 3.5
},
allowed_line_types: ['mobile', 'voip'],
include_unknown_line_types: true,
target_filters: {
match: 'any',
on_unknown: 'include',
rules: [
{
field: 'line_type',
op: 'in',
values: ['landline', 'fixedVoip', 'nonFixedVoip']
},
{field: 'carrier_name', op: 'in', values: ['Onvoy, LLC - Sinch']}
]
},
webhooks: {
request_method: 'POST',
trigger_statuses: ['COMPLETED'],
url: 'https://example.com/hooks/syllable'
}
})
};
fetch('https://api.syllable.cloud/api/v1/outbound/campaigns/{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://api.syllable.cloud/api/v1/outbound/campaigns/{campaign_id}",
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([
'campaign_name' => 'Outbound Campaign 1',
'campaign_variables' => [
'key' => 'value',
'key2' => 'value2'
],
'caller_id' => 19995551234,
'active_days' => '["mon", "tue", "wed", "thu", "fri"]',
'description' => 'This is a test campaign',
'mode' => 'voice',
'sms_session_ttl' => 720,
'label' => 'test',
'labels' => [
'test',
'demo'
],
'daily_start_time' => '09:00:00',
'daily_end_time' => '17:00:00',
'source' => '+19032900844',
'hourly_rate' => 25,
'max_daily_calls' => 2500,
'retry_count' => 1,
'retry_interval' => '30m',
'voicemail_detection' => [
'voicemail_detection_overall_timeout' => 30,
'voicemail_detection_post_speech_timeout' => 1.75,
'voicemail_detection_pre_speech_timeout' => 3.5
],
'allowed_line_types' => [
'mobile',
'voip'
],
'include_unknown_line_types' => true,
'target_filters' => [
'match' => 'any',
'on_unknown' => 'include',
'rules' => [
[
'field' => 'line_type',
'op' => 'in',
'values' => [
'landline',
'fixedVoip',
'nonFixedVoip'
]
],
[
'field' => 'carrier_name',
'op' => 'in',
'values' => [
'Onvoy, LLC - Sinch'
]
]
]
],
'webhooks' => [
'request_method' => 'POST',
'trigger_statuses' => [
'COMPLETED'
],
'url' => 'https://example.com/hooks/syllable'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Syllable-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.syllable.cloud/api/v1/outbound/campaigns/{campaign_id}"
payload := strings.NewReader("{\n \"campaign_name\": \"Outbound Campaign 1\",\n \"campaign_variables\": {\n \"key\": \"value\",\n \"key2\": \"value2\"\n },\n \"caller_id\": 19995551234,\n \"active_days\": \"[\\\"mon\\\", \\\"tue\\\", \\\"wed\\\", \\\"thu\\\", \\\"fri\\\"]\",\n \"description\": \"This is a test campaign\",\n \"mode\": \"voice\",\n \"sms_session_ttl\": 720,\n \"label\": \"test\",\n \"labels\": [\n \"test\",\n \"demo\"\n ],\n \"daily_start_time\": \"09:00:00\",\n \"daily_end_time\": \"17:00:00\",\n \"source\": \"+19032900844\",\n \"hourly_rate\": 25,\n \"max_daily_calls\": 2500,\n \"retry_count\": 1,\n \"retry_interval\": \"30m\",\n \"voicemail_detection\": {\n \"voicemail_detection_overall_timeout\": 30,\n \"voicemail_detection_post_speech_timeout\": 1.75,\n \"voicemail_detection_pre_speech_timeout\": 3.5\n },\n \"allowed_line_types\": [\n \"mobile\",\n \"voip\"\n ],\n \"include_unknown_line_types\": true,\n \"target_filters\": {\n \"match\": \"any\",\n \"on_unknown\": \"include\",\n \"rules\": [\n {\n \"field\": \"line_type\",\n \"op\": \"in\",\n \"values\": [\n \"landline\",\n \"fixedVoip\",\n \"nonFixedVoip\"\n ]\n },\n {\n \"field\": \"carrier_name\",\n \"op\": \"in\",\n \"values\": [\n \"Onvoy, LLC - Sinch\"\n ]\n }\n ]\n },\n \"webhooks\": {\n \"request_method\": \"POST\",\n \"trigger_statuses\": [\n \"COMPLETED\"\n ],\n \"url\": \"https://example.com/hooks/syllable\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Syllable-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.put("https://api.syllable.cloud/api/v1/outbound/campaigns/{campaign_id}")
.header("Syllable-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"campaign_name\": \"Outbound Campaign 1\",\n \"campaign_variables\": {\n \"key\": \"value\",\n \"key2\": \"value2\"\n },\n \"caller_id\": 19995551234,\n \"active_days\": \"[\\\"mon\\\", \\\"tue\\\", \\\"wed\\\", \\\"thu\\\", \\\"fri\\\"]\",\n \"description\": \"This is a test campaign\",\n \"mode\": \"voice\",\n \"sms_session_ttl\": 720,\n \"label\": \"test\",\n \"labels\": [\n \"test\",\n \"demo\"\n ],\n \"daily_start_time\": \"09:00:00\",\n \"daily_end_time\": \"17:00:00\",\n \"source\": \"+19032900844\",\n \"hourly_rate\": 25,\n \"max_daily_calls\": 2500,\n \"retry_count\": 1,\n \"retry_interval\": \"30m\",\n \"voicemail_detection\": {\n \"voicemail_detection_overall_timeout\": 30,\n \"voicemail_detection_post_speech_timeout\": 1.75,\n \"voicemail_detection_pre_speech_timeout\": 3.5\n },\n \"allowed_line_types\": [\n \"mobile\",\n \"voip\"\n ],\n \"include_unknown_line_types\": true,\n \"target_filters\": {\n \"match\": \"any\",\n \"on_unknown\": \"include\",\n \"rules\": [\n {\n \"field\": \"line_type\",\n \"op\": \"in\",\n \"values\": [\n \"landline\",\n \"fixedVoip\",\n \"nonFixedVoip\"\n ]\n },\n {\n \"field\": \"carrier_name\",\n \"op\": \"in\",\n \"values\": [\n \"Onvoy, LLC - Sinch\"\n ]\n }\n ]\n },\n \"webhooks\": {\n \"request_method\": \"POST\",\n \"trigger_statuses\": [\n \"COMPLETED\"\n ],\n \"url\": \"https://example.com/hooks/syllable\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/outbound/campaigns/{campaign_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Syllable-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"campaign_name\": \"Outbound Campaign 1\",\n \"campaign_variables\": {\n \"key\": \"value\",\n \"key2\": \"value2\"\n },\n \"caller_id\": 19995551234,\n \"active_days\": \"[\\\"mon\\\", \\\"tue\\\", \\\"wed\\\", \\\"thu\\\", \\\"fri\\\"]\",\n \"description\": \"This is a test campaign\",\n \"mode\": \"voice\",\n \"sms_session_ttl\": 720,\n \"label\": \"test\",\n \"labels\": [\n \"test\",\n \"demo\"\n ],\n \"daily_start_time\": \"09:00:00\",\n \"daily_end_time\": \"17:00:00\",\n \"source\": \"+19032900844\",\n \"hourly_rate\": 25,\n \"max_daily_calls\": 2500,\n \"retry_count\": 1,\n \"retry_interval\": \"30m\",\n \"voicemail_detection\": {\n \"voicemail_detection_overall_timeout\": 30,\n \"voicemail_detection_post_speech_timeout\": 1.75,\n \"voicemail_detection_pre_speech_timeout\": 3.5\n },\n \"allowed_line_types\": [\n \"mobile\",\n \"voip\"\n ],\n \"include_unknown_line_types\": true,\n \"target_filters\": {\n \"match\": \"any\",\n \"on_unknown\": \"include\",\n \"rules\": [\n {\n \"field\": \"line_type\",\n \"op\": \"in\",\n \"values\": [\n \"landline\",\n \"fixedVoip\",\n \"nonFixedVoip\"\n ]\n },\n {\n \"field\": \"carrier_name\",\n \"op\": \"in\",\n \"values\": [\n \"Onvoy, LLC - Sinch\"\n ]\n }\n ]\n },\n \"webhooks\": {\n \"request_method\": \"POST\",\n \"trigger_statuses\": [\n \"COMPLETED\"\n ],\n \"url\": \"https://example.com/hooks/syllable\"\n }\n}"
response = http.request(request)
puts response.read_body{
"campaign_name": "Outbound Campaign 1",
"campaign_variables": {
"key": "value",
"key2": "value2"
},
"caller_id": 19995551234,
"active_days": "[\"mon\", \"tue\", \"wed\", \"thu\", \"fri\"]",
"id": 1,
"last_updated_by": "user@email.com",
"description": "This is a test campaign",
"mode": "voice",
"sms_session_ttl": 720,
"label": "test",
"labels": [
"test",
"demo"
],
"daily_start_time": "09:00:00",
"daily_end_time": "17:00:00",
"source": "+19032900844",
"hourly_rate": 25,
"max_daily_calls": 2500,
"retry_count": 1,
"retry_interval": "30m",
"voicemail_detection": {
"voicemail_detection_overall_timeout": 30,
"voicemail_detection_post_speech_timeout": 1.75,
"voicemail_detection_pre_speech_timeout": 3.5
},
"allowed_line_types": [
"mobile",
"voip"
],
"include_unknown_line_types": true,
"target_filters": {
"match": "any",
"on_unknown": "include",
"rules": [
{
"field": "line_type",
"op": "in",
"values": [
"landline",
"fixedVoip",
"nonFixedVoip"
]
},
{
"field": "carrier_name",
"op": "in",
"values": [
"Onvoy, LLC - Sinch"
]
}
]
},
"agent_id": "agent_id",
"created_at": "2026-08-20T00:00:00Z",
"updated_at": "2026-08-20T00:00:00Z",
"webhooks": {
"id": 1,
"request_method": "POST",
"trigger_statuses": [
"COMPLETED"
],
"url": "https://example.com/hooks/syllable"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Body
Human readable name of campaign
"Outbound Campaign 1"
Variables for campaign
Show child attributes
Show child attributes
{ "key": "value", "key2": "value2" }
Caller ID for call
19995551234
Days of the week when campaign is active
Enum representing days of the week.
mon, tue, wed, thu, fri, sat, sun "[\"mon\", \"tue\", \"wed\", \"thu\", \"fri\"]"
Description of campaign
"This is a test campaign"
Mode of the campaign (e.g. voice, sms, email)
"voice"
Time to live for SMS session in minutes
720
Label for campaign (DEPRECATED - use labels instead)
"test"
Labels for campaign
["test", "demo"]
Start time of campaign each day
"09:00:00"
End time of campaign each day
"17:00:00"
Source phone number, email, or SMS number
"+19032900844"
Target number of outreach calls per hour
1 <= x <= 360025
Maximum number of outreach calls per day
2500
Number of retries per target
1
How long to wait before retrying
"30m"
Config for voicemail detection for voice campaigns. Set to None to disable.
Show child attributes
Show child attributes
{
"voicemail_detection_overall_timeout": 30,
"voicemail_detection_post_speech_timeout": 1.75,
"voicemail_detection_pre_speech_timeout": 3.5
}
Line-type buckets this campaign is allowed to dial. Empty or omitted means no filter (all line types are dialed).
Friendly line-type buckets a campaign can be restricted to dial.
These map to raw Twilio Lookup v2 line types via
lib.twilio.line_type_lookup.LINE_TYPE_BUCKETS.
mobile, landline, voip ["mobile", "voip"]
When a line-type filter is active, whether to also dial numbers whose line type is unknown or could not be classified. Has no effect when allowed_line_types is empty.
true
Generic target filter (a flat rule list over request enrichment attributes such as line_type, carrier_name, mcc, mnc). When set, takes precedence over allowed_line_types / include_unknown_line_types. Omitted or null means those legacy fields are used instead.
Show child attributes
Show child attributes
{
"match": "any",
"on_unknown": "include",
"rules": [
{
"field": "line_type",
"op": "in",
"values": ["landline", "fixedVoip", "nonFixedVoip"]
},
{
"field": "carrier_name",
"op": "in",
"values": ["Onvoy, LLC - Sinch"]
}
]
}
Webhooks for campaign
Show child attributes
Show child attributes
{
"request_method": "POST",
"trigger_statuses": ["COMPLETED"],
"url": "https://example.com/hooks/syllable"
}
Response
Successful Response
Human readable name of campaign
"Outbound Campaign 1"
Variables for campaign
Show child attributes
Show child attributes
{ "key": "value", "key2": "value2" }
Caller ID for call
19995551234
Days of the week when campaign is active
Enum representing days of the week.
mon, tue, wed, thu, fri, sat, sun "[\"mon\", \"tue\", \"wed\", \"thu\", \"fri\"]"
Unique ID for campaign
1
Email of user who last updated campaign
"user@email.com"
Description of campaign
"This is a test campaign"
Mode of the campaign (e.g. voice, sms, email)
"voice"
Time to live for SMS session in minutes
720
Label for campaign (DEPRECATED - use labels instead)
"test"
Labels for campaign
["test", "demo"]
Start time of campaign each day
"09:00:00"
End time of campaign each day
"17:00:00"
Source phone number, email, or SMS number
"+19032900844"
Target number of outreach calls per hour
1 <= x <= 360025
Maximum number of outreach calls per day
2500
Number of retries per target
1
How long to wait before retrying
"30m"
Config for voicemail detection for voice campaigns. Set to None to disable.
Show child attributes
Show child attributes
{
"voicemail_detection_overall_timeout": 30,
"voicemail_detection_post_speech_timeout": 1.75,
"voicemail_detection_pre_speech_timeout": 3.5
}
Line-type buckets this campaign is allowed to dial. Empty or omitted means no filter (all line types are dialed).
Friendly line-type buckets a campaign can be restricted to dial.
These map to raw Twilio Lookup v2 line types via
lib.twilio.line_type_lookup.LINE_TYPE_BUCKETS.
mobile, landline, voip ["mobile", "voip"]
When a line-type filter is active, whether to also dial numbers whose line type is unknown or could not be classified. Has no effect when allowed_line_types is empty.
true
Generic target filter (a flat rule list over request enrichment attributes such as line_type, carrier_name, mcc, mnc). When set, takes precedence over allowed_line_types / include_unknown_line_types. Omitted or null means those legacy fields are used instead.
Show child attributes
Show child attributes
{
"match": "any",
"on_unknown": "include",
"rules": [
{
"field": "line_type",
"op": "in",
"values": ["landline", "fixedVoip", "nonFixedVoip"]
},
{
"field": "carrier_name",
"op": "in",
"values": ["Onvoy, LLC - Sinch"]
}
]
}
ID of agent assigned to campaign
"agent_id"
Timestamp of campaign creation
"2026-08-20T00:00:00Z"
Timestamp of campaign update
"2026-08-20T00:00:00Z"
Webhooks for campaign
Show child attributes
Show child attributes
{
"id": 1,
"request_method": "POST",
"trigger_statuses": ["COMPLETED"],
"url": "https://example.com/hooks/syllable"
}

