API Reference
API Reference

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.

POST/api/v1/outbound/campaigns/excluded_dates

Authentication

Syllable-API-Keyrequired

Send 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 | nulloptional

The 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
daysobjectoptional

Rules 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}ScheduleOverrideoptional

Outreach 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 | nulloptional

Whether 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 | nulloptional

Start time on this day. Omitted keeps the campaign start time.

daily_end_timestring | nulloptional

End time on this day. Omitted keeps the campaign end time.

max_daily_callsinteger | nulloptional

Maximum 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.

Minimum 0
datesobjectoptional

Rules 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 above

Outreach 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.

holidaysobjectoptional

Rules 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 above

Outreach 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>[] | nulloptional

Days 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>required

Enum representing days of the week.

Allowed values ["mon","tue","wed","thu","fri","sat","sun"]
start_datestring (date) | nulloptional

First date of the range, inclusive. Default: today in timezone.

end_datestring (date) | nulloptional

Last date of the range, inclusive. Default: 12 months after start_date. The range can be at most 5 years.

timezonestringoptional

IANA time zone of the agent the campaign dials from. It sets which date is today for the default start_date. Default: UTC.

Default UTC
Request 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
timezonestringrequired

Time zone used for today

start_datestring (date)required

First date of the range, inclusive

end_datestring (date)required

Last date of the range, inclusive

datesCampaignExcludedDate[]optional

Dates in the range on which a date or holiday rule stops all outreach, in order.

Item schema
itemsCampaignExcludedDaterequired
3 fields
datestring (date)required

Excluded date, in the time zone of the campaign agent

ruleenum<string>required

The kind of rule that excludes this date.

Allowed values ["date","holiday"]
holidaysCampaignExcludedDateHoliday[]optional

The holiday rules of the campaign that fall on this date. Empty when only a date rule applies.

Item schema
itemsCampaignExcludedDateHolidayrequired
2 fields
holidayenum<string>required

Canonical holiday name

Allowed values ["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"]
labelstringrequired

Human-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[]optional
Item schema
itemsValidationErrorrequired
3 fields
locstring | integer[]required
Item schema
itemsstring | integerrequired
2 options
Option 1stringrequired
Option 2integerrequired
msgstringrequired
typestringrequired
Response example
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}