POST /api/v2/flows/executions hangs with 504 Gateway Timeout

Looking for advice on why my Node.js Express middleware triggers a 504 when launching an Architect flow via POST /api/v2/flows/executions. The payload includes a valid flowId and initialData, yet the request times out after 60 seconds despite the flow completing instantly in the UI. I am using the standard bearer token auth and have verified the endpoint is correct. Is there a specific header or configuration required for asynchronous execution to prevent the HTTP connection from hanging? My current request body is: { “flowId”: “abc-123”, “initialData”: { “source”: “webhook” } }. Any insights on handling this timeout in Express would be appreciated.

If I remember correctly, you must set the X-Genesys-Async: true header to prevent the 504 timeout on synchronous endpoints. See the Async Execution Guide for details.