Skip to main content
POST
/
api
/
public
/
flows
Create a flow
curl --request POST \
  --url https://astrasend-mocha.vercel.app/api/public/flows \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "definition": {
    "nodes": [
      {
        "id": "<string>",
        "position": {
          "x": 123,
          "y": 123
        },
        "data": {}
      }
    ],
    "edges": [
      {
        "id": "<string>",
        "source": "<string>",
        "target": "<string>",
        "sourceHandle": "<string>"
      }
    ]
  }
}
'
{
  "ok": true
}

Authorizations

Authorization
string
header
required

Your API key (as_live_…), created under Settings → API keys.

Body

application/json
name
string
required
description
string
status
enum<string>
Available options:
draft,
active,
paused,
archived
definition
object

Response

200 - application/json

Success

ok
boolean
Example:

true