Automations
Update an automation
Partially updates a rule: send only the fields you want to change, and the others stay as they are. The same validation as for creating a rule applies to the fields you send. Returns the updated automation.
- Console only: owner or admin
- Workspace:
X-Tenant-ID
Path parameters
iduuidrequiredAutomation id.
Headers
CookiestringrequiredThe
whatsappx_sessioncookie the app sets when you sign in. Browsers send it automatically; API keys are not accepted on this endpoint.X-Tenant-IDuuidrequiredWorkspace id. Required for session requests. You can pass
?tenant=<id>instead.
Body
application/jsonnamestringoptionalNew rule name.
keywordstringoptionalNew keyword. Stored in lower case.
replystringoptionalNew reply text.
enabledbooleanoptionaltrueto turn the rule on,falseto turn it off.
Response
200 OKapplication/json
iduuidAutomation id.
namestringRule name.
keywordstringKeyword, stored in lower case.
replystringText sent back when the keyword matches.
enabledinteger1when the rule is on,0when it is off.runsintegerHow many times the rule has replied.
created_atintegerCreation time in Unix seconds.
Status codes
- 200OK. The updated automation.
- 400Bad request. No field was sent (
provide name, keyword, reply or enabled), a field failed validation (same messages as when creating), the body is not valid JSON (invalid body), or the id is invalid (invalid automation id). - 401Unauthorized. No signed-in session (
unauthorized). - 403Forbidden. API keys can never call this endpoint (
API keys cannot administer workspaces). A signed-in user who is not an owner or admin getsadmin required; a user who is not a member of the workspace getsforbidden. - 404Not found. No automation with this id in the workspace.
- 500Server error. The rule could not be updated.