List Outbound Communication Campaign Excluded Dates
The dates on which a date or holiday rule stops all outreach, with the names of the matching holidays. The rules and the active days come from the request body, so the dates can be shown for a campaign that is not saved yet. A date on which the campaign does not run anyway is not listed. Nothing is stored. With no range, the next 12 months from today in the given time zone are returned. The range can be at most 5 years.
/api/v1/outbound/campaigns/excluded_datesAuthentication
Syllable-API-KeyrequiredSend Syllable-API-Key in the header.
Need a credential? Create or manage an API token in the Syllable Console.
Parameters
This endpoint has no declared parameters.
Request body
application/json
body
CampaignExcludedDatesRequest
required
5 fields
outreach_override_rulesOutreachOverrideRules | nulloptionalThe outreach rules of the campaign, in the same shape as the campaign field. Null or omitted means no rules, and so no excluded dates.
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.
active_daysenum<string>[] | nulloptionalDays of the week when the campaign is active, in the same shape as the campaign field. A date on a day the campaign does not run is not listed, also when a date or holiday rule closes it. Null or omitted means every day of the week.
Item schema
itemsenum<string>requiredEnum representing days of the week.
["mon","tue","wed","thu","fri","sat","sun"]start_datestring (date) | nulloptionalFirst date of the range, inclusive. Default: today in timezone.
end_datestring (date) | nulloptionalLast date of the range, inclusive. Default: 12 months after start_date. The range can be at most 5 years.
timezonestringoptionalIANA time zone of the agent the campaign dials from. It sets which date is today for the default start_date. Default: UTC.
UTCRequest example
{
"outreach_override_rules": "string",
"active_days": "string",
"start_date": "string",
"end_date": "string",
"timezone": "UTC"
}Responses
200Successful Response
application/json
response
CampaignExcludedDates
required
4 fields
timezonestringrequiredTime zone used for today
start_datestring (date)requiredFirst date of the range, inclusive
end_datestring (date)requiredLast date of the range, inclusive
datesCampaignExcludedDate[]optionalDates in the range on which a date or holiday rule stops all outreach, in order.
Item schema
itemsCampaignExcludedDaterequired3 fields
datestring (date)requiredExcluded date, in the time zone of the campaign agent
ruleenum<string>requiredThe kind of rule that excludes this date.
["date","holiday"]holidaysCampaignExcludedDateHoliday[]optionalThe holiday rules of the campaign that fall on this date. Empty when only a date rule applies.
Item schema
itemsCampaignExcludedDateHolidayrequired2 fields
holidayenum<string>requiredCanonical holiday name
["christmas-day","christmas-day-observed","christmas-eve","independence-day","independence-day-observed","indigenous-peoples-day","columbus-day","juneteenth","juneteenth-observed","labor-day","memorial-day","mlk-day","new-years-day","new-years-day-observed","new-years-eve","presidents-day","thanksgiving-day","thanksgiving-day-after","thanksgiving-day-before","veterans-day","veterans-day-observed","good-friday"]labelstringrequiredHuman-readable holiday name
Response example
{
"timezone": "string",
"start_date": "string",
"end_date": "string",
"dates": [
{
"date": "string",
"rule": "date",
"holidays": [
{
"holiday": "string",
"label": "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"
}
]
}
