Skip to main content
POST
/
v1
/
senders
/
{senderId}
/
agent
/
flows
Create flow
curl --request POST \
  --url https://api.zavu.dev/v1/senders/{senderId}/agent/flows \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "name": "Lead Capture",
  "description": "Capture lead information",
  "trigger": {
    "type": "keyword",
    "keywords": [
      "info",
      "pricing",
      "demo"
    ]
  },
  "steps": [
    {
      "id": "welcome",
      "type": "message",
      "config": {
        "text": "Thanks for your interest! Let me get some info."
      },
      "nextStepId": "ask_name"
    },
    {
      "id": "ask_name",
      "type": "collect",
      "config": {
        "variable": "name",
        "prompt": "What's your name?"
      }
    }
  ]
}
EOF
{
  "flow": {
    "id": "<string>",
    "agentId": "<string>",
    "name": "<string>",
    "trigger": {
      "type": "keyword",
      "keywords": [
        "<string>"
      ],
      "intent": "<string>"
    },
    "steps": [
      {
        "id": "<string>",
        "type": "message",
        "config": {},
        "nextStepId": "<string>"
      }
    ],
    "enabled": true,
    "priority": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "description": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

senderId
string
required

Body

application/json
name
string
required
Maximum string length: 100
trigger
object
required
steps
object[]
required
Minimum array length: 1
description
string
enabled
boolean
default:false
priority
integer
default:0

Response

Flow created.

flow
object
required