# Update a subscription

> Currently the only supported update is toggling active, there's no way to change targetUrl or eventTypes in place; delete and recreate the subscription…

Source: https://warmerly.com/docs/webhooks/update-a-subscription

```text
PATCH /webhooks/subscriptions/{id}
```

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `active` | boolean | Yes | Enable or disable delivery. Any update also resets `consecutiveFailures` to 0 and clears `lastDeliveryError`. |

Currently the only supported update is toggling `active`, there's no way to change `targetUrl` or `eventTypes` in place; delete and recreate the subscription instead. This endpoint is also how you manually re-enable a subscription the delivery sweep auto-disabled (see [Delivery & retries](https://warmerly.com/docs/webhooks/update-a-subscription#delivery--retries)).

```bash
curl -X PATCH https://app.warmerly.com/api/v1/webhooks/subscriptions/e5b3a7c2-8d4e-4f0a-9c2b-6a1d3e8f5c7b \
  -H "X-Api-Key: wmv_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "active": true }'
```

```json
{
  "subscription": {
    "id": "e5b3a7c2-8d4e-4f0a-9c2b-6a1d3e8f5c7b",
    "name": "Mailbox alerts",
    "targetUrl": "https://example.com/hooks/warmerly",
    "eventTypes": ["score_drop", "auto_paused", "oauth_disconnected"],
    "active": true
  }
}
```

`400 bad_request` (`invalid_body`) if `active` is missing or not a boolean, `403 agency_plan_required` on a non-Agency workspace, and `404 not_found` if the subscription doesn't exist, isn't yours, or was deleted.

## More from Webhooks

- [Create a subscription](https://warmerly.com/docs/webhooks/create-a-subscription): Each user can hold at most 10 subscriptions that have not been deleted (disabled ones count); creating an…
- [Delete a subscription](https://warmerly.com/docs/webhooks/delete-a-subscription): Revokes (soft-deletes) the subscription; deliveries stop immediately. Not gated on plan tier, a downgraded…
- [Delivery & retries](https://warmerly.com/docs/webhooks/delivery-and-retries): Deliveries are dispatched by a background sweep (not real-time) that polls for new events every 5 minutes.…
