Architect GetExternalContactAction 400 Bad Request

Trying to look up a customer by phone number using the GetExternalContactAction data action in Architect.

{
 "name": "LookupContact",
 "type": "GetExternalContactAction",
 "configuration": {
 "endpoint": "https://api.internal.com/contacts",
 "method": "GET",
 "queryParameters": {
 "phone": "${interaction.participant.phone}"}
 }
}

The integration returns a 400 Bad Request. The endpoint works fine in Postman. What’s wrong with the query parameter syntax?

The issue is likely how Genesys Cloud serializes the query parameter. When you pass a single value in queryParameters, it might be sending it as an array or encoding it incorrectly for your specific backend. I’ve seen this exact 400 error when the external API expects a flat key-value pair but receives something like phone[]=123456.

Try moving the phone number into the URL path instead, if your API supports it. Or, if you must use query params, construct the full URL in the endpoint field using string interpolation. It’s often more reliable for simple GET requests.

{
 "name": "LookupContact",
 "type": "GetExternalContactAction",
 "configuration": {
 "endpoint": "https://api.internal.com/contacts?phone=${interaction.participant.phone}",
 "method": "GET"
 }
}

Also, check if your internal API requires a specific header, like Accept: application/json. The Architect action sends default headers, but if your endpoint is strict, it might reject the request. Add a headers block if needed. Debugging these actions is a pain because you can’t easily inspect the outgoing request from Architect alone. Use the Architect simulator to watch the execution trace closely.