# Change a standing message rule

Edits one standing rule: `name`, `description`, `enabled`, `triggerEvent`, `entityKind`, `triggerCondition`, `templateId` (or `clearTemplate: true` to leave it naming no template), `requiresApproval`, `recipientField`. An absent field leaves the column alone. `enabled: false` is how a rule is switched off and kept — the reversible alternative to `delete_message-automation-rules_id`.

Access class: `workspace`.

## Endpoint

`PATCH /v1/message-automation-rules/{id}`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "clearTemplate": true,
    "description": "string",
    "enabled": true,
    "entityKind": "string",
    "name": "string",
    "recipientField": "string",
    "requiresApproval": true,
    "templateId": 1,
    "triggerCondition": {},
    "triggerEvent": "string"
  },
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "channel": "string",
    "createdAt": "string",
    "createdByUserId": 1,
    "description": "string",
    "detail": {},
    "enabled": true,
    "entityKind": "string",
    "id": 1,
    "name": "string",
    "recipientField": "string",
    "requiresApproval": true,
    "templateId": 1,
    "triggerCondition": {},
    "triggerEvent": "string",
    "updatedAt": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
