Hey folks,
Trying to kick off a specific Architect flow from our external node app. Basically we need to trigger a flow based on an event from a third-party system, so we’re hitting the Genesys Cloud API directly.
I’m sending a POST to /api/v2/flows/executions/{flowId} with a simple JSON body to set the initial attributes. The flow ID is definitely correct, and I’ve double-checked the permissions on the service account (it has the flow:execute scope).
Here’s the cURL command I’m using for testing:
curl -X POST "https://api.mypurecloud.com/api/v2/flows/executions/12345678-1234-1234-1234-123456789012" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"attributes": {"source": "external_app", "priority": "high"}}'
The response is a 400 Bad Request with this payload:
{
"errorCode": "invalid.request",
"message": "Flow execution request is invalid.",
"details": "Missing required parameter: channel"
}
This is confusing because the docs for this endpoint imply that if you’re just launching a flow that expects attributes, you don’t necessarily need to specify a channel if it’s not a conversation-initiating flow. Or maybe I’m misreading the schema.
I tried adding "channel": {"type": "email"} to the body, but then it complains about missing toAddress and fromAddress. We don’t want to start an actual conversation, just run the flow logic.
Has anyone managed to trigger a standalone flow execution without it trying to spin up a new conversation channel? Or am I barking up the wrong tree and should be using the /conversations/conversations endpoint instead?