> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# supportDefaultRuleUpdate

> Change one built-in support rule, as its settings in the app do: the Settings pages show the change, and the rules engine runs it from the next ticket event. A store that never saved the rule starts from what its help desk settings imply. Returns the rule afterwards, in the shape supportDefaultRules returns; a call that changes nothing returns it unchanged. Its position never changes. The assignment, AI reply and CSAT kinds can't be updated yet: BAD_USER_INPUT.

**Required scopes:** [`support_rules_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-support_rules_write)

## Arguments

**input** `[SupportDefaultRuleUpdateInput!](/docs/api-reference/v3/reference/support/support-default-rule-update-input)` *required*

**fields**

**autoMerge** `[SupportAutoMergeUpdateInput](/docs/api-reference/v3/reference/support/support-auto-merge-update-input)`

Only for AUTO\_MERGE\_OPEN\_TICKETS.

**fields**

**addExcludedSenders** `[String!]`

**lookBackWindow** `[SupportDurationInput](/docs/api-reference/v3/reference/support/support-duration-input)`

Replaces the window. Omitted, the window is kept (24 hours for a store that never set one).

**removeExcludedSenders** `[String!]`

**autoSplitSenders** `[SupportAutoSplitSendersUpdateInput](/docs/api-reference/v3/reference/support/support-auto-split-senders-update-input)`

Only for AUTO\_SPLIT\_SENDERS.

**fields**

**addSenders** `[String!]`

**removeSenders** `[String!]`

**blockedSenders** `[SupportBlockedSendersUpdateInput](/docs/api-reference/v3/reference/support/support-blocked-senders-update-input)`

Only for ARCHIVE\_BLOCKED\_SENDERS.

**fields**

**addEmails** `[String!]`

**removeEmails** `[String!]`

**enabled** `Boolean`

**kind** `[SupportDefaultRuleKind!](/docs/api-reference/v3/reference/support/support-default-rule-kind)` *required*

## Returns

**supportDefaultRuleUpdate** `[SupportDefaultRule!](/docs/api-reference/v3/reference/support/support-default-rule)` *required*

A built-in support rule. Every store has exactly one of each kind. Rules the store creates itself are separate.

**fields**

**description** `String!` *required*

What the rule does, as shown in the app.

**enabled** `Boolean!` *required*

Whether the rule runs.

**kind** `[SupportDefaultRuleKind!](/docs/api-reference/v3/reference/support/support-default-rule-kind)` *required*

Which built-in rule this is. Unique within the store, so it identifies the rule.

**name** `String!` *required*

Name shown in the app's rules list.

**position** `Int!` *required*

Rules run in ascending position. Rules the store creates share this sequence.

**Possible types:** [`SupportAiReplyOnCustomerMessageRule`](https://developers.redo.com/docs/api-reference/v3/reference/support/support-ai-reply-on-customer-message-rule), [`SupportArchiveBlockedSendersRule`](https://developers.redo.com/docs/api-reference/v3/reference/support/support-archive-blocked-senders-rule), [`SupportAssignAiOnTicketCreatedRule`](https://developers.redo.com/docs/api-reference/v3/reference/support/support-assign-ai-on-ticket-created-rule), [`SupportAssignOnCustomerMessageRule`](https://developers.redo.com/docs/api-reference/v3/reference/support/support-assign-on-customer-message-rule), [`SupportAssignOnReplyRule`](https://developers.redo.com/docs/api-reference/v3/reference/support/support-assign-on-reply-rule), [`SupportAutoMergeOpenTicketsRule`](https://developers.redo.com/docs/api-reference/v3/reference/support/support-auto-merge-open-tickets-rule), [`SupportAutoSplitSendersRule`](https://developers.redo.com/docs/api-reference/v3/reference/support/support-auto-split-senders-rule), [`SupportCsatSurveyOnCloseRule`](https://developers.redo.com/docs/api-reference/v3/reference/support/support-csat-survey-on-close-rule), [`SupportToggleDefaultRule`](https://developers.redo.com/docs/api-reference/v3/reference/support/support-toggle-default-rule)

## Errors

Besides the [errors any request can return](https://developers.redo.com/docs/api-reference/v3/errors.md), this operation fails with these codes in `extensions.code`.

| Code | HTTP status | Meaning | Retry |
| - | - | - | - |
| `API_TOKEN_REQUIRED` | `403` | The credential has no API token to attribute the change to, such as a first-party token. Nothing was sent. | Call with a store API token. |
| `BAD_USER_INPUT` | `400` | An argument is invalid, or names something the store doesn't have. The message says which. Nothing was written. | Fix the input the message names, then send it again. |
| `TRY_AGAIN` | `503` | The change couldn't start for a passing reason, and nothing was written or sent. | Send the same request again after a short wait, with the same idempotencyKey if it has one. |
| `INTERNAL_SERVER_ERROR` | `500` | Something failed on Redo's side. The change may or may not have been made. | Read the record to see whether the change was made before sending it again. A send with an idempotencyKey is safe to retry with the same key. |

## Example

```graphql theme={null}
mutation {
  supportDefaultRuleUpdate(input: { ... }, kind: AI_REPLY_ON_CUSTOMER_MESSAGE) {
    description
    enabled
    kind
    name
    position
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.