UpdateSchedule

View as Markdown
## Replaces the schedule of a campaign. Defines when the campaign runs each day, which days it is active, the timezone, and optional start/end dates. Allowed statuses: DRAFT, SCHEDULED, PAUSED. Returns 400 for any other status (e.g. IN_PROGRESS, FINISHED). For SCHEDULED campaigns the campaign reverts to DRAFT. Once a campaign has been started at least once, `startDate` cannot be changed. ### Body Parameters - **campaignId** _(long, required)_: The campaign to update. - **schedule** _(CampaignScheduleApiDto, required)_: The new schedule configuration. ### CampaignScheduleApiDto fields - **dailyStartTime** _(TimeSpan, required)_: Start of the daily active window, format `"HH:mm:ss"` (e.g. `"09:00:00"`). Must be before `dailyEndTime`. Maximum is 24 hours - see note below. - **dailyEndTime** _(TimeSpan, required)_: End of the daily active window, format `"HH:mm:ss"` (e.g. `"17:00:00"`). Must be after `dailyStartTime`. Maximum is 24 hours - see note below. - **timeZoneId** _(string, required)_: IANA timezone identifier (e.g. `"America/New_York"`, `"Europe/London"`). Default `"Etc/GMT"`. - **enabledMonday** _(bool, optional)_: Default `true`. - **enabledTuesday** _(bool, optional)_: Default `true`. - **enabledWednesday** _(bool, optional)_: Default `true`. - **enabledThursday** _(bool, optional)_: Default `true`. - **enabledFriday** _(bool, optional)_: Default `true`. - **enabledSaturday** _(bool, optional)_: Default `false`. - **enabledSunday** _(bool, optional)_: Default `false`. - **startDate** _(date, optional)_: ISO date, e.g. `"2025-06-01"`. If `null` or in the past, the campaign starts immediately when activated. Cannot be modified after the campaign has been started. - **endDate** _(date, optional)_: ISO date. Campaign stops automatically on this date. Must be after `startDate` if both are set. At least one `enabled*` day must be `true`. **Note on the 24-hour boundary:** the maximum is 24 hours and is sent as `"24:00:00"` (interpreted as end-of-day in the campaign's `timeZoneId`). Some client libraries (e.g. Python's `datetime.strptime` with `%H:%M:%S`) reject hours outside 0-23. If yours does, send `"23:59:59"` instead.

Headers

X-API-KEYstringOptional

API key header using this scheme. Example: “X-API-KEY: {API_KEY}

Request

This endpoint expects an object.
campaignIdintegerRequired
scheduleobjectRequired