---
title: "Update webhook endpoint"
method: PUT
path: "/v1/webhooks/{webhook_id}"
tags: ["Webhooks"]
---

# Update webhook endpoint

`PUT /v1/webhooks/{webhook_id}`

## Request

- Base URL: `https://api.oilpriceapi.com`
- URL: `https://api.oilpriceapi.com/v1/webhooks/{webhook_id}`
- Auth: API key in header `Authorization`

Update an existing webhook endpoint configuration.
**Requires the Scale plan.**

## Path parameters

- `webhook_id` string, required

## Request body

- UpdateWebhookRequest
  - `url` string, uri: Webhook endpoint URL (must be HTTPS)
  - `events` string[]: Events to subscribe to
  - `active` boolean: Enable or disable the webhook
  - `description` string: Optional description for the webhook

## Response `200`

Webhook endpoint updated successfully

- WebhookResponse
  - `success` boolean
  - `webhook` Webhook
    - `id` string
    - `url` string, uri
    - `events` string[]
    - `secret` string: HMAC signing secret for verification
    - `active` boolean
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `last_delivery` object
      - `attempted_at` string, date-time
      - `status` 'success' | 'failed' | 'pending'
      - `response_code` integer

## Other responses

- `403`: Insufficient plan - Scale required
- `404`: Webhook not found
- `500`: Unexpected server error. Retry transient failures with bounded backoff and retain the request ID when contacting support.

## Changes

- **2026-10-20** `b987321524a8`: 1 info
  - added the new `alert.triggered` enum value to the request property `events/items/`

[Operation history](https://skmtc.dev/oilpriceapi/apis/oil-price-api-v1/changes/v1/webhooks/:webhook_id/put.md)

---

[API](https://skmtc.dev/oilpriceapi/apis/oil-price-api-v1.md) - [All operations](https://skmtc.dev/oilpriceapi/apis/oil-price-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/oilpriceapi/apis/oil-price-api-v1/revisions/7f8b4d763210?raw)
