Skip to content

Campaigns & workflows

You can launch a campaign built in Wabot from an external event, such as a new order or a form signup.

  1. In Wabot, create a campaign and choose the API launch option.
  2. Copy the trigger URL shown under Launch Options. It looks like https://api.wabot.shop/campaigns/trigger_campaign-api/{campaign_id}.
  3. POST the recipients to it:

POST /campaigns/trigger_campaign-api/{campaign_id} · grant /campaigns

Terminal window
curl -X POST "https://api.wabot.shop/campaigns/trigger_campaign-api/$CAMPAIGN_ID" \
-H "Authorization: $TOKEN" -H "Content-Type: application/json" \
-d '{
"contacts": [
{ "phoneNumber": "+919400294110", "name": "Asha", "email": "asha@example.com", "variables": { "custom_order": "#1042" } }
]
}'
Query Description
includeExistingContacts=true Also send to contacts already in the campaign’s audience

A successful call returns 200 with an empty body.

GET /workflows/active · grant /workflows

{ "message": "Active Workflows :", "data": [{ "id": 42, "name": "Order follow-up", "isActive": true }] }

A workflow whose trigger is Webhook gets its own unique URL, which you’ll see in the workflow editor:

https://wh.wabot.shop/webhook/workflow/{workflow_identifier}

POST any JSON to it. The body is passed into the workflow, so its steps can use the fields:

Terminal window
curl -X POST "https://wh.wabot.shop/webhook/workflow/$IDENTIFIER" \
-H "Content-Type: application/json" \
-d '{"phone": "+919400294110", "name": "Asha", "order_id": "1042"}'
Status Meaning
200 The workflow was started
404 {"message": "Workflow ID not found"}

POST /v1/workflows creates or edits a workflow (mode: "create" | "edit") together with its child automations. For most use cases, the visual workflow builder or the MCP tools are easier.