POST /api/v2/flows/executions 202 Accepted but execution never starts

GET /api/v2/flows/executions/{executionId} returns 404 Not Found immediately after a successful 202.

We’ve been kicking off Architect flows from our Node.js backend using the standard endpoint for a while now. It’s worked fine for simple trigger flows, but we recently switched to a more complex flow that requires initial data injection. The POST request completes successfully with a 202 Accepted response and returns an execution ID. However, when I try to check the status of that execution a few seconds later, the API throws a 404.

The flow is definitely published and active. I can trigger it manually from the Architect UI without issues. I’ve also verified that the user making the API call has the flow:flow:execute permission. Here’s the payload we’re sending:

{
 "flowId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
 "initialState": "Start",
 "data": {
 "customerId": "12345",
 "source": "webchat"
 }
}

And here’s the relevant part of our fetch call:

const response = await fetch('https://api.mypurecloud.com/api/v2/flows/executions', {
 method: 'POST',
 headers: {
 'Authorization': `Bearer ${token}`,
 'Content-Type': 'application/json'
 },
 body: JSON.stringify(payload)
});

We’ve tried a few things to debug this:

  • Checked the flow logs in the web client. No execution entry appears for the ID returned by the API.
  • Verified the flowId matches exactly what’s in the URL when editing the flow in Architect.
  • Tried adding a callbackUrl to the payload, but that just results in a 400 Bad Request saying the callback isn’t registered (which makes sense since we don’t have a webhook endpoint set up for this test).
  • Waited up to 30 seconds before polling the execution status, assuming there might be a delay, but it’s still a 404.

It feels like the execution is being created in memory but dropped before it actually persists or starts. Is there a specific requirement for flows triggered via API that differs from manual triggers? Maybe something around the initial state or data schema? I’m scratching my head on this one.