---
title: "Update a webhook subscription"
method: PUT
path: "/api/external/v2/webhook_subscriptions/{id}"
tags: ["Hidden"]
---

# Update a webhook subscription

`PUT /api/external/v2/webhook_subscriptions/{id}`

This endpoint allows you to update a webhook subscription by ID.

## Path parameters

- `id` integer, required

## Request body

- object
  - `callback_url` string, uri — HTTPS URL where webhook events will be sent
  - `events` string[] — Array of event types to subscribe to. - `customer_invoice.e_invoicing_status_updated`: the event is triggered when a customer invoice e-invoicing status is updated. - `dms_file.created`: the event is triggered when a dms file is created.
  - `enabled` boolean — Indicates whether the webhook subscription is active

## Response `200`

Returns the updated webhook subscription

- object
  - `id` integer, required — ID of the webhook subscription
  - `callback_url` string, uri, required — HTTPS URL where webhook events are sent
  - `events` string[], required — Array of event types to subscribe to. - `customer_invoice.e_invoicing_status_updated`: the event is triggered when a customer invoice e-invoicing status is updated. - `dms_file.created`: the event is triggered when a dms file is created.
  - `enabled` boolean, required — Indicates whether the webhook subscription is active
  - `disabled_at` string, date-time, nullable, required — Timestamp when the subscription was disabled
  - `disabled_reason` 'permanent_error' | 'repeated_failure' | 'manual', nullable, required — Reason the subscription was disabled. - `permanent_error`: disabled due to a permanent delivery error (HTTP 401, 403, 404, or 410). - `repeated_failure`: disabled after repeated delivery failures over a sustained period. - `manual`: disabled manually via the API.
  - `last_failure_status` integer, nullable, required — HTTP status code of the last failed delivery attempt
  - `last_failure_at` string, date-time, nullable, required — Timestamp of the last failed delivery attempt
  - `consecutive_failures` integer, required — Number of consecutive delivery failures since the last successful delivery
  - `created_at` string, date-time, required — Creation date of the webhook subscription
  - `updated_at` string, date-time, required — Last update date of the webhook subscription

## Other responses

- `400` — Bad request
- `401` — Access token is missing or invalid
- `403` — Access to this resource forbidden
- `404` — The resource was not found
- `422` — Unprocessable content

---

[API](https://skmtc.net/pennylane/apis/company-v2.md) · [All operations](https://skmtc.net/pennylane/apis/company-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pennylane/company-v2/revisions/a5b7236473c6/schema)
