# Update a webhook subscription.

`PUT /webhooks/{id}`

> Wheelhouse Revenue Management API. Web version: https://docs.usewheelhouse.com/rm/reference/rm-update-webhook · OpenAPI spec: https://docs.usewheelhouse.com/rm/openapi.yaml · Operation ID: `rmUpdateWebhook` · Tag: Webhooks

Updates the fields provided and leaves the rest unchanged. Passing `event_types` **replaces** the subscribed set rather than adding to it; omitting it leaves the current set alone.

Set `enabled` to `false` to pause delivery, and `true` to resume it. Resuming also clears the accumulated failure count, so a subscription disabled automatically after sustained failures starts fresh once the endpoint is healthy again.

## Request

`PUT https://api.usewheelhouse.com/ss_api/v1/webhooks/{id}`

Authentication: send your RM API key in the `X-Integration-Api-Key` header (see https://docs.usewheelhouse.com/rm/authentication.md). Modifies data; read-only keys get `403 Forbidden`.

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | integer | yes | The Wheelhouse internal subscription ID. |

### Request body (`application/json`, required)

- `url` (string): HTTPS endpoint that deliveries are posted to.
- `event_types` (array of string, each item one of: `recommendations.updated`, `reservations.ingested`, `flags.detected`): Replaces the event types this subscription receives.
- `description` (string): Label for this subscription.
- `enabled` (boolean): Set `false` to pause delivery, `true` to resume it.

### Example request

```bash
curl -X PUT 'https://api.usewheelhouse.com/ss_api/v1/webhooks/{id}' \
  -H 'X-Integration-Api-Key: <your RM API key>' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

Only required parameters and body fields are filled in, with placeholder values. Add the optional ones you need from the lists above; some are required in combination, as their descriptions say.

## Responses

### 200

The updated subscription.

Body (`application/json`): object `webhook`

A registered webhook subscription.

- `id` (integer, required): The Wheelhouse internal subscription ID.
- `url` (string, required, example: `https://example.com/wheelhouse/webhooks`): The HTTPS endpoint deliveries are posted to.
- `description` (string, nullable): Label for this subscription.
- `event_types` (array of string, required): The event types this subscription receives.
- `enabled` (boolean, required): Whether deliveries are being sent. Set to `false` automatically after sustained
  delivery failures; re-enable with `PUT /webhooks/{id}`.
- `consecutive_failures` (integer): Failed deliveries since the last successful one. Reset on success.
- `disabled_at` (string (date-time), nullable): When the subscription was disabled, automatically or otherwise (ISO-8601).
- `last_delivered_at` (string (date-time), nullable): When a delivery to this endpoint last succeeded (ISO-8601).
- `created_at` (string (date-time)): When the subscription was created (ISO-8601).

Example shape (generated from the schema; placeholder values, not a real response):

```json
{
  "id": 0,
  "url": "https://example.com/wheelhouse/webhooks",
  "description": "string",
  "event_types": [
    "string"
  ],
  "enabled": true,
  "consecutive_failures": 0,
  "disabled_at": "2026-01-01T00:00:00Z",
  "last_delivered_at": "2026-01-01T00:00:00Z",
  "created_at": "2026-01-01T00:00:00Z"
}
```

### 400

An unknown event type was provided.

### 401

API key authorization failed.

### 403

The API key is read-only and may not be used to update a webhook.

### 404

No such webhook subscription for this user.

### 409

A concurrent webhook request for this user is already in progress. Retry once it completes.

### 422

The endpoint was rejected. It must be an `https` URL on port 443 that
resolves to a publicly routable address. This is re-checked before every
delivery, so an endpoint that stops meeting it also stops receiving events.

### 429

Rate limit exceeded — the API key has sent too many requests. Wait before retrying. See the **Rate Limits** section in the overview for the recommended exponential backoff strategy.

Body (`application/json`): object

- `error` (string, example: `API token is at rate limit`)

Example shape (generated from the schema; placeholder values, not a real response):

```json
{
  "error": "API token is at rate limit"
}
```
