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

# Update an Automation's destination

> Change the address an Automation mints to. The virtual account and funding instructions stay the same.

Change the address an Automation sends minted stablecoins to. Use this endpoint to rotate a destination wallet instead of creating a replacement Automation. Brale keeps the same Automation and virtual account. See [Update an Automation's destination](https://docs.brale.xyz/key-concepts/automations.md#update-an-automations-destination) for how the change affects deposits.

**PATCH** `https://api.brale.xyz/accounts/{account_id}/automations/{automation_id}/destination`

Required scope: `automations:write`

## Path parameters

| Parameter | Type | Required | Description |
| :- | :- | :- | :- |
| `account_id` | string (KSUID) | Yes | The account that owns the Automation. |
| `automation_id` | string (KSUID) | Yes | The Automation to update. |

## Request body

The request body accepts only `address_id`. Brale rejects additional properties, including `value_type` and `transfer_type`.

| Field | Type | Required | Description |
| :- | :- | :- | :- |
| `address_id` | string (KSUID) | Yes | The ID of the address that receives stablecoins from future deposits. The address must belong to the account in the path. |

```json Request theme={null}
{
  "address_id": "3F2kQ9vXbT7mLpR4sN8wYcHdJ1a"
}
```

## What you can change

| Destination field | Can change | Notes |
| :- | :- | :- |
| `destination.address_id` | Yes | Set it with `address_id` in the request body. |
| `destination.value_type` | No | The stablecoin the Automation mints stays the same. |
| `destination.transfer_type` | No | The chain the Automation mints on stays the same. |

To mint a different stablecoin or mint on a different chain, [create a new Automation](https://docs.brale.xyz/api-reference/brale/create-automations.md).

## Supported statuses

| Automation `status` | Can update destination |
| :- | :- |
| `pending` | Yes |
| `active` | Yes |
| `disabled` | Yes |
| `archived` | No. Brale returns `409 Conflict`. |

## Responses

### 200 OK

Brale returns the complete updated Automation with the new `destination.address_id`. `status`, `source.funding_instructions`, `destination.value_type`, and `destination.transfer_type` are unchanged.

```json Response theme={null}
{
  "id": "35kVg1llbsOBYvx9XKr9eOtsD9z",
  "name": "Customer XYZ Automation",
  "status": "active",
  "source": {
    "transfer_type": null,
    "value_type": "USD",
    "funding_instructions": {
      "bank_address": "123 Example St, Example City, NY 10001",
      "beneficiary_address": "25 Main Ave, Suite 100, Example City, IA 50000",
      "beneficiary_name": "Company ABC",
      "routing_number": "000111222",
      "account_number": "000123456789",
      "bank_name": "Example Bank",
      "memo": null
    }
  },
  "destination": {
    "transfer_type": "solana",
    "address_id": "3F2kQ9vXbT7mLpR4sN8wYcHdJ1a",
    "value_type": "SBC"
  },
  "updated_at": "2026-11-20T16:02:11.204118Z",
  "created_at": "2025-11-20T15:56:03.531196Z"
}
```

### Errors

| Status | When Brale returns it |
| :- | :- |
| `400 Bad Request` | `address_id` is missing or empty, the body contains a field other than `address_id`, the address does not exist, or the address belongs to another account. |
| `401 Unauthorized` | Authentication is missing or invalid. |
| `403 Forbidden` | The token does not have the `automations:write` scope. |
| `404 Not Found` | The account or Automation does not exist. |
| `409 Conflict` | The Automation is archived. Archived Automations cannot be updated. |
| `422` | The address is not compatible with the Automation's blockchain environment, or an Automation on a transactional account targets a Brale-custodied address. |

`400`, `404`, and `409` responses return an error object with `type`, `code`, `status`, and `detail`. `401`, `403`, and `422` responses return an `errors` array.
