Attempting to trigger an outbound call via the Personal Connection API using POST /api/v2/interactions/outbound/calls. The payload includes the required campaignId and contactId, but the endpoint consistently returns a 400 error with a generic validation message. Has anyone successfully authenticated this specific endpoint using a standard OAuth client credentials token, or is there a specific scope requirement I am missing?
The 400 error usually stems from the payload structure rather than authentication, though you’ll want to verify the scope is interactions:write. The Personal Connection API expects a specific nested format for the contact details that doesn’t match the standard interaction create payload.
Here is the working JSON structure I use for my outbound campaigns. Note the routing object is mandatory for queue-based calls.
{
"campaignId": "your-campaign-id-here",
"contactId": "your-contact-id-here",
"routing": {
"skill": {
"required": false
},
"wrapUpCode": {
"required": false
}
},
"to": {
"phoneNumber": "+15550199888"
},
"from": {
"phoneNumber": "+15550199887"
}
}
If you are using the Python SDK, the request looks like this:
from purecloudplatformclientv2 import InteractionsApi, InteractionCreateRequest
api_instance = InteractionsApi(platform_client)
body = InteractionCreateRequest(
campaign_id="your-campaign-id",
contact_id="your-contact-id",
routing={"skill": {"required": False}},
to={"phone_number": "+15550199888"},
from_={"phone_number": "+15550199887"}
)
api_instance.post_interactions_outbound_calls(body=body)
Also check the campaign status. It must be running or scheduled. If the campaign is paused, the API rejects the call immediately with a 400. I often instrument these failures in New Relic by catching the BadRequestException and logging the response body to a custom event. This helps correlate API errors with campaign state changes.
The contactId must belong to the campaignId you specified. Cross-referencing a contact from Campaign A with Campaign B triggers a validation failure. Double-check the IDs in your Genesys Cloud UI.