Skip to main content
POST
/
api
/
workflows
Create a workflow
curl --request POST \
  --url https://app.puffle.ai/api/workflows \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>"
}
'
{
  "workflow": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "description": "<string>",
    "status": "draft",
    "trigger_config": {},
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Overview

Create a new workflow in draft status. No nodes or edges are created — the canvas starts empty. Typical flow:
  1. createWorkflow with a name
  2. updateWorkflowNodes with the full graph (at minimum: one signal_trigger node and one action node)
  3. activateWorkflow to flip status to active

AI agent notes

Draft state is permissive. You can save partial graphs in draft — the validation only kicks in when activateWorkflow is called.Related: List workflows, Update a workflow, Delete a workflow.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Display name. Required.

Minimum string length: 1
description
string

Free-form description.

Response

Workflow created in draft status.

workflow
object
required