Automations
Automation rules run actions (send a message, add a tag, assign a chat and more) when a trigger fires and the conditions match.
- Read the catalog to see every trigger, then one trigger in full: its condition fields, operators and value formats, and the actions it allows.
availableis false when your plan lacks a module the trigger needs. - Create a rule with that trigger, conditions and actions. It starts inactive unless
activeis true. - Or install a Quick Automation template, which creates its rules for you.
A few action settings can only be set in the app (functions, card parameters and media, flow installs, email sender, uploaded media). Rules need the plan modules of their trigger and actions.
api.whautomate.comGet the trigger catalog
/v1/automations/catalogWithout trigger, a bare array of every trigger (AutomationCatalogEntry). With trigger, that trigger in full (AutomationTriggerDetails): its condition fields with operators, options and the value format, and its actions with wait types and plan modules. available is false when the plan lacks a module the trigger needs. An unknown trigger answers 400.
x-api-keystringrequiredtriggerstringvaluestringnamestringdescriptionstringmodulesstring[]availablebooleancurl -X GET "https://api.whautomate.com/v1/automations/catalog" \
-H "x-api-key: YOUR_API_KEY"
[
{
"value": "INCOMING_MESSAGES",
"name": "Incoming WhatsApp Messages",
"description": "This rule gets triggered when a message is received",
"modules": [],
"available": true
},
{
"value": "OUTGOING_MESSAGES",
"name": "Outgoing WhatsApp Messages",
"description": "This rule gets triggered when a message is sent",
"modules": [],
"available": true
}
]
curl -X GET "https://api.whautomate.com/v1/automations/catalog?trigger=INCOMING_MESSAGES" \
-H "x-api-key: YOUR_API_KEY"
{
"value": "INCOMING_MESSAGES",
"name": "Incoming WhatsApp Messages",
"description": "This rule gets triggered when a message is received",
"modules": [],
"available": true,
"fields": [
{
"value": "message",
"name": "Incoming Message",
"type": "text",
"operators": [
{
"value": "includes",
"name": "includes any"
},
{
"value": "does not include",
"name": "does not include all"
},
{
"value": "valid_date",
"name": "is a valid date"
}
],
"valueFormat": "includes / does not include: startValue = a list of keywords; equal / notEqual: a string; valid_regex / invalid_regex: a pattern such as /^stop$/i."
},
{
"value": "messageType",
"name": "Message Type",
"type": "static-list",
"operators": [
{
"value": "is part of",
"name": "is part of all"
},
{
"value": "is part of any",
"name": "is part of any"
}
],
"options": [
{
"value": "text",
"name": "Text"
},
{
"value": "template",
"name": "Template"
},
{
"value": "document",
"name": "Document"
}
],
"valueFormat": "startValue: a list of option values."
},
{
"value": "messageTime",
"name": "Message received time",
"type": "date",
"operators": [
{
"value": "is between",
"name": "is between"
},
{
"value": "is on",
"name": "is on"
},
{
"value": "is before",
"name": "is before"
}
],
"valueFormat": "Business hours operators (bh_*): no value, checked against the location's business hours and holidays. \"is on\": startValue = weekday names (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday); \"is between\": startValue and endValue \"HH:mm\" (location time); \"is before\" / \"is after\": startValue \"HH:mm\"; time-ago operators: startValue a number, endValue one of minutes, hours, days, weeks, months."
}
],
"actions": [
{
"value": "send_whatsapp_message",
"name": "Send WhatsApp Message",
"description": "Sends a whatsApp text message to the contact based on the conditions and trigger setup in the rule. This can be used to send replies to a contact when there is an active session.",
"waitTypes": [
{
"value": "minutes",
"name": "minute(s)",
"maxValue": 1440
},
{
"value": "hours",
"name": "hour(s)",
"maxValue": 24
}
],
"modules": [],
"supported": true,
"params": [
{
"key": "textMessage",
"type": "string",
"required": true,
"max": 4096,
"description": "The WhatsApp text. Free text only reaches a contact inside the 24-hour customer service window (after they messaged); outside it use send_whatsapp_template_msg. May contain merge tags such as {{client.firstName}} (see the trigger's mergeTags)."
},
{
"key": "waitType",
"type": "string",
"required": false,
"description": "Delay unit, one of the action's waitTypes in the catalog (each has a maxValue). Waits count from when the rule fires, NOT from the previous action: every action is scheduled from the trigger time. A drip of day 0, 3 and 7 uses waits of 0, 3 and 7 days."
},
{
"key": "waitDuration",
"type": "number",
"required": false,
"description": "Delay in waitType units, from 0 to the wait type's maxValue. Waits count from when the rule fires, NOT from the previous action: every action is scheduled from the trigger time. A drip of day 0, 3 and 7 uses waits of 0, 3 and 7 days."
}
],
"example": {
"actionType": "send_whatsapp_message",
"textMessage": "Thanks for your message! We are outside our business hours right now. Our team will reply as soon as we open."
}
},
{
"value": "send_whatsapp_button_message",
"name": "Send WhatsApp Interactive Message - Buttons",
"description": "Sends a whatsApp message with action buttons to the contact based on the conditions and trigger setup in the rule. This can be used to send replies to a contact when there is an active session.",
"waitTypes": [
{
"value": "minutes",
"name": "minute(s)",
"maxValue": 1440
},
{
"value": "hours",
"name": "hour(s)",
"maxValue": 24
}
],
"modules": [],
"supported": true,
"params": [
{
"key": "textMessage",
"type": "string",
"required": true,
"max": 1024,
"description": "The message body. Inside the 24-hour window only. May contain merge tags such as {{client.firstName}} (see the trigger's mergeTags)."
},
{
"key": "buttons",
"type": "array",
"required": true,
"max": 3,
"items": {
"type": "string",
"max": 20
},
"description": "Quick reply button labels, 1 to 3, at most 20 characters each. A reply arrives as an incoming message with that text."
},
{
"key": "headerType",
"type": "string",
"required": false,
"enum": [
"TEXT",
"IMAGE",
"VIDEO"
],
"description": "TEXT to show headerTextMessage above the body. Media headers (IMAGE, VIDEO, DOCUMENT) are set up in the app."
}
],
"example": {
"actionType": "send_whatsapp_button_message",
"textMessage": "You have unsubscribed from our updates. If you change your mind, tap Resubscribe at any time.",
"buttons": [
"Resubscribe"
]
}
},
{
"value": "send_whatsapp_list_message",
"name": "Send WhatsApp Interactive Message - List Options",
"description": "Sends a whatsApp message with list options to the contact based on the conditions and trigger setup in the rule. This can be used to send replies to a contact when there is an active session.",
"waitTypes": [
{
"value": "minutes",
"name": "minute(s)",
"maxValue": 1440
},
{
"value": "hours",
"name": "hour(s)",
"maxValue": 24
}
],
"modules": [],
"supported": false,
"note": "Set this action up in the app."
}
],
"mergeTags": [
{
"group": "client",
"tags": [
"{{client.id}}",
"{{client.name}}",
"{{client.firstName}}"
]
},
{
"group": "business",
"tags": [
"{{business.name}}",
"{{business.address}}",
"{{business.phone}}"
]
},
{
"group": "general",
"tags": [
"{{currentDate}}",
"{{currentTime}}"
]
}
]
}
List automation rules
/v1/automationsLists automation rules (not deleted), newest update first. trigger filters by trigger value (see the catalog); active is true or false; searchText matches the rule name.
x-api-keystringrequiredlocationIdstringtriggerstringactivestringtrue or false.searchTextstringpageintegerlimitintegeridstringnamestringlocationobjecttriggerstringactivebooleanpriorityintegerconditionTypestring (enum)all, any.overrideHumanAgentbooleanincludeBroadcastbooleancategorystringtemplateIdstringanomalyDetectedbooleanconditionCountintegeractionCountintegercreatedAtstringupdatedAtstringcurl -X GET "https://api.whautomate.com/v1/automations?locationId=Le6dWjQF9K&limit=2" \
-H "x-api-key: YOUR_API_KEY"
[
{
"id": "mfzeroAM9C",
"name": "Satisfaction survey after visit",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"trigger": "APPOINTMENT_UPDATES",
"active": true,
"priority": 1,
"conditionType": "all",
"overrideHumanAgent": false,
"includeBroadcast": false,
"category": "manual",
"templateId": null,
"anomalyDetected": false,
"conditionCount": 1,
"actionCount": 1,
"createdAt": "2026-10-29T11:43:31.138Z",
"updatedAt": "2026-10-29T11:43:31.138Z"
},
{
"id": "PMOEH4F6Ns",
"name": "Drip day 2",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"trigger": "CLIENT_TAG_ADDED",
"active": true,
"priority": 1,
"conditionType": "all",
"overrideHumanAgent": false,
"includeBroadcast": false,
"category": "Customer experience",
"templateId": null,
"anomalyDetected": false,
"conditionCount": 2,
"actionCount": 3,
"createdAt": "2026-10-29T11:43:28.158Z",
"updatedAt": "2026-10-29T11:43:28.158Z"
}
]
Get an automation rule
/v1/automations/{ruleId}Gets an automation rule with its conditions and actions (404 when unknown or deleted).
x-api-keystringrequiredruleIdstringrequiredidstringnamestringlocationobjecttriggerstringactivebooleanpriorityintegerconditionTypestring (enum)all, any.overrideHumanAgentbooleanincludeBroadcastbooleancategorystringtemplateIdstringanomalyDetectedbooleanconditionCountintegeractionCountintegercreatedAtstringupdatedAtstringconditionsobject[]As stored: tags and groups as { id, name } objects
actionsobject[]curl -X GET "https://api.whautomate.com/v1/automations/0aHmDXoGmV" \
-H "x-api-key: YOUR_API_KEY"
{
"id": "0aHmDXoGmV",
"name": "Price list reply",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"trigger": "INCOMING_MESSAGES",
"active": true,
"priority": 1,
"conditionType": "any",
"overrideHumanAgent": false,
"includeBroadcast": false,
"category": "manual",
"templateId": null,
"anomalyDetected": false,
"conditionCount": 1,
"actionCount": 1,
"createdAt": "2026-10-29T12:40:32.589Z",
"updatedAt": "2026-10-29T12:40:32.589Z",
"conditions": [
{
"field": "message",
"operator": "includes",
"startValue": [
"price",
"prices"
],
"endValue": []
}
],
"actions": [
{
"id": "8UfMj81FEN",
"actionType": "send_whatsapp_message",
"textMessage": "Hi! Massages start at S$110 for 60 minutes and classes at S$20. Book online at https://serene.example.com/book",
"emailCategory": "transactional",
"categoryFilter": "",
"contactGroup": [],
"clientTag": [],
"contactTag": []
}
]
}
Create an automation rule
/v1/automationsCreates an automation rule in a location. The rule starts inactive unless active is true. Conditions and actions are checked against the trigger in the catalog (GET /v1/automations/catalog?trigger=); tag and contact group conditions take names (created when missing) or { id } objects. The action fields functions, cardParameters, cardMediaFiles, installFlow, emailSender and mediaBase64 are refused (400): set those in the app. Needs the plan modules of the trigger and of each action.
x-api-keystringrequiredlocationIdstringrequirednamestringrequiredtriggerstringrequiredconditionTypestring (enum)all, any.conditionsobject[]At most 30. Empty or left out: the rule runs on every event of the trigger.
actionsobject[]requiredAt least 1, at most 30, run in order
activebooleanpriorityintegeroverrideHumanAgentbooleanincludeBroadcastbooleanidstringnamestringlocationobjecttriggerstringactivebooleanpriorityintegerconditionTypestring (enum)all, any.overrideHumanAgentbooleanincludeBroadcastbooleancategorystringtemplateIdstringanomalyDetectedbooleanconditionCountintegeractionCountintegercreatedAtstringupdatedAtstringconditionsobject[]As stored: tags and groups as { id, name } objects
actionsobject[]curl -X POST "https://api.whautomate.com/v1/automations" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locationId": "Le6dWjQF9K",
"name": "Price list reply",
"trigger": "INCOMING_MESSAGES",
"conditionType": "any",
"conditions": [
{
"field": "message",
"operator": "includes",
"startValue": [
"price",
"prices",
"how much"
]
}
],
"actions": [
{
"actionType": "send_whatsapp_message",
"textMessage": "Hi! Massages start at S$110 for 60 minutes and classes at S$20. Book online at https://serene.example.com/book"
}
],
"active": true
}'
{
"id": "0aHmDXoGmV",
"name": "Price list reply",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"trigger": "INCOMING_MESSAGES",
"active": true,
"priority": 1,
"conditionType": "any",
"overrideHumanAgent": false,
"includeBroadcast": false,
"category": "manual",
"templateId": null,
"anomalyDetected": false,
"conditionCount": 1,
"actionCount": 1,
"createdAt": "2026-10-29T12:40:32.589Z",
"updatedAt": "2026-10-29T12:40:32.589Z",
"conditions": [
{
"field": "message",
"operator": "includes",
"startValue": [
"price",
"prices"
],
"endValue": []
}
],
"actions": [
{
"id": "8UfMj81FEN",
"actionType": "send_whatsapp_message",
"textMessage": "Hi! Massages start at S$110 for 60 minutes and classes at S$20. Book online at https://serene.example.com/book",
"emailCategory": "transactional",
"categoryFilter": "",
"contactGroup": [],
"clientTag": [],
"contactTag": []
}
]
}
Update an automation rule
/v1/automations/{ruleId}Updates an automation rule. Partial: a field left out keeps its value. null, an empty string or [] clears conditions (the rule then runs on every event of the trigger) and resets priority (1), conditionType (all), active, overrideHumanAgent and includeBroadcast (false). name, trigger and actions cannot be cleared (400). conditions and actions, when sent, replace the whole list. Changing the trigger needs conditions and actions for the new trigger (400 otherwise). Same checks as create.
x-api-keystringrequiredruleIdstringrequirednamestringtriggerstringconditionTypeobjectconditionsobjectactionsobject[]At least 1, at most 30, run in order
activeobjectpriorityobjectoverrideHumanAgentobjectincludeBroadcastobjectidstringnamestringlocationobjecttriggerstringactivebooleanpriorityintegerconditionTypestring (enum)all, any.overrideHumanAgentbooleanincludeBroadcastbooleancategorystringtemplateIdstringanomalyDetectedbooleanconditionCountintegeractionCountintegercreatedAtstringupdatedAtstringconditionsobject[]As stored: tags and groups as { id, name } objects
actionsobject[]curl -X PUT "https://api.whautomate.com/v1/automations/0aHmDXoGmV" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Price list reply (WhatsApp)",
"active": false
}'
{
"id": "0aHmDXoGmV",
"name": "Price list reply (WhatsApp)",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"trigger": "INCOMING_MESSAGES",
"active": false,
"priority": 1,
"conditionType": "any",
"overrideHumanAgent": false,
"includeBroadcast": false,
"category": "manual",
"templateId": null,
"anomalyDetected": false,
"conditionCount": 1,
"actionCount": 1,
"createdAt": "2026-10-29T12:40:32.589Z",
"updatedAt": "2026-10-29T12:40:32.667Z",
"conditions": [
{
"field": "message",
"operator": "includes",
"startValue": [
"price",
"prices"
],
"endValue": []
}
],
"actions": [
{
"id": "8UfMj81FEN",
"actionType": "send_whatsapp_message",
"textMessage": "Hi! Massages start at S$110 for 60 minutes and classes at S$20. Book online at https://serene.example.com/book",
"emailCategory": "transactional",
"categoryFilter": "",
"contactGroup": [],
"clientTag": [],
"contactTag": []
}
]
}
Delete an automation rule
/v1/automations/{ruleId}Deletes an automation rule (it stops running and is no longer listed).
x-api-keystringrequiredruleIdstringrequiredidstringdeletedbooleancurl -X DELETE "https://api.whautomate.com/v1/automations/0aHmDXoGmV" \
-H "x-api-key: YOUR_API_KEY"
{
"id": "0aHmDXoGmV",
"deleted": true
}
Quick Automation templates
List templates
/v1/automations/templatesLists the Quick Automation templates of a location (locationId is required), with whether each is installed, installable and the plan modules it needs.
x-api-keystringrequiredlocationIdstringidstringnamestringcategorystringdescriptionstringinstalledbooleaninstallablebooleanmodulesstring[]curl -X GET "https://api.whautomate.com/v1/automations/templates?locationId=Le6dWjQF9K" \
-H "x-api-key: YOUR_API_KEY"
[
{
"id": "ai-customer-service-chatbot",
"name": "Customer Service GPT for your business - AI Chatbot (WhatsApp)",
"category": "Chatbot",
"description": "Get our AI powered Customer service assistant to respond to queries on your business information which you have uploaded have a seamless bot to human transfer.",
"installed": false,
"installable": false,
"modules": []
},
{
"id": "ai-lead-qualification-chatbot",
"name": "Lead Qualification GPT for your Business - AI Chatbot (WhatsApp)",
"category": "Chatbot",
"description": "Get our AI-powered Lead Qualification assistant to engage, ask smart questions, capture key details like interest, budget, and timeline, and automatically update contact stages and tags — with a seamless bot to human handover when needed.",
"installed": false,
"installable": false,
"modules": []
}
]
Install a template
/v1/automations/templates/{templateId}/installInstalls a template in a location and returns the rules it created. 404 for an unknown template; 409 when another chatbot of the same channel is installed in the location. Needs the plan modules of the template.
x-api-keystringrequiredtemplateIdstringrequiredlocationIdstringrequiredidstringnamestringlocationobjecttriggerstringactivebooleanpriorityintegerconditionTypestring (enum)all, any.overrideHumanAgentbooleanincludeBroadcastbooleancategorystringtemplateIdstringanomalyDetectedbooleanconditionCountintegeractionCountintegercreatedAtstringupdatedAtstringcurl -X POST "https://api.whautomate.com/v1/automations/templates/marketing-opt-out/install" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locationId": "Le6dWjQF9K"
}'
[
{
"id": "FTmBx4ZjMv",
"name": "1. marketing-opt-out",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"trigger": "INCOMING_MESSAGES",
"active": true,
"priority": 1,
"conditionType": "all",
"overrideHumanAgent": true,
"includeBroadcast": false,
"category": "Customer experience",
"templateId": "marketing-opt-out",
"anomalyDetected": false,
"conditionCount": 1,
"actionCount": 4,
"createdAt": "2026-10-29T12:40:32.770Z",
"updatedAt": "2026-10-29T12:40:32.770Z"
},
{
"id": "wRBQ88OD8Y",
"name": "2. marketing-resubscribe",
"location": {
"id": "Le6dWjQF9K",
"title": "Serene Wellness Studio"
},
"trigger": "INCOMING_MESSAGES",
"active": true,
"priority": 1,
"conditionType": "all",
"overrideHumanAgent": true,
"includeBroadcast": false,
"category": "Customer experience",
"templateId": "marketing-opt-out",
"anomalyDetected": false,
"conditionCount": 1,
"actionCount": 4,
"createdAt": "2026-10-29T12:40:32.814Z",
"updatedAt": "2026-10-29T12:40:32.814Z"
}
]