I’ve been digging through the CXone API docs for the last two days trying to automate outbound calls for our high-priority alert queue. The goal is simple: when a specific webhook hits our internal service, fire off a single outbound call via the Personal Connection API without spinning up a full-blown predictive campaign.
I found the POST /api/v2/outbound/campaigns/{id}/trigger endpoint mentioned in a few community threads as the way to go for ad-hoc triggers. I have a valid OAuth token, I’m using the Python SDK, and the campaign ID is definitely correct since I can see it in the UI.
Here’s the curl equivalent of what my Python script is sending:
curl -X POST "https://mypurecloud.api.mypurecloud.com/api/v2/outbound/campaigns/98765432-1234-5678-90ab-cdef12345678/trigger" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..." \
-H "Content-Type: application/json" \
-d '{"contactId": "contact-xyz-123"}'
The response I keep getting back is a hard 405 Method Not Allowed.
{
"errors": [
{
"code": "405",
"message": "Method not allowed"
}
],
"requestId": "abc-123-def-456",
"status": 405
}
I’ve tried a few things:
- Verified the OAuth token has the
outbound:campaign:writescope. It does. - Checked the campaign settings. It’s set to “Predictive” but I assumed the trigger endpoint overrides the schedule.
- Tried passing an empty JSON body
{}just in case thecontactIdparameter was invalid, but still got 405. - Double-checked the URL path. No typos. The
{id}is replaced with the actual UUID.
Is this endpoint actually deprecated? Or is there a different API path for Personal Connection that I’m missing? The docs are pretty sparse on the exact payload structure for the trigger call. I feel like I’m bashing my head against a wall here because the documentation implies this should work for immediate triggers.
Any chance someone has a working example of the Python SDK call for this? I’m starting to think I need to use the Contact List API instead but that seems like overkill for a single call.