Skip to content

Create an automation

Request

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:

  1. 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
Bodyapplication/jsonrequired
namestringrequired

Automation name.

Example:"DACH CTO Outreach"
use_sender_schedulebooleanrequired

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
scheduleobject(schedule)required

Working hours schedule.

descriptionstring or null
priorityinteger

Execution priority (higher runs first). Defaults to 2.

Example:2
is_publicboolean

Whether the automation is visible to the whole team.

flow_workspace_uuidstring or null

UUID of the folder (workspace) to place the automation in.

POST
/flows/api/flows
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
        }
      ]
    }
  }'

Responses

Automation created (in draft status, no node tree yet).

Bodyapplication/json
uuidstring
Example:"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
public_uuidstring or null
team_idinteger
namestring
Example:"DACH CTO Outreach"
flow_workspace_uuidstring or null
flow_version_uuidstring
use_sender_scheduleboolean

When true, tasks use each sender profile's own schedule instead of the flow schedule.

scheduleobject(schedule)

Working hours schedule.

descriptionstring or null
priorityinteger
statusstring

Flow status.

Enum:"on""off""draft""archived"
Example:"on"
is_publicboolean
user_idinteger
created_atstring, (date-time)
updated_atstring, (date-time)
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" }