Panduan pembalasan.id
Automation Rule

Update automation rule in Account

PATCH
/api/v1/accounts/{account_id}/automation_rules/{id}

Update a automation rule in account

Authorization

userApiKey
api_access_token<token>

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.

In: header

Path Parameters

id*integer

The ID of the automation rule to be updated.

account_id*integer

The numeric ID of the account

id*number

ID of the Automation Rule

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v1/accounts/0/automation_rules/0" \  -H "Content-Type: application/json" \  -d '{}'
{
  "payload": [
    {
      "id": 0,
      "account_id": 0,
      "name": "Add label on message create event",
      "description": "Add label support and sales on message create event if incoming message content contains text help",
      "event_name": "message_created",
      "conditions": [
        {
          "attribute_key": "content",
          "filter_operator": "contains",
          "values": [
            "help"
          ],
          "query_operator": "and"
        }
      ],
      "actions": [
        {
          "action_name": "add_label",
          "action_params": [
            "support",
            "sales"
          ]
        }
      ],
      "created_on": 0,
      "active": true
    }
  ]
}
{
  "description": "string",
  "errors": [
    {
      "field": "string",
      "message": "string",
      "code": "string"
    }
  ]
}
{
  "description": "string",
  "errors": [
    {
      "field": "string",
      "message": "string",
      "code": "string"
    }
  ]
}