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

# Update Rule

> Update an existing routing rule

<ParamField path="ruleId" type="string" required>
  Rule identifier
</ParamField>

## Request Body

All fields are optional. Supported fields include:

* `name`, `description`
* `type`, `conditions`
* `destinationUrl`
* `priority`, `enabled`
* deep-link fields (`deepLinkEnabled`, `deepLinkIos`, `deepLinkAndroid`, `deepLinkFallbackUrl`, `inappBrowserBreakout`)
* redirect behavior flags (`forwardUtms`, `preserveQueryParams`, `redirectDelayMs`)

## Access and gates

* Permission: `rules:update`
* Plan gating applies for advanced rule types and deep-link features

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT https://api.linquid.io/api/rules/rule_def456 \
    -H "Authorization: Bearer <token>" \
    -H "Content-Type: application/json" \
    -d '{
      "enabled": false,
      "priority": 2
    }'
  ```
</RequestExample>

## Common Errors

* `400`: invalid rule conditions, URL validation failure
* `403`: feature not available for current plan
* `404`: rule not found
