400 Bad Request on POST /api/v2/conversations/calls: Malformed Participant Address

Is there a clean way to structure the participant address when initiating a call via the Genesys Cloud API?

I am building a Terraform module to validate outbound call configurations before deployment. As part of the CI validation, I attempt to spin up a test conversation using the REST API to verify connectivity. The request fails with a 400 Bad Request.

The error message states: The participant address is malformed.

Here is the JSON payload I am sending to POST /api/v2/conversations/calls:

{
 "from": {
 "phoneNumber": "+15550199"
 },
 "to": {
 "phoneNumber": "+15550100"
 },
 "wrapUpCode": {
 "id": "89b6603c-813f-472d-8292-15231c2e4100"
 }
}

I have verified the following:

  1. The from number is a valid, claimed outbound number in our organization.
  2. The to number is a valid E.164 format test number.
  3. The OAuth token used has the conversation:write scope.

Despite these checks, the API rejects the request. Is there a specific formatting requirement for the phoneNumber field that I am missing? I am using Python requests for this call. Any insights would be appreciated.

This happens because the participant address object lacking the required extension or phoneNumber field, or using an incorrect type enum value. The Genesys Cloud API is strict about the structure of the participants array in the POST body. You are likely sending a flat string or a malformed object.

  1. Ensure the type is set to user, phone, or extension.
  2. Match the type with the correct data field. For example, if type is extension, you must provide extension.

Here is a valid payload structure for a user-initiated call:

{
 "participants": [
 {
 "to": {
 "phoneNumber": "+15550199888",
 "type": "phone"
 },
 "from": {
 "phoneNumber": "+15550199777",
 "type": "phone"
 }
 }
 ]
}

Validate your schema against the Genesys Cloud API Reference for Conversation Participant. Check the to object specifically. It must be an object, not a string.

400 Bad Request. The participants array fails if type is missing or incorrect. My Terraform script choked until I matched the enum. Use this structure:

{
 "participants": [
 {
 "type": "user",
 "id": "valid-user-id"
 }
 ]
}

Warning: Hardcoding IDs in Terraform modules causes state drift. Use data sources to resolve IDs dynamically.