Update Outbound Communication Campaign
/api/v1/outbound/campaigns/{campaign_id}Authentication
Syllable-API-KeyrequiredSend Syllable-API-Key in the header.
Need a credential? Create or manage an API token in the Syllable Console.
Parameters
Path parameters
campaign_id
integer
path
required
Request body
application/json
body
OutboundCampaignInput
required
22 fields
campaign_namestringrequiredHuman readable name of campaign
descriptionstring | nulloptionalDescription of campaign
modestring | nulloptionalMode of the campaign (e.g. voice, sms, email)
sms_session_ttlinteger | nulloptionalTime to live for SMS session in minutes
labelstring | nulloptionalLabel for campaign (DEPRECATED - use labels instead)
labelsstring[] | nulloptionalLabels for campaign
Item schema
itemsstringrequiredcampaign_variablesobjectrequiredVariables for campaign
1 field
{key}stringoptionaldaily_start_timestring | nulloptionalStart time of campaign each day
daily_end_timestring | nulloptionalEnd time of campaign each day
sourcestring | nulloptionalSource phone number, email, or SMS number
caller_idstring | nullrequiredCaller ID for call
hourly_rateintegeroptionalTarget number of outreach calls per hour
1Minimum 1Maximum 3600max_daily_callsinteger | nulloptionalMaximum number of outreach calls per day
retry_countintegeroptionalNumber of retries per target
0retry_intervalstring | nulloptionalHow long to wait before retrying
active_daysenum<string>[]requiredDays of the week when campaign is active
Item schema
itemsenum<string>requiredEnum representing days of the week.
["mon","tue","wed","thu","fri","sat","sun"]outreach_override_rulesOutreachOverrideRules | nulloptionalWeekday-, holiday- and date-specific outreach windows and daily maximums. The most specific rule wins: date, then holiday, then weekday, then the campaign defaults above. On create, omitted or null means no rules: the campaign defaults apply to every active day. On update: omitted keeps all stored rules. Null removes the weekday and date rules but keeps the stored holiday rules. An object replaces the weekday and date rules, and replaces the holiday rules only when it includes holidays. To remove all rules, send {"holidays": {}}.
3 options
daysobjectoptionalRules by weekday. Full names (monday) and short names (mon) are both accepted; they are stored as short names. Days that are absent use the campaign defaults.
1 field
{key}ScheduleOverrideoptionalOutreach window and/or daily cap for one weekday, one named holiday or one calendar date.
Every field may be omitted, and an omitted field inherits the campaign default: an override that only sets `max_daily_calls keeps the campaign window, and one that only sets the times keeps the campaign cap. max_daily_calls: 0 is not inheritance -- it means no outreach on this day. It closes the day for retries as well as for first attempts, the same way active: false` does; a non-zero maximum bounds first attempts only and lets retries run on.
4 fields
activeboolean | nulloptionalWhether the campaign does outreach on this day. Omitted inherits: a weekday rule inherits from active_days, a holiday rule from the weekday rule, and a date rule from the holiday rule. Set it to false to exclude the day: no outreach goes out, retries included.
daily_start_timestring | nulloptionalStart time on this day. Omitted keeps the campaign start time.
daily_end_timestring | nulloptionalEnd time on this day. Omitted keeps the campaign end time.
max_daily_callsinteger | nulloptionalMaximum number of unique reference IDs that get outreach on this day. Omitted keeps the campaign maximum. Retries do not count towards it and keep dialing once it is reached. 0 is different: it closes the day for all outreach, retries included.
0datesobjectoptionalRules by calendar date, keyed YYYY-MM-DD. A date rule wins over the holiday and weekday rules for that date.
1 field
{key}ScheduleOverridereference defined aboveOutreach window and/or daily cap for one weekday, one named holiday or one calendar date.
Every field may be omitted, and an omitted field inherits the campaign default: an override that only sets `max_daily_calls keeps the campaign window, and one that only sets the times keeps the campaign cap. max_daily_calls: 0 is not inheritance -- it means no outreach on this day. It closes the day for retries as well as for first attempts, the same way active: false` does; a non-zero maximum bounds first attempts only and lets retries run on.
holidaysobjectoptionalRules by named US holiday, including the Observed variants. They apply every year on the date the holiday falls, so no new rule is needed each year. Holiday names and aliases are the same as in message rules (for example christmas, July 4th) and are stored as the canonical name. A holiday rule wins over the weekday rule, and a date rule wins over the holiday rule. When two holidays with rules fall on the same date, the most restrictive value of each field applies. Set active to false or max_daily_calls to 0 to exclude the holiday. On update, the stored holiday rules are kept when this field is omitted, and also when outreach_override_rules is null. Set this field to {} to remove them.
1 field
{key}ScheduleOverridereference defined aboveOutreach window and/or daily cap for one weekday, one named holiday or one calendar date.
Every field may be omitted, and an omitted field inherits the campaign default: an override that only sets `max_daily_calls keeps the campaign window, and one that only sets the times keeps the campaign cap. max_daily_calls: 0 is not inheritance -- it means no outreach on this day. It closes the day for retries as well as for first attempts, the same way active: false` does; a non-zero maximum bounds first attempts only and lets retries run on.
voicemail_detectionVoicemailDetectionConfig | nulloptionalConfig for voicemail detection for voice campaigns. Set to None to disable.
6 options
modeenum<string> | nulloptionalVoicemail-detection strategy: 'v1' (original check_voicemail/leave_voicemail) or 'v2' (Voicemail Detection 2, which suppresses the turn-0 greeting and uses the greeting tool). The two modes are mutually exclusive. Omitted/null on legacy v1 campaigns is treated as v1.
["v1","v2"]voicemail_detection_overall_timeoutnumber | nulloptionalvoicemail_detection_pre_speech_timeoutnumber | nulloptionalvoicemail_detection_post_speech_timeoutnumber | nulloptionalvoicemail_detection_speech_thresholdnumber | nulloptionalvoicemail_detection_v2_pre_speech_timeoutnumber | nulloptionalallowed_line_typesenum<string>[] | nulloptionalLine-type buckets this campaign is allowed to dial. Empty or omitted means no filter (all line types are dialed).
Item schema
itemsenum<string>requiredFriendly 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"]include_unknown_line_typesbooleanoptionalWhen 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.
truetarget_filtersTargetFilters | nulloptionalGeneric target filter (a flat rule list over request enrichment attributes such as line_type, caller_type, caller_name, 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. Rules on caller_type / caller_name are resolved by Twilio's separately billed caller_name (CNAM) lookup, which only returns data for US numbers.
3 options
matchenum<string>optionalHow to combine rules: 'all' (AND) or 'any' (OR).
["all","any"]Default allon_unknownenum<string>optionalWhether to dial requests whose enrichment is unresolved (no lookup data). Applied per rule: it decides what a rule contributes when that rule's attribute is unresolved, and never overrides a rule the request definitively failed -- so a request that fails one rule is still skipped even if a different rule's attribute is missing. "Unresolved" covers a missing value and also the value Twilio returns to mean "looked up, could not answer": for line_type that is 'unknown' (a valid number whose line type it could not determine), and for caller_type both no CNAM data at all (non-US numbers) and 'UNDETERMINED' (a US number it looked up but could not classify).
["include","exclude"]Default includerulesTargetFilterRule[]optionalPredicates over request enrichment attributes. Empty means no filter.
Item schema
itemsTargetFilterRulerequiredA single predicate over one enrichment attribute of an outbound request.
`field names a key in the request's enrichment payload (e.g. line_type, caller_type, caller_name, carrier_name, mcc, mnc`). Any attribute captured at lookup time can be filtered on with no code change.
Which Twilio Lookup data packages get requested (and billed) for a campaign is derived from the fields its rules reference, so a rule on `caller_type / caller_name is what turns on the separately billed caller_name` package.
3 fields
fieldstringrequiredEnrichment attribute to match on (a key in the request enrichment payload).
openum<string>requiredComparison operator.
["in","not_in","eq","neq","exists","not_exists"]valuesstring[]optionalValues to compare against. Ignored for exists / not_exists.
Item schema
itemsstringrequiredwebhooksOutboundCampaignWebhookInput[]optionalWebhooks for campaign
[]Item schema
itemsOutboundCampaignWebhookInputrequired5 fields
trigger_statusesenum<string>[]requiredCondition expression evaluated when the trigger fires
Item schema
itemsenum<string>requiredStatus of an outbound communication request (voice, SMS, or email).
["PENDING","DUPLICATE","INVALID","UNEXPECTED_ERROR","FILTERED_LINE_TYPE","NO_OUTCOME","PROCESSED","DROPPED","DEFERRED","BOUNCED","DELIVERED","OPENED","CLICKED","SPAM_REPORT","UNSUBSCRIBED","PRIOR_UNSUBSCRIBED","PRIOR_SPAM_REPORT","PRIOR_DROPPED","PRIOR_BOUNCED","SENT","ACCEPTED","QUEUED","SENDING","UNDELIVERED","DELIVERY_UNKNOWN","DELIVERY_FAILED","IN-PROGRESS","BUSY","CANCELED","COMPLETED","DECLINED","NO-ANSWER","MACHINE","HUMAN","UNKNOWN","FAILED","SIP_NOT_FOUND","SIP_TEMPORARILY_UNAVAILABLE","SIP_LOOP_DETECTED","SIP_DOES_NOT_EXIST_ANYWHERE"]urlstringrequiredHTTPS URL to which to send the webhook payload
request_methodstringrequiredHTTP method for the outbound request (POST, PUT, or PATCH)
idinteger | nulloptionalUnique ID for webhook, if updating an existing webhook
auth_valuesobject | nulloptionalOptional dict of auth values. Currently, only the key "hmac_secret" is allowed; value must be standard Base64 (RFC 4648) decoding to 32–512 bytes of key material. On update, leave a value for a given key null and the stored value for that key is kept. (If a key is omitted entirely, any existing value for that key is removed.)
1 options
{key}string | nulloptionalRequest example
{
"campaign_name": "string",
"description": "string",
"mode": "string",
"sms_session_ttl": "string",
"label": "string",
"labels": "string",
"campaign_variables": "string",
"daily_start_time": "string",
"daily_end_time": "string",
"source": "string",
"caller_id": "string",
"hourly_rate": 1,
"max_daily_calls": "string",
"retry_count": 0,
"retry_interval": "string",
"active_days": [
"string"
],
"outreach_override_rules": "string",
"voicemail_detection": "string",
"allowed_line_types": "string",
"include_unknown_line_types": true,
"target_filters": "string",
"webhooks": []
}Responses
200Successful Response
application/json
response
OutboundCampaign
required
27 fields
campaign_namestringrequiredHuman readable name of campaign
descriptionstring | nulloptionalDescription of campaign
modestring | nulloptionalMode of the campaign (e.g. voice, sms, email)
sms_session_ttlinteger | nulloptionalTime to live for SMS session in minutes
labelstring | nulloptionalLabel for campaign (DEPRECATED - use labels instead)
labelsstring[] | nulloptionalLabels for campaign
Item schema
itemsstringrequiredcampaign_variablesobjectrequiredVariables for campaign
1 field
{key}stringoptionaldaily_start_timestring | nulloptionalStart time of campaign each day
daily_end_timestring | nulloptionalEnd time of campaign each day
sourcestring | nulloptionalSource phone number, email, or SMS number
caller_idstring | nullrequiredCaller ID for call
hourly_rateintegeroptionalTarget number of outreach calls per hour
1Minimum 1Maximum 3600max_daily_callsinteger | nulloptionalMaximum number of outreach calls per day
retry_countintegeroptionalNumber of retries per target
0retry_intervalstring | nulloptionalHow long to wait before retrying
active_daysenum<string>[]requiredDays of the week when campaign is active
Item schema
itemsenum<string>requiredEnum representing days of the week.
["mon","tue","wed","thu","fri","sat","sun"]outreach_override_rulesOutreachOverrideRules | nulloptionalWeekday-, holiday- and date-specific outreach windows and daily maximums. The most specific rule wins: date, then holiday, then weekday, then the campaign defaults above. On create, omitted or null means no rules: the campaign defaults apply to every active day. On update: omitted keeps all stored rules. Null removes the weekday and date rules but keeps the stored holiday rules. An object replaces the weekday and date rules, and replaces the holiday rules only when it includes holidays. To remove all rules, send {"holidays": {}}.
3 options
daysobjectoptionalRules by weekday. Full names (monday) and short names (mon) are both accepted; they are stored as short names. Days that are absent use the campaign defaults.
1 field
{key}ScheduleOverrideoptionalOutreach window and/or daily cap for one weekday, one named holiday or one calendar date.
Every field may be omitted, and an omitted field inherits the campaign default: an override that only sets `max_daily_calls keeps the campaign window, and one that only sets the times keeps the campaign cap. max_daily_calls: 0 is not inheritance -- it means no outreach on this day. It closes the day for retries as well as for first attempts, the same way active: false` does; a non-zero maximum bounds first attempts only and lets retries run on.
4 fields
activeboolean | nulloptionalWhether the campaign does outreach on this day. Omitted inherits: a weekday rule inherits from active_days, a holiday rule from the weekday rule, and a date rule from the holiday rule. Set it to false to exclude the day: no outreach goes out, retries included.
daily_start_timestring | nulloptionalStart time on this day. Omitted keeps the campaign start time.
daily_end_timestring | nulloptionalEnd time on this day. Omitted keeps the campaign end time.
max_daily_callsinteger | nulloptionalMaximum number of unique reference IDs that get outreach on this day. Omitted keeps the campaign maximum. Retries do not count towards it and keep dialing once it is reached. 0 is different: it closes the day for all outreach, retries included.
0datesobjectoptionalRules by calendar date, keyed YYYY-MM-DD. A date rule wins over the holiday and weekday rules for that date.
1 field
{key}ScheduleOverridereference defined aboveOutreach window and/or daily cap for one weekday, one named holiday or one calendar date.
Every field may be omitted, and an omitted field inherits the campaign default: an override that only sets `max_daily_calls keeps the campaign window, and one that only sets the times keeps the campaign cap. max_daily_calls: 0 is not inheritance -- it means no outreach on this day. It closes the day for retries as well as for first attempts, the same way active: false` does; a non-zero maximum bounds first attempts only and lets retries run on.
holidaysobjectoptionalRules by named US holiday, including the Observed variants. They apply every year on the date the holiday falls, so no new rule is needed each year. Holiday names and aliases are the same as in message rules (for example christmas, July 4th) and are stored as the canonical name. A holiday rule wins over the weekday rule, and a date rule wins over the holiday rule. When two holidays with rules fall on the same date, the most restrictive value of each field applies. Set active to false or max_daily_calls to 0 to exclude the holiday. On update, the stored holiday rules are kept when this field is omitted, and also when outreach_override_rules is null. Set this field to {} to remove them.
1 field
{key}ScheduleOverridereference defined aboveOutreach window and/or daily cap for one weekday, one named holiday or one calendar date.
Every field may be omitted, and an omitted field inherits the campaign default: an override that only sets `max_daily_calls keeps the campaign window, and one that only sets the times keeps the campaign cap. max_daily_calls: 0 is not inheritance -- it means no outreach on this day. It closes the day for retries as well as for first attempts, the same way active: false` does; a non-zero maximum bounds first attempts only and lets retries run on.
voicemail_detectionVoicemailDetectionConfig | nulloptionalConfig for voicemail detection for voice campaigns. Set to None to disable.
6 options
modeenum<string> | nulloptionalVoicemail-detection strategy: 'v1' (original check_voicemail/leave_voicemail) or 'v2' (Voicemail Detection 2, which suppresses the turn-0 greeting and uses the greeting tool). The two modes are mutually exclusive. Omitted/null on legacy v1 campaigns is treated as v1.
["v1","v2"]voicemail_detection_overall_timeoutnumber | nulloptionalvoicemail_detection_pre_speech_timeoutnumber | nulloptionalvoicemail_detection_post_speech_timeoutnumber | nulloptionalvoicemail_detection_speech_thresholdnumber | nulloptionalvoicemail_detection_v2_pre_speech_timeoutnumber | nulloptionalallowed_line_typesenum<string>[] | nulloptionalLine-type buckets this campaign is allowed to dial. Empty or omitted means no filter (all line types are dialed).
Item schema
itemsenum<string>requiredFriendly 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"]include_unknown_line_typesbooleanoptionalWhen 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.
truetarget_filtersTargetFilters | nulloptionalGeneric target filter (a flat rule list over request enrichment attributes such as line_type, caller_type, caller_name, 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. Rules on caller_type / caller_name are resolved by Twilio's separately billed caller_name (CNAM) lookup, which only returns data for US numbers.
3 options
matchenum<string>optionalHow to combine rules: 'all' (AND) or 'any' (OR).
["all","any"]Default allon_unknownenum<string>optionalWhether to dial requests whose enrichment is unresolved (no lookup data). Applied per rule: it decides what a rule contributes when that rule's attribute is unresolved, and never overrides a rule the request definitively failed -- so a request that fails one rule is still skipped even if a different rule's attribute is missing. "Unresolved" covers a missing value and also the value Twilio returns to mean "looked up, could not answer": for line_type that is 'unknown' (a valid number whose line type it could not determine), and for caller_type both no CNAM data at all (non-US numbers) and 'UNDETERMINED' (a US number it looked up but could not classify).
["include","exclude"]Default includerulesTargetFilterRule[]optionalPredicates over request enrichment attributes. Empty means no filter.
Item schema
itemsTargetFilterRulerequiredA single predicate over one enrichment attribute of an outbound request.
`field names a key in the request's enrichment payload (e.g. line_type, caller_type, caller_name, carrier_name, mcc, mnc`). Any attribute captured at lookup time can be filtered on with no code change.
Which Twilio Lookup data packages get requested (and billed) for a campaign is derived from the fields its rules reference, so a rule on `caller_type / caller_name is what turns on the separately billed caller_name` package.
3 fields
fieldstringrequiredEnrichment attribute to match on (a key in the request enrichment payload).
openum<string>requiredComparison operator.
["in","not_in","eq","neq","exists","not_exists"]valuesstring[]optionalValues to compare against. Ignored for exists / not_exists.
Item schema
itemsstringrequiredidintegerrequiredUnique ID for campaign
agent_idinteger | nulloptionalID of agent assigned to campaign
created_atstring (date-time)optionalTimestamp of campaign creation
updated_atstring (date-time)optionalTimestamp of campaign update
last_updated_bystringrequiredEmail of user who last updated campaign
webhooksOutboundCampaignWebhookResponse[] | nulloptionalWebhooks for campaign
Item schema
itemsOutboundCampaignWebhookResponserequired5 fields
trigger_statusesenum<string>[]requiredCondition expression evaluated when the trigger fires
Item schema
itemsenum<string>requiredStatus of an outbound communication request (voice, SMS, or email).
["PENDING","DUPLICATE","INVALID","UNEXPECTED_ERROR","FILTERED_LINE_TYPE","NO_OUTCOME","PROCESSED","DROPPED","DEFERRED","BOUNCED","DELIVERED","OPENED","CLICKED","SPAM_REPORT","UNSUBSCRIBED","PRIOR_UNSUBSCRIBED","PRIOR_SPAM_REPORT","PRIOR_DROPPED","PRIOR_BOUNCED","SENT","ACCEPTED","QUEUED","SENDING","UNDELIVERED","DELIVERY_UNKNOWN","DELIVERY_FAILED","IN-PROGRESS","BUSY","CANCELED","COMPLETED","DECLINED","NO-ANSWER","MACHINE","HUMAN","UNKNOWN","FAILED","SIP_NOT_FOUND","SIP_TEMPORARILY_UNAVAILABLE","SIP_LOOP_DETECTED","SIP_DOES_NOT_EXIST_ANYWHERE"]urlstringrequiredHTTPS URL to which to send the webhook payload
request_methodstringrequiredHTTP method for the outbound request (POST, PUT, or PATCH)
idintegerrequiredUnique ID for webhook
auth_value_keysstring[] | nulloptionalAuth value keys (values omitted for security); only hmac_secret is currently supported
Item schema
itemsstringrequiredResponse example
{
"campaign_name": "string",
"description": "string",
"mode": "string",
"sms_session_ttl": "string",
"label": "string",
"labels": "string",
"campaign_variables": "string",
"daily_start_time": "string",
"daily_end_time": "string",
"source": "string",
"caller_id": "string",
"hourly_rate": 1,
"max_daily_calls": "string",
"retry_count": 0,
"retry_interval": "string",
"active_days": [
"string"
],
"outreach_override_rules": "string",
"voicemail_detection": "string",
"allowed_line_types": "string",
"include_unknown_line_types": true,
"target_filters": "string",
"id": 0,
"agent_id": "string",
"created_at": "string",
"updated_at": "string",
"last_updated_by": "string",
"webhooks": "string"
}422Validation Error
application/json
response
HTTPValidationError
required
1 field
detailValidationError[]optionalItem schema
itemsValidationErrorrequired3 fields
locstring | integer[]requiredItem schema
itemsstring | integerrequired2 options
Option 1stringrequiredOption 2integerrequiredmsgstringrequiredtypestringrequiredResponse example
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
