> ## 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 Webhook Subscription

> Update the URL or subscribed event types for an active webhook subscription.

```
PATCH /accounts/{account_id}/webhooks/subscriptions/{subscription_id}
```

Updates an active webhook subscription. At least one of `url` or `events` must be provided. When `events` is sent, it replaces the full set of subscribed event types — it is not additive.

## Request body fields

| Field | Type | Required | Description |
| - | - | - | - |
| `url` | string | At least one of `url` or `events` | New HTTPS destination URL for webhook `POST` requests. Max 2048 characters. |
| `events` | array of strings | At least one of `url` or `events` | Replaces all currently subscribed event types. Accepts concrete event types (e.g., `transfer.completed`) and namespace wildcards (e.g., `transfer.*`). See [supported event types](https://docs.brale.xyz/webhooks/webhook-events.md) and [Wildcard event subscriptions](https://docs.brale.xyz/api-reference/brale/create-webhook-subscription.md#wildcard-event-subscriptions). |

### Example: change URL only

```json theme={null}
{
  "url": "https://your-server.example.com/webhooks/brale"
}
```

### Example: replace subscribed events

```json theme={null}
{
  "events": ["transfer.completed", "transfer.failed"]
}
```

### Example: replace with a wildcard

Subscribe to every event in a family by using a `<namespace>.*` wildcard. Wildcards work for all event families (`transfer.*`, `payment.*`, `account.*`, etc.).

```json theme={null}
{
  "events": ["transfer.*", "account.*"]
}
```

## Error responses

* `400` — empty patch body (no fields provided).
* `404` — subscription not found or not owned by the account.
* `409` — subscription is already archived; archived subscriptions cannot be updated.
* `422` — unsupported event type or unknown wildcard namespace, or `events` array was empty when the `events` key was sent.

Required scope: `webhooks:write`.

## Related endpoints

* [Create webhook subscription](https://docs.brale.xyz/api-reference/brale/create-webhook-subscription.md)
* [List webhook subscriptions](https://docs.brale.xyz/api-reference/brale/list-webhook-subscriptions.md)
* [Get webhook subscription](https://docs.brale.xyz/api-reference/brale/get-webhook-subscription.md)
* [Archive webhook subscription](https://docs.brale.xyz/api-reference/brale/archive-webhook-subscription.md)
* [List delivery attempts](https://docs.brale.xyz/api-reference/brale/list-webhook-delivery-attempts.md)
* [Webhooks overview](https://docs.brale.xyz/webhooks/overview.md)
