# Update or reorder a shield rule

> Replace a rule's definition, or move it in the evaluation order.

`PUT https://inboundr.net/api/v1/shield-rules/{id}`

This endpoint does one of two things depending on the body you send.

## Replace the rule

Send the same body as [Create](/api-reference/shield-rules/create). It is a
whole-object replace rather than a merge: a rule's conditions only mean anything
as a set, so "merge my two conditions into your three" has no answer you'd
reliably predict.

Set `enabled: false` to switch a rule off without losing its definition or its
place in the order.

```json
{
  "name": "Drop flagged spam",
  "action": "block",
  "enabled": false,
  "conditions": [
    { "field": "spam_verdict", "operator": "equals", "value": "FAIL" }
  ]
}
```

## Move it in the order

Send only `move`. The rule swaps places with its neighbour and the whole
account's priorities are renumbered from zero.

```json
{ "move": "up" }
```

<ParamField body="move" type="string">
  `up` or `down`. Moving past either end is a no-op, not an error.
</ParamField>

To set the whole arrangement at once instead — which is what a drag-and-drop UI
needs, since a drag can cross several positions — use
[Reorder](/api-reference/shield-rules/reorder).

<ResponseExample>
```json 200
{
  "order": ["gr_456", "gr_123", "gr_789"]
}
```
</ResponseExample>

<Note>
  Order decides which of two matching rules fires, so a reorder changes what
  happens to your mail even though no rule's own definition changed. It is
  recorded in the account's audit trail.
</Note>
