POST /api/v2/conversations/calls 400 - malformed participant address

I’ve been working on a script to automate outbound calls using the Genesys Cloud API. The goal is to trigger a call from a specific user to an external number. I’m using the Python SDK for this.

Here is the code snippet I’m using:

from genesyscloud.platform.client import Client
from genesyscloud.platform.api.conversations_api import ConversationsApi
from genesyscloud.platform.models import ConversationCall, ConversationParticipant

client = Client(
 base_url="https://my-org.mygen.com/api/v2",
 auth_token="my_valid_token"
)

conversations_api = ConversationsApi(client)

# Define the call details
call = ConversationCall(
 to="tel:+15551234567",
 from_="tel:+15559876543",
 participants=[
 ConversationParticipant(
 address="tel:+15551234567",
 role="user"
 )
 ]
)

# Make the API call
response = conversations_api.post_conversations_calls(call=call)
print(response)

When I run this, I get a 400 Bad Request error. The error message says:

400: Bad Request
{
 "message": "Malformed participant address",
 "code": "bad_request"
}

I’ve checked the to and from_ fields, and they look correct. The tel: prefix is there. I’m not sure what’s wrong with the participant address. Can someone help me figure out what’s causing this error?

I’ve tried different formats for the phone numbers, but nothing seems to work. I’m also using a valid auth token, so that’s not the issue.

Any ideas?