Problem: I’ve been building a TypeScript orchestrator to automate the full outbound campaign lifecycle via api integration, but the POST requests to /api/v2/outbound/campaigns keep failing during activation. The main issue is constructing the CAMPAIGN_DEFINITION_PAYLOAD with the right list references and script bindings while keeping the DIALER_STRATEGY_CONFIG locked to predictive mode. I’m sending a JSON body that ties the contact list ID to a specific script, but the REGULATORY_CONSTRAINTS_CHECK throws a 400 Bad Request whenever the resource availability validation runs. Here’s the payload structure I’m using:
const campaignPayload = { name: "Q3 Outreach Pilot", contactListId: "a8f9c2", scriptId: "script-789", dialerStrategy: { type: "predictive", pacing: 15 }, state: "ACTIVE", campaignType: "PREDICTIVE" };
Error: The response consistently points to a mismatch in the EXPIRATION_DURATION_MATRIX or a missing compliance flag, even though the list has valid consent records. Switching to a STATE_TRANSITION_LOOP for polling just returns a 409 Conflict when I try to pause it after the real-time disposition metrics trigger.
Question: I need a working example of how to validate campaign configurations against regulatory constraints before hitting the endpoint, plus the exact polling interval that won’t trigger a 429. The orchestrator should sync results to an external analytics platform via webhook callbacks for reporting integration, yet the audit log generation breaks when the session context drops. Anyone got a clean snippet for handling the state verification and error recovery loop? The DIALER_STRATEGY_CONFIG keeps overriding itself when custom metrics hit the server, so I’m stuck guessing at the right payload shape. Just need the exact API sequence to get the orchestrator running without constant timeouts.