Why does the outbound campaign launch endpoint keep throwing a 409 conflict when i try to set a specific start time via the api?
we’re trying to automate our after-hours emergency routing failover. if the primary queue goes dark, the script triggers a campaign to dial our on-call list. it’s supposed to start immediately. the flow works in architect, but hitting POST /api/v2/outbound/campaigns/{id}/launch with startTime set to now returns a conflict.
error message says: “Campaign schedule conflicts with existing active schedule or holiday calendar override.”
i’ve checked the holiday calendar. nothing’s flagged for today. the schedule override in the campaign settings is set to manual, but maybe the api is ignoring that? we’re on version 2023-10-15 of the sdk.
response is just the 409. no further detail in the logs. is there a hidden state i’m missing? the campaign is in ‘ready’ state before the call.
tried removing the startTime param, letting it default to now, but then it waits 5 mins before starting, which breaks the bcp flow. need it to fire instantly.
the conflict comes from the schedule override. Genesys Cloud won’t let you force a start time if the campaign has an active daily schedule. check the schedule object. if it’s not empty, the API blocks it. NICE CXone is more lenient here, allowing immediate overrides. try clearing the schedule first or using the force parameter if available in your version.
The 409 isn’t about the schedule object being non-empty. It’s because the launch endpoint explicitly rejects a startTime if it’s earlier than the current server time or within the “freeze” window defined by the campaign’s scheduleOverride settings. The API thinks you’re trying to backdate a launch.
You don’t need to clear the schedule. Just omit the startTime entirely in the payload. If you send an empty object or just {"force": true}, it defaults to immediate execution regardless of the daily schedule.
from purecloudplatformclientv2 import OutboundApi
api_instance = OutboundApi()
campaign_id = "your-campaign-id"
# This fails with 409
# launch_body = {"startTime": "2023-10-27T12:00:00Z"}
# This works. Omit startTime for immediate start.
launch_body = {}
try:
api_instance.post_outbound_campaigns_launch(campaign_id, body=launch_body)
print("Campaign launched immediately.")
except Exception as e:
print(f"Launch failed: {e}")