---
title: "Update a webhook."
method: PUT
path: "/api/Webhooks/{id}"
tags: ["Webhooks"]
---

# Update a webhook.

`PUT /api/Webhooks/{id}`

## Request

- Base URL: `https://api.3dprintlog.com`
- URL: `https://api.3dprintlog.com/api/Webhooks/{id}`
- Auth: OAuth 2 (authorization code, authorization URL `https://3dprintlog.auth0.com/authorize`, token URL `https://3dprintlog.auth0.com/oauth/token`)

Replaces the URL, events and description; `enabled` is left as it is when omitted.
Turning a webhook that failures switched off back on resets its failure count. The secret
does not change.

## Path parameters

- `id` string, uuid, required

## Request body

- PrintLogApiModelsDTOsWebhookSaveWebhookSubscriptionDto: The body of `POST /api/Webhooks` and `PUT /api/Webhooks/{id}`.
  - `url` string, nullable: An absolute http or https URL on a public address.
  - `description` string, nullable: A label, at most 100 characters.
  - `events` string[], nullable: The events to send; omitted or empty means all of them.
  - `enabled` boolean, nullable: Omitted means on when creating and unchanged when updating.

## Response `200`

The updated webhook.

- PrintLogApiModelsDTOsWebhookWebhookSubscriptionDto: A webhook subscription as its owner sees it. Never carries the secret.
  - `id` string, uuid
  - `url` string, nullable
  - `description` string, nullable
  - `events` string[], nullable: `print.started`, `print.finished` and/or `print.failed`.
  - `enabled` boolean
  - `consecutiveFailures` integer: Deliveries in a row that failed after their retries.
  - `lastDeliveryAt` string, date-time, nullable
  - `lastStatusCode` integer, nullable: The HTTP status of the last delivery, or null when no response came back.
  - `lastDeliveryResult` string, nullable: `success`, `http_error`, `timeout`, `connection_failed` or `blocked_address`; null before the first delivery.
  - `autoDisabledAt` string, date-time, nullable: When repeated failures turned it off; turning it back on clears this.
  - `createdDate` string, date-time
  - `updatedDate` string, date-time

## Other responses

- `400`: The URL or events are not valid.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: The webhook is not yours.
- `503`: Service Unavailable

---

[API](https://skmtc.dev/3dprintlog/apis/3d-print-log-api.md) · [All operations](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/llms.txt) · [OpenAPI document](https://skmtc.dev/3dprintlog/apis/3d-print-log-api/revisions/dfc3a4df4e38?raw)
