---
title: "Update a webhook subscription"
method: PATCH
path: "/api/v1/webhooks/{webhookId}"
tags: ["webhooks"]
---

# Update a webhook subscription

`PATCH /api/v1/webhooks/{webhookId}`

## Request

- Base URL: `https://api.textbee.dev`
- URL: `https://api.textbee.dev/api/v1/webhooks/{webhookId}`
- Auth: API key in header `x-api-key`

Changes only the fields you send. Use isActive to re-enable a subscription textbee paused after repeated failures.

## Path parameters

- `webhookId` string, required

## Request body

- UpdateWebhookDto
  - `name` string: Label shown in the dashboard. Up to 64 characters.
  - `isActive` boolean: Whether deliveries are attempted. Set it to true to re-enable a subscription textbee paused after repeated failures.
  - `deliveryUrl` string: New delivery URL. Same rules as on create: http or https, no private or loopback hosts.
  - `signingSecret` string: New signing secret, at least 20 characters.
  - `events` string[]: Replacement event list. Cannot be empty.

## Response `200`

The updated subscription.

- WebhookResponseDTO
  - `data` WebhookSubscriptionDTO, required
    - `_id` string, required: Subscription id.
    - `user` string, required: Owner account id.
    - `name` string: Label shown in the dashboard.
    - `isActive` boolean, required: Whether deliveries are attempted. textbee pauses subscriptions that keep failing.
    - `events` string[], required: Events this subscription receives.
    - `deliveryUrl` string, required: URL events are POSTed to.
    - `signingSecret` string, required: Secret used to sign deliveries.
    - `successfulDeliveryCount` number, required: Deliveries that succeeded.
    - `deliveryFailureCount` number, required: Deliveries that failed.
    - `deliveryAttemptCount` number, required: Delivery attempts made, retries included.
    - `lastDeliveryAttemptAt` string, date-time: Last time a delivery was attempted.
    - `lastDeliverySuccessAt` string, date-time: Last time a delivery succeeded.
    - `lastDeliveryFailureAt` string, date-time: Last time a delivery failed.
    - `notes` WebhookNoteDTO[]: Notes textbee added, such as an auto-pause reason.
      - `at` string, date-time, required: When the note was added.
      - `text` string, required: What textbee recorded, for example why the subscription was paused.
    - `createdAt` string, date-time, required: When the subscription was created.
    - `updatedAt` string, date-time, required: When it was last updated.

## Other responses

- `400`: The delivery URL is unusable, the signing secret is shorter than 20 characters, or the event list is empty or unknown.
- `401`: Missing, invalid, or revoked API key.
- `404`: No webhook subscription with that id on your account.

---

[API](https://skmtc.dev/textbee/apis/textbee-api.md) · [All operations](https://skmtc.dev/textbee/apis/textbee-api/llms.txt) · [OpenAPI document](https://skmtc.dev/textbee/apis/textbee-api/revisions/e720417e9514?raw)
