Create a new outreach automation (flow) programmatically. The automation is created in draft status with no node tree yet — add the workflow steps in a second call to POST /flows/api/flows/{flowUuid}/flow-versions, then activate it with PUT /flows/api/flows/{flowUuid}/start.
This is the entry point for building automations without the web editor. Typical agent-driven sequence:
POST /flows/api/flows— create the shell (this endpoint). 2.POST /flows/api/flows/{flowUuid}/flow-versions— save the node tree. 3.PUT /flows/api/flows/{flowUuid}/start— go live.
Security
bearerAuth
When true, each step runs on its sender profile's own working-hours schedule and the schedule object below is ignored at runtime (but is still required in the request). When false, the flow schedule applies.
Example:false
POST
curl -i -X POST \
https://leadgen.grinfi.io/flows/api/flows \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "DACH CTO Outreach",
"use_sender_schedule": false,
"schedule": {
"timezone": "Europe/Berlin",
"use_lead_timezone": false,
"timeblocks": [
{
"dow": 1,
"min": 540,
"max": 1080
},
{
"dow": 2,
"min": 540,
"max": 1080
},
{
"dow": 3,
"min": 540,
"max": 1080
},
{
"dow": 4,
"min": 540,
"max": 1080
},
{
"dow": 5,
"min": 540,
"max": 1080
}
]
}
}'Automation created (in draft status, no node tree yet).
When true, tasks use each sender profile's own schedule instead of the flow schedule.
Response
{ "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "public_uuid": "string", "team_id": 0, "name": "DACH CTO Outreach", "flow_workspace_uuid": "string", "flow_version_uuid": "string", "use_sender_schedule": true, "schedule": { "timezone": "Europe/Berlin", "use_lead_timezone": false, "timeblocks": [ … ] }, "description": "string", "priority": 0, "status": "on", "is_public": true, "user_id": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }