Boltly Boltly / Docs
Docs / Platform / Automation Flows

Automation Flows

Build keyword, event, and scheduled automations as flows of action nodes. Flows run automatically when their trigger fires, or on demand against a conversation.

POST /v1/automation/flows

Create flow

Create an automation flow: a trigger (keyword, event, or schedule) plus a graph of action nodes to execute.

Parameters

name string required

Flow name.

description string

What this flow does.

inbox_id string

Restrict the flow to one inbox. Defaults to all inboxes.

trigger_type string required

How the flow starts: keyword, event, or schedule.

trigger_keyword string

Keyword that starts the flow. Required when trigger_type is keyword.

trigger_event_type string

Event that starts the flow. Required when trigger_type is event.

trigger_schedule string

Cron expression for recurring scheduled flows.

trigger_schedule_at string

ISO 8601 timestamp for one-off scheduled flows.

trigger_schedule_timezone string

IANA timezone for the schedule (e.g. "America/New_York").

priority integer

Priority when multiple flows match. Higher runs first.

end_action_type string required

What happens when the flow finishes (e.g. none, assign, resolve).

nodes array required

Flow nodes. Each has id, node_type, action_config, parent_node_id, connection_type, connection_value, and sort_order.

Request

cURL
curl -X POST https://api.boltly.online/v1/automation/flows \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Pricing auto-reply",
    "trigger_type": "keyword",
    "trigger_keyword": "pricing",
    "priority": 1,
    "end_action_type": "none",
    "nodes": [
      {
        "id": "node-1",
        "node_type": "send_message",
        "action_config": { "text": "Our plans start at $29/mo. Reply 1 for details." },
        "connection_type": "always",
        "sort_order": 0
      }
    ]
  }'

Response

JSON
{
  "data": {
    "id": "c4d7e9a1-...",
    "organization_id": "7a1f9d2c-...",
    "name": "Pricing auto-reply",
    "is_enabled": true,
    "trigger_type": "keyword",
    "trigger_keyword": "pricing",
    "priority": 1,
    "end_action_type": "none",
    "nodes": [
      {
        "id": "node-1",
        "node_type": "send_message",
        "action_config": { "text": "Our plans start at $29/mo. Reply 1 for details." },
        "connection_type": "always",
        "sort_order": 0
      }
    ]
  }
}

POST /v1/automation/flows/{id}/trigger

Trigger flow

Manually run a flow against a conversation, regardless of its configured trigger.

Parameters

id string required

Flow ID.

conversation_id string required

Conversation to run the flow in.

Request

cURL
curl -X POST https://api.boltly.online/v1/automation/flows/c4d7e9a1-.../trigger \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "conversation_id": "conv_01H..."
  }'

Response

JSON
{
  "data": {
    "flow_id": "c4d7e9a1-...",
    "conversation_id": "conv_01H...",
    "status": "triggered"
  }
}

PATCH /v1/automation/flows/{id}/toggle

Toggle flow

Enable or disable a flow. Disabled flows keep their configuration but never fire.

Parameters

id string required

Flow ID.

Request

cURL
curl -X PATCH https://api.boltly.online/v1/automation/flows/c4d7e9a1-.../toggle \
  -H "X-API-Key: $API_KEY"

Response

JSON
{
  "data": {
    "id": "c4d7e9a1-...",
    "name": "Pricing auto-reply",
    "is_enabled": false
  }
}