# `bird amb routing-rules update`

## Usage

```bash
bird amb routing-rules update <routing-rule-id> [flags]
```

## Description

Update an Apple Messages for Business routing rule

Changes a routing rule's queue, precedence, or default status. What it matches is fixed once created; to change that, delete this rule and create another. Setting `is_default` to true while the business already has a different default rule returns a `409`.

Build the request from flags, a JSON AMBRoutingRuleUpdate body via --body-file ("-" reads
stdin), or both — a flag overrides the matching body field. Run --example to
print a ready-to-edit body, or --dry-run to print the resolved request without
sending it.

## Examples

```bash
# print the body shape (no credentials needed)
bird amb routing-rules update --example

# the body it prints:
```

```json
{
  "precedence": 20
}
```

## Options

#### Request

| Name                | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| `--body-file`       | Read the JSON request body from this file; "-" reads stdin   |
| `--example`         | Print a complete example request body, then exit             |
| `--dry-run`         | Print the resolved request without sending it, then exit     |
| `--idempotency-key` | Deduplication key; a retry with the same key won't act twice |

#### Options

| Name                | Description                                                                                                                                                                                                                |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--queue`           | Change the queue this rule files a matching conversation into. What the rule matches is fixed once created; to change that, delete this rule and create another.                                                           |
| `--precedence <n>`  | Change this rule's evaluation order among the business's other rules.                                                                                                                                                      |
| `--is-default`      | Set to true to make this the rule that catches a conversation matching nothing else, or to false to stop it from being the default. Setting it true while the business already has a different default rule returns a 409. |
| `--response-schema` | Print the fields this command returns, then exit                                                                                                                                                                           |

## Related

| Name                                                                            | Description                                        |
| ------------------------------------------------------------------------------- | -------------------------------------------------- |
| [`bird amb routing-rules create`](/docs/cli/reference/amb-routing-rules-create) | Create an Apple Messages for Business routing rule |
| [`bird amb routing-rules delete`](/docs/cli/reference/amb-routing-rules-delete) | Delete an Apple Messages for Business routing rule |
| [`bird amb routing-rules get`](/docs/cli/reference/amb-routing-rules-get)       | Get an Apple Messages for Business routing rule    |
| [`bird amb routing-rules list`](/docs/cli/reference/amb-routing-rules-list)     | List Apple Messages for Business routing rules     |

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
