PATCH
/
v1
/
automation
/
rules
/
{ruleID}
Enable or disable automation rule
curl --request PATCH \
  --url https://api.wazapin.com/v1/automation/rules/{ruleID} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "enabled": true
}
'
{
  "data": {
    "actions": [
      {
        "type": "<string>",
        "agent_id": "<string>",
        "fixed_agent_id": "<string>",
        "label": "<string>",
        "label_id": "<string>",
        "strategy": "<string>"
      }
    ],
    "created_at": "<string>",
    "created_by": "<string>",
    "enabled": true,
    "id": "<string>",
    "name": "<string>",
    "organization_id": "<string>",
    "scope": {
      "channel_type": "<string>",
      "conversation_id": "<string>"
    },
    "trigger": {
      "event": "<string>",
      "events": [
        "<string>"
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

Session token or API key

Path Parameters

ruleID
string
required

Automation rule ID

Body

application/json
enabled
boolean | null
required

Enable/disable the rule

Response

OK

data
object
required