Campaigns & workflows
Trigger a campaign from your system
Section titled “Trigger a campaign from your system”You can launch a campaign built in Wabot from an external event, such as a new order or a form signup.
- In Wabot, create a campaign and choose the API launch option.
- Copy the trigger URL shown under Launch Options. It looks like
https://api.wabot.shop/campaigns/trigger_campaign-api/{campaign_id}. - POST the recipients to it:
POST /campaigns/trigger_campaign-api/{campaign_id} · grant /campaigns
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.
List active workflows
Section titled “List active workflows”GET /workflows/active · grant /workflows
{ "message": "Active Workflows :", "data": [{ "id": 42, "name": "Order follow-up", "isActive": true }] }Start a workflow from a webhook
Section titled “Start a workflow from a webhook”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:
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"} |
Create workflows with the API
Section titled “Create workflows with the API”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.
