Skip to main content
POST
/
bots
/
{botId}
/
workflows
Create or update a workflow
curl --request POST \
  --url https://api.helloannie.com/v1/bots/{botId}/workflows \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "steps": [
    {
      "title": "<string>",
      "description": "<string>",
      "instructions": "<string>",
      "order": 0,
      "examples": [
        "<string>"
      ],
      "action": "<string>",
      "actionMetadata": {},
      "childSteps": [
        {
          "title": "<string>",
          "description": "<string>",
          "instructions": "<string>",
          "order": 0,
          "examples": [
            "<string>"
          ],
          "action": "<string>",
          "actionMetadata": {}
        }
      ]
    }
  ],
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "enabled": true,
  "usageContext": "<string>",
  "order": 0
}
'
{
  "success": true,
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>",
    "description": "<string>",
    "enabled": true,
    "usageContext": "<string>",
    "steps": [
      {
        "title": "<string>",
        "description": "<string>",
        "instructions": "<string>",
        "examples": [
          "<string>"
        ],
        "order": 0,
        "childSteps": [
          {
            "title": "<string>",
            "description": "<string>",
            "instructions": "<string>",
            "examples": [
              "<string>"
            ],
            "order": 0,
            "action": "<string>",
            "actionMetadata": "<unknown>"
          }
        ],
        "action": "<string>",
        "actionMetadata": "<unknown>"
      }
    ]
  }
}

Path Parameters

botId
string<uuid>
required

The ID of the bot to create/update the workflow for

Body

Request body for creating or updating a workflow

title
string
required

Title of the workflow

description
string | null
required

Optional description of the workflow

steps
object[]
required

Steps in the workflow

id
string<uuid>

The workflow ID. If provided, the workflow will be updated; otherwise, a new workflow will be created.

enabled
boolean
default:true

Whether the workflow is enabled

usageContext
string | null

Context describing when this workflow should be used

order
number
default:0

Order of the workflow

Response

Response containing the created or updated workflow

success
enum<boolean>
required
Available options:
true
data
object
required

A workflow exported in portable JSON format