Data Action failing to parse Cognigy profile tokens with 400 Bad Request

We are refactoring our outbound campaign logic to pull dynamic agent tokens from NICE Cognigy before injecting them into the Genesys Cloud Architect flow. The goal is to maintain a single source of truth for agent context. The Terraform state is clean and the integration credentials are verified.

We’ve set up a Data Action in the Architect flow to call the Cognigy API. The endpoint is POST https://api.cognigy.ai/v1/integrations/<id>/execute. We are sending a JSON payload to retrieve the specific profile token for the current session. Here is the JSON body we are constructing in the Data Action:

{
 "sessionId": "{{session.id}}",
 "intent": "fetch_agent_token",
 "data": {
 "agentId": "{{agent.id}}"
 }
}

The issue arises in the response parsing stage. The Data Action returns a 200 OK, but the response body contains a nested structure that the Architect parser seems to choke on. We are getting a 400 Bad Request error within the Data Action execution log, specifically stating Failed to parse response: Unexpected token < in JSON at position 0.

This suggests the response might be HTML rather than JSON, possibly an error page from the Cognigy side. However, when we test the same payload using Postman with the same headers, we get a valid JSON response with the token. The headers in the Data Action are set to Content-Type: application/json and Authorization: Bearer {{cognigy_token}}.

We suspect there might be an issue with how the session ID is being passed or perhaps a timeout causing a gateway error that returns HTML. Has anyone encountered similar parsing errors when integrating Cognigy profile data into Genesys Data Actions? We are trying to isolate if this is a payload formatting issue or a header mismatch.