set_campaign_schedule
Set a campaign's ad schedule by providing start and stop hours for all 7 days. Replaces the existing schedule and returns a draft to confirm before applying.
Instructions
REPLACE a campaign's ad schedule. week = 7 dicts {day, from_hour, to_hour} (0-23 hour clock; to_hour is the hour service stops, e.g. to_hour=22 serves until 22:00). MUST cover all 7 days — a campaign with any DayTime rows serves only inside them, so a partial week silently narrows delivery. Deletes existing DayTime criterions then adds the new set. Returns a draft; apply with confirm_and_apply.
Live-verified 2026-07-30 including the REPLACE delete path (7 rows deleted/7 added, read-back verified).
On a mid-apply failure (add or the verify readback raises after the existing schedule was deleted) the error carries every landed ID (deleted_criterion_ids, added_criterion_ids) — reconcile account state before retrying (a retry re-runs ALL steps, including re-deleting whatever the previous attempt left).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| week | Yes | ||
| campaign_id | Yes |