I’m trying to kick off an Architect flow from an external Node.js app using the REST API. The goal is simple: trigger a flow that handles a specific webhook payload.
I’m using the endpoint POST /api/v2/flows/executions with the flow ID in the path. I’ve verified the flow ID is correct by checking the Architect UI. I’m passing the required application/json content type and a valid access token obtained via client_credentials.
Here is the request body I’m sending:
{
"flowId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"parameters": {
"customerId": "12345",
"issueType": "billing"
}
}
I’m getting a 400 Bad Request response. The error payload isn’t very helpful:
{
"errors": [
{
"code": "bad_request",
"message": "Invalid input"
}
]
}
I’ve tried the following:
- Checked the token. It’s valid. I can call
GET /api/v2/users/mewith the same token. - Verified the
flowIdformat. It’s a standard UUID. - Tried removing the
parametersobject entirely. Same error. - Tried adding a
routingDataobject. Same error. - Checked the timestamp. My server clock is synced via NTP.
The documentation for this endpoint is sparse. It mentions that the flow must be active, which it is. I’m stuck. Is there a specific format for the parameters that I’m missing? Or is this a known issue with the API version I’m using (v2)?
Any insights would be appreciated. I’m running out of ideas.