---
title: "Update webhook"
method: PUT
path: "/v2/webhooks/{webhookId}"
tags: ["Webhooks/Webhooks"]
---

# Update webhook

`PUT /v2/webhooks/{webhookId}`

Updates a webhook using values specified by a webhook object passed as JSON
in the POST payload.
If the object does not define a specific property, its value will not be
updated.

The response is the full webhook object as returned by the
[Get webhook](#/reference/webhooks/webhook-object/get-webhook) endpoint.

The request needs to specify the `Content-Type: application/json` HTTP
header!

When providing your API authentication token, we recommend using the
request's `Authorization` header, rather than the URL. ([More
info](#/introduction/authentication)).

## Path parameters

- `webhookId` string, required

## Request body

- WebhookUpdate
  - `isAdHoc` boolean, nullable
  - `eventTypes` WebhookEventType[], nullable
  - `condition` WebhookCondition
    - `actorId` string, nullable
    - `actorTaskId` string, nullable
    - `actorRunId` string, nullable
  - `ignoreSslErrors` boolean, nullable
  - `doNotRetry` boolean, nullable
  - `requestUrl` string, uri, nullable
  - `payloadTemplate` string, nullable
  - `headersTemplate` string, nullable
  - `description` string, nullable
  - `shouldInterpolateStrings` boolean, nullable

## Response `200`

- WebhookResponse — Response containing webhook data.
  - `data` Webhook, required
    - `id` string, required
    - `createdAt` string, date-time, required
    - `modifiedAt` string, date-time, required
    - `userId` string, required
    - `isAdHoc` boolean, nullable
    - `shouldInterpolateStrings` boolean, nullable
    - `eventTypes` WebhookEventType[], required
    - `condition` WebhookCondition, required
      - `actorId` string, nullable
      - `actorTaskId` string, nullable
      - `actorRunId` string, nullable
    - `ignoreSslErrors` boolean, required
    - `doNotRetry` boolean, nullable
    - `requestUrl` string, uri, nullable — URL of the HTTP request sent by the webhook. It is omitted or `null` for hook actions other than the conventional HTTP case (e.g. Slack or email notifications).
    - `payloadTemplate` string, nullable
    - `headersTemplate` string, nullable
    - `description` string, nullable
    - `lastDispatch` ExampleWebhookDispatch
      - `status` 'ACTIVE' | 'SUCCEEDED' | 'FAILED', required — Status of the webhook dispatch indicating whether the HTTP request was successful.
      - `finishedAt` string, date-time, nullable
      - `removedAt` string, date-time, nullable
    - `stats` WebhookStats
      - `totalDispatches` integer

## Other responses

- `400` — Bad request - invalid input parameters or request body.
- `401` — Unauthorized - authentication required or invalid token.
- `403` — Forbidden - insufficient permissions to perform this action.
- `404` — Not found - the requested resource does not exist.
- `405` — Method not allowed.
- `413` — Payload too large - the request body exceeds the size limit.
- `415` — Unsupported media type - the Content-Encoding of the request is not supported.
- `429` — Too many requests - rate limit exceeded.

---

[API](https://skmtc.net/apify/apis/apify-api.md) · [All operations](https://skmtc.net/apify/apis/apify-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apify/apify-api/versions/01a71794279b/schema)
