Trying to spin up an outbound call via the Personal Connection API from inside a CXone Studio script. The docs are a bit light on the exact payload structure for a simple outbound leg. I’m using the GetRESTProxy to hit the endpoint, but I keep hitting a 400 Bad Request. Here’s the snippet I’m messing with:
GetRESTProxy(REST_PROXY, "POST", "/api/v2/communications/outbound/connections", JSON.stringify({
"to": { "phoneNumber": "+15550199" },
"from": { "phoneNumber": "+15550100" },
"type": "voice"
}), "application/json")
The error response just says “Invalid request body” without much detail. I’ve checked the auth token in the proxy config, that’s fine. Is there a specific campaignId or wrapping object I’m missing? The standard outbound APIs require a campaign, but this is supposed to be ad-hoc. Maybe the phone numbers need the E.164 format stripped or something weird like that. I’ve tried with and without the plus sign. Nothing works. The call just doesn’t fire.