Trying to kick off an Architect flow from our external Node.js service using the POST /api/v2/flows/executions endpoint. The flow ID is correct and the flow is active. We need to pass a custom JSON object into the flow’s initial parameters so the logic can parse it downstream.
The request looks like this:
const response = await axios.post(
`https://${orgId}.mypurecloud.com/api/v2/flows/executions`,
{
flowId: '8a2c...',
parameters: {
customerId: '12345',
actionType: 'refund',
amount: 50.00
}
},
{
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
}
}
);
The API responds with a 400 Bad Request. The error body is basically empty or just says INVALID_ARGUMENT. No specific field is mentioned. We’ve tried:
- Removing the
parametersobject entirely. The call succeeds, but the flow runs with defaults. We need the data. - Changing the parameter keys to match the exact variable names in the flow’s start node. Still 400.
- Checking the OAuth token. It’s valid for other GET calls.
We know the flow expects these inputs. In the Architect UI, the start node has inputs for customerId, actionType, and amount. The types match (string, string, number).
Is there a specific format required for the parameters payload? Do we need to wrap it in a different object structure? Or is there a schema validation step we’re missing? The docs are sparse on the exact JSON structure for the body. It just says “parameters object”.
Any insights on what triggers this vague 400 on execution calls?