LE: The solution works for the execution of Jobs in Environment Manager.

Similar, for the programmatic execution of Job Flows you need to access the specific API and obtain the Flow ID. One option ( that i found so far) is to manually get the Flow ID, meaning:
%let viyaHost = %sysfunc(getoption(SERVICESBASEURL));
Go to url: &viyahost./jobFlowScheduling/flows/
Scroll, if you haven't filtered in the URL, and find the name of your flow in Environment Manager. EG:
Mine is named "JF_API" (very clever, duuh)

So i get the ID from the URL.
{
"creationTimeStamp": "2025-06-02T15:56:28.497377Z",
"createdBy": "sasuser",
"modifiedTimeStamp": "2025-06-02T15:56:28.497378Z",
"modifiedBy": "sasuser",
"version": 1,
"id": "fa3202f7-342d-4a5b-b9cf-85f628d59477",
"name": "JF_API",
"links": [
And with the PATCH method (that you also see in the "links" when accessing the Flow API - above) you execute the Job Flow:
filename jobresp temp;
%let viyaHost = %sysfunc(getoption(SERVICESBASEURL));
proc http
url="&viyahost./jobFlowScheduling/flows/fa3202f7-342d-4a5b-b9cf-85f628d59477/scheduled"
method="PATCH"
out=jobresp
oauth_bearer = sas_services;
run;
/*you can assign a lib to see the API response if you run all the above as a program, maybe as a test before prod */
libname jobresp json fileref=jobresp;