How do I trigger an outbound call via the Personal Connection API in a Studio script? The docs are vague on the exact JSON structure for the POST /api/v2/interactions/calls endpoint when using personalConnection as the interactionType. Tried passing toAddress and fromAddress in the body but keep hitting 400 Bad Request. Does it require a nested addresses array or just flat keys?
You’re hitting a 400 because personalConnection calls need the addresses array, not flat keys. The API expects a specific structure for the leg endpoints.
Here is the working payload for Studio or direct API calls:
{
"interactionType": "personalConnection",
"addresses": [
{
"addressType": "phone",
"endpointId": null,
"endpointType": "phone",
"uri": "tel:+12125551234"
},
{
"addressType": "phone",
"endpointId": null,
"endpointType": "phone",
"uri": "tel:+12125559876"
}
]
}
Make sure your token has the calls:write scope. If you’re doing this in Studio, use GetRESTProxy with POST and pass that JSON string as the body. Don’t forget to set the Content-Type header to application/json.
The first address in the array is the outbound leg (the one you’re dialing). The second is the user’s endpoint if you’re bridging, or just the target if it’s a simple outbound. Check the docs for CallCreate object specifically, the generic interaction docs are too broad.