GET
/
api
/
v1
/
accounts
/
{account_id}
/
automation_rules
/
{id}
Get a automation rule details
curl --request GET \
  --url https://app.chatwoot.com/api/v1/accounts/{account_id}/automation_rules/{id} \
  --header 'api_access_token: <api-key>'
{
  "payload": {
    "id": 90,
    "account_id": 1,
    "name": "add-label-bug-if-message-contains-bug",
    "description": "add-label-bug-if-message-contains-bug",
    "event_name": "message_created",
    "conditions": [
      {
        "values": [
          "incoming"
        ],
        "attribute_key": "message_type",
        "query_operator": "and",
        "filter_operator": "equal_to"
      },
      {
        "values": [
          "bug"
        ],
        "attribute_key": "content",
        "filter_operator": "contains"
      }
    ],
    "actions": [
      {
        "action_name": "add_label",
        "action_params": [
          "bugs",
          "support-query"
        ]
      }
    ],
    "created_on": 1650555440,
    "active": true
  }
}

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

account_id
integer
required

The numeric ID of the account

id
integer
required

The ID of the automation rule to be updated.

Response

Success

payload

Response payload that contains automation rule(s) Array of automation rules (for listing endpoint)