Skip to main content
PUT
/
api
/
v1
/
outbound
/
campaigns
/
{campaign_id}
Python (SDK)
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=679645, outbound_campaign_input={
        "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,
        "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": {
            "voicemail_detection_overall_timeout": 30,
            "voicemail_detection_post_speech_timeout": 1.75,
            "voicemail_detection_pre_speech_timeout": 3.5,
        },
    })

    # Handle response
    print(res)
{
  "campaign_name": "<string>",
  "campaign_variables": {},
  "caller_id": 19995551234,
  "active_days": [
    "mon"
  ],
  "id": 123,
  "last_updated_by": "<string>",
  "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": 1,
  "retry_count": 0,
  "retry_interval": "30m",
  "voicemail_detection": {
    "voicemail_detection_overall_timeout": 30,
    "voicemail_detection_post_speech_timeout": 1.75,
    "voicemail_detection_pre_speech_timeout": 3.5
  },
  "agent_id": "agent_id",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Syllable-API-Key
string
header
required

Path Parameters

campaign_id
integer
required

Body

application/json
campaign_name
string
required

Human readable name of campaign

campaign_variables
Campaign Variables · object
required

Variables for campaign

caller_id
string | null
required

Caller ID for call

Example:

19995551234

active_days
enum<string>[]
required

Days of the week when campaign is active

Enum representing days of the week.

Available options:
mon,
tue,
wed,
thu,
fri,
sat,
sun
description
string | null

Description of campaign

Example:

"This is a test campaign"

mode
string | null

Mode of the campaign (e.g. voice, sms)

Example:

"voice"

sms_session_ttl
integer | null

Time to live for SMS session in minutes

Example:

720

label
string | null
deprecated

Label for campaign (DEPRECATED - use labels instead)

Example:

"test"

labels
string[] | null

Labels for campaign

Example:
["test", "demo"]
daily_start_time
string | null

Start time of campaign each day

Example:

"09:00:00"

daily_end_time
string | null

End time of campaign each day

Example:

"17:00:00"

source
string | null

Source phone number, email, or SMS number

Example:

"+19032900844"

hourly_rate
integer
default:1

Target number of outreach calls per hour

retry_count
integer
default:0

Number of retries per target

retry_interval
string | null

How long to wait before retrying

Example:

"30m"

voicemail_detection
Voicemail Detection · object

Config for voicemail detection for voice campaigns. Set to None to disable.

Example:
{
"voicemail_detection_overall_timeout": 30,
"voicemail_detection_post_speech_timeout": 1.75,
"voicemail_detection_pre_speech_timeout": 3.5
}

Response

Successful Response

campaign_name
string
required

Human readable name of campaign

campaign_variables
Campaign Variables · object
required

Variables for campaign

caller_id
string | null
required

Caller ID for call

Example:

19995551234

active_days
enum<string>[]
required

Days of the week when campaign is active

Enum representing days of the week.

Available options:
mon,
tue,
wed,
thu,
fri,
sat,
sun
id
integer
required

Unique ID for campaign

last_updated_by
string
required

Email of user who last updated campaign

description
string | null

Description of campaign

Example:

"This is a test campaign"

mode
string | null

Mode of the campaign (e.g. voice, sms)

Example:

"voice"

sms_session_ttl
integer | null

Time to live for SMS session in minutes

Example:

720

label
string | null
deprecated

Label for campaign (DEPRECATED - use labels instead)

Example:

"test"

labels
string[] | null

Labels for campaign

Example:
["test", "demo"]
daily_start_time
string | null

Start time of campaign each day

Example:

"09:00:00"

daily_end_time
string | null

End time of campaign each day

Example:

"17:00:00"

source
string | null

Source phone number, email, or SMS number

Example:

"+19032900844"

hourly_rate
integer
default:1

Target number of outreach calls per hour

retry_count
integer
default:0

Number of retries per target

retry_interval
string | null

How long to wait before retrying

Example:

"30m"

voicemail_detection
Voicemail Detection · object

Config for voicemail detection for voice campaigns. Set to None to disable.

Example:
{
"voicemail_detection_overall_timeout": 30,
"voicemail_detection_post_speech_timeout": 1.75,
"voicemail_detection_pre_speech_timeout": 3.5
}
agent_id
integer | null

ID of agent assigned to campaign

Example:

"agent_id"

created_at
string<date-time>

Timestamp of campaign creation

updated_at
string<date-time>

Timestamp of campaign update