---
title: "Update a webhook"
slug: "update-a-webhook"
abstract: "Enable or disable, or update the secret, target URL, or log level of a webhook your organization has created for forwarding audit logs from SitecoreCommon Audit Log."
---
# Update a webhook

`PATCH /api/v1/eventConfigurations/<webhookID>`

Updates a webhook.

You can update the secret, target URL, and log level of your webhook, and you can enable or disable the webhook.

| Attribute | Type | Description | Example |
| --- | --- | --- | --- |
| `webhookID` | string | The webhook ID.<br><br>If you do not know the webhook ID, first [retrieve webhooks](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/sitecore-common-audit-log/webhook-rest-api/retrieve-webhooks.html). | `7050346545d5447da57b64be6416ac78` |

You can only update the following attributes: `destinationSystem.secret`, `destinationSystem.targetUrl`, `logLevel`, and `enabled`.

| Attribute | Type | Description | Example(s) |
| --- | --- | --- | --- |
| `destinationSystem.secret` | string | A secret you define, automatically passed in the `X-Secret` request header. To authenticate incoming webhook calls, your target application must verify this secret. | `"mys3cr3tstr1ingforauth1!x"` |
| `destinationSystem.targetUrl` | string | The webhook target URL. This is the URL that logs will be forwarded to. | `"https://www.exampletarget.url/example-endpoint"` |
| `logLevel` | string | Record only when a webhook message fails to be sent to an external system, or also when the message is successfully sent.<br><br>`"FailuresOnly"` - record only when a webhook message fails to be sent.<br><br>`"All"` - record both when a webhook message fails and when it is successfully sent.<br><br>Default: `"FailuresOnly"` | Must be one of:<br><br><ul><li>`"All"`</li><li>`"FailuresOnly"`</li></ul> |
| `enabled` | boolean | Determines whether the webhook is enabled or disabled at creation time.<br><br>When enabled, logs will immediately start being forwarded to the webhook target URL.<br><br>To change this after creating the webhook, see [Disable a webhook](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/sitecore-common-audit-log/webhook-rest-api/disable-a-webhook.html) and [Enable a webhook](https://doc.sitecore.com/portal/en/developers/sitecore-cloud-portal/sitecore-common-audit-log/webhook-rest-api/enable-a-webhook.html). | `true` or `false` |

Here's an example of updating a webhook target secret and URL:

```curl
curl -X PATCH '<baseURL>/api/v1/eventConfigurations/7050346545d5447da57b64be6416ac78' \
-H 'Authorization: Bearer <bearerToken>' \
-H 'Content-Type: application/json' \
--data-raw '
{
  "destinationSystem": {
    "secret": "<new-secret>",
    "targetUrl": "https://www.exampletartget.url/new-example-endpoint"
  }
}'

```

```json
{
  "id": "7050346545d5447da57b64be6416ac78",
  "organizationId": "org_ZiiCnzhCeHDpWJAU",
  "sourceSystem": {
    "$type": "AnySource"
  },
  "destinationSystem": {
    "secret": "new-4fcae82f-5759-4a08-93fe-1582bcc8514d",
    "targetUrl": "https://webhook.site/new-example-endpoint",
    "contentType": null,
    "$type": "Webhook"
  },
  "space": "Development",
  "sourceSystemStatus": null,
  "logLevel": "FailuresOnly",
  "createdBy": "jane.doe@myretailsite.com",
  "createdDate": "2026-12-22T12:`10:18`.8610786+`00:00`",
  "updatedBy": "john.doe@myretailsite.com",
  "updatedDate": "2026-12-28T11:`04:32`.4291852+`00:00`",
  "eventName": "sitecore.backbone.messages.audit.created",
  "enabled": true
}

```