POST /api/v2/conversations/calls 400 Bad Request on valid ToC address

Trying to kick off an outbound call via the API but keep getting a 400 error about a malformed participant address. The JSON looks right to me, using the standard ToC format.

{
 "participants": [
 {
 "to": { "phoneNumber": "+61212345678" },
 "from": { "phoneNumber": "+61298765432" }
 }
 ]
}

Already checked the number formats and they’re valid. Am I missing a required field or is the endpoint rejecting the ToC syntax?

that participants array structure is the issue. the v2 calls endpoint expects a flat list of participant objects, not nested under a key like that in the root. but more importantly, you’re hitting a 400 because you’re missing the type field on the participants. genesys needs to know if it’s an external or internal leg.

try this payload instead. note the type: "external" on the to object.

{
 "participants": [
 {
 "type": "external",
 "to": {
 "phoneNumber": "+61212345678"
 },
 "from": {
 "phoneNumber": "+61298765432"
 }
 }
 ]
}

also double check your oauth scope. you’ll need conversations:call:write and communications:call:write. if you’re using a user token, make sure the user has the right permissions in the org.

watch out for rate limits on outbound calls. if you’re scripting this, add a small delay between requests. the gateway can get cranky if you fire off too many at once.

The suggestion above regarding the type field is spot on. You definitely need to specify external for the to participant. However, the structure you’re using with nested to and from objects inside a single participant entry isn’t quite right for the initial POST. The API expects a flat array of participants where each object represents one leg of the call.

Here is the correct payload structure. Notice how to and from are separate participant objects in the array, not nested perties. Also, ensure your from number is a valid outbound caller ID visioned in your Genesys Cloud account. If it’s not, you’ll get a 400 regardless of the JSON structure.

{
 "participants": [
 {
 "to": {
 "phoneNumber": "+61212345678",
 "type": "external"
 }
 },
 {
 "from": {
 "phoneNumber": "+61298765432",
 "type": "external"
 }
 }
 ]
}

I’ve seen this trip people up when integrating with New Relic for call volume tracking. If you’re instrumenting these API calls, make sure you capture the requestId from the response headers. It helps correlate the 400 error back to a specific transaction trace in NRQL.

Also, double-check your OAuth scopes. You need call:write or call:all depending on your setup. If the token is missing that scope, the API might throw a misleading 400 instead of a 403.

One more thing. The from number must be associated with a user or a team if you’re using a team outbound campaign. For a simple API-initiated call, it just needs to be a valid outbound number in your telephony configuration. If you’re still getting errors, check the Genesys Cloud logs via the /api/v2/analytics/interactions/summary endpoint to see if the call attempt was even queued.