---
docId: doc_6c3b6ac8d2ad4eb89ff225a598d271ca
title: Update a webhook
description: "Update a webhook, pause deliveries, or reactivate them."
api:
  group: webhooks
  auth: bearer
  operations:
    - operationId: updateWebhook
      method: PATCH
      path: '/v1/webhooks/{webhookId}'
      postmanName: Update a webhook
---

<script>
  import { Note, Ways, Collapsible } from '$lib/components';
</script>

# Update a webhook

Update the fields you send. Use `active` to pause or reactivate the webhook. If it should remain active, Platica verifies the destination after the change before continuing deliveries.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl -X PATCH https://api.platic.ai/v1/webhooks/$WEBHOOK_ID \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "active": false }'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.webhooks.update("webhook_123", { active: false });
```

</Ways.Way>
</Ways>

If your credential covers several workspaces, add `?workspace=<id>` with the webhook's workspace ([list workspaces](/api-reference/workspaces)); without it the answer is `400`.

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `webhookId` | string | Webhook id | ✓ |

## Request body

```json
{
  "name": "Updated webhook",
  "events": [
    "conversation.created",
    "conversation.status.updated",
    "conversation.operation.updated",
    "message.created"
  ],
  "expectedVersion": 3
}
```

## Body parameters

All are optional. Send at least one.

| Parameter | Type | Description |
|-----------|------|-------------|
| `name` | string | Webhook name, 1 to 100 characters |
| `url` | string | URL where the notifications are sent, up to 500 characters |
| `events` | array | Events it subscribes to, at least one. It replaces the list |
| `active` | boolean | `false` pauses it. `true` reactivates it, after verifying the destination |
| `secret` | string | New signing secret, up to 255 characters. It is stored as a secret and is not returned. It is only accepted if `url` is https and public |
| `headers` | object | Replaces all the headers. Up to 10. To keep a header with a credential, send it again with the value `"[REDACTED]"`; to change it, send the new value |
| `secrets` | object | Map of slot to the id of a secret that already exists: `webhook.secret` or `header:<name>` |
| `autoPause` | object \| null | When it pauses itself: `{ "mode": "failures", "failures": 5..1000 }` or `{ "mode": "time", "hours": 1..168 }`. `null` goes back to the default, 5 consecutive failed deliveries. See [automatic pause](/api-reference/webhooks/signatures#automatic-pause) |
| `expectedVersion` | number | The `version` you read. If the stored one is different, it answers `409` instead of overwriting |

## Response

`data` carries the webhook after the change, with the fields from [get a webhook](/api-reference/webhooks/get#response-fields), plus `activation`.

```json
{
  "status": "success",
  "message": "Webhook updated successfully",
  "data": {
    "id": "webhook_abc123",
    "name": "Updated webhook",
    "url": "https://example.com/webhook",
    "events": [
      "conversation.created",
      "conversation.status.updated",
      "conversation.operation.updated",
      "message.created"
    ],
    "active": true,
    "hasSecret": true,
    "headers": {
      "Authorization": "[REDACTED]",
      "Custom-Header": "custom value"
    },
    "createdAt": "2026-10-28T12:05:00.000Z",
    "updatedAt": "2026-11-03T18:40:12.000Z",
    "creationDate": "2026-10-28T12:05:00.000Z",
    "lastUpdate": "2026-11-03T18:40:12.000Z",
    "lastDeliveryAt": "2026-11-03T17:42:10.000Z",
    "lastDeliveryStatus": "success",
    "lastDeliveryCode": 200,
    "lastDeliveryError": null,
    "autoPause": { "mode": "failures", "failures": 5 },
    "consecutiveFailures": 0,
    "failingSince": null,
    "status": "enabled",
    "version": 6,
    "verified": true,
    "secrets": [
      {
        "slot": "webhook.secret",
        "state": "authorized",
        "secretId": "a1c3e5f7092b4d6f8a0c2e4f6b8d0a1c3e5f7092b4d6f8a0c2e4f6b8d0a1c3e5"
      },
      {
        "slot": "header:authorization",
        "state": "authorized",
        "secretId": "5d0c7a1e9b3f4a6c8e2d1f0b7a9c3e5d6f8a0b2c4d6e8f1a3b5c7d9e0f2a4b6c"
      }
    ],
    "activation": { "active": true },
    "workspaceId": "ws_123",
    "nextStep": "Active. It delivers: conversation.created, conversation.status.updated, conversation.operation.updated, message.created."
  }
}
```

Check `activation` to see whether the webhook delivers after the change. If it does not, `activation.reason` contains `{ code, message }`, as when you [create](/api-reference/webhooks/create#if-the-destination-does-not-pass-verification).

## What happens depending on what you change

| Change | Result |
|--------|--------|
| `active: false` | The webhook pauses: `status: "paused"`. Nothing is verified |
| `active: true` | The destination is verified. If it passes, it is active and `consecutiveFailures` goes back to `0` |
| Only `autoPause` | It is saved without verifying the destination or touching its credentials. The webhook stays active or paused as it was, and the failure count is not reset |
| `name`, `events`, or `headers`, or `url` within the same domain | The credentials are kept. If the webhook was active, the destination is verified again |
| `url` to another domain | The credentials stay authorized only for the previous destination. See below |
| `secret` or `secrets` | The credential is replaced and, if the webhook was active, it is verified again |

<Note type="warning">

When you change `url` to another domain, send the credentials too: `secret`, `headers` with their values, or `secrets`. If the webhook has a signature or credential headers and you do not reauthorize them, it stops delivering. It has `status: "pending_verification"`, slots in `needs_authorization`, and `activation.reason.code: "SECRETS_NEED_AUTHORIZATION"`.

</Note>

If the verification fails after a change, the change is saved and the webhook stops delivering until [test a webhook](/api-reference/webhooks/test) passes.

A webhook that [paused itself](/api-reference/webhooks/signatures#automatic-pause) stays paused even if you edit other fields. To reactivate it, send `active: true` or use [test a webhook](/api-reference/webhooks/test).

## Errors

<Collapsible summary="Show error codes and fixes">

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | The body is empty (the message is `No update fields provided`) or fails validation, for example an `autoPause` with another field or a number out of range (`details.issues` says which field) |
| `400` | `INVALID_REQUEST` | Your credential covers several workspaces and you did not send `?workspace=`, or you sent one it does not cover. `details.available` carries the IDs you can use |
| `400` | `INVALID_CONFIG` | The name, the URL, or the events are not valid |
| `400` | `SECRET_DESTINATION_INVALID` | You sent `secret` and `url` (the new one or the stored one) is not https, points to localhost or a private IP, or carries a `#fragment`. Nothing is saved |
| `401` | `UNAUTHENTICATED` | The credential is missing or invalid |
| `403` | `FORBIDDEN` | An OAuth token without the `platica:write` scope, the person does not have the Integrations module (the message is `Missing integrations permission`), or does not have permission to configure webhooks |
| `404` | `NOT_FOUND` | The webhook does not exist in the workspace |
| `409` | `RESOURCE_CHANGED` | `expectedVersion` does not match, or the webhook changed while it was being saved. Read it and repeat |
| `409` | `REQUEST_ID_CONFLICT` | You repeated an `Idempotency-Key` with a different body. Use a new key for a new operation |

If the change is saved but a credential cannot be stored or bound, the response is `200` and `data.secretsError` carries `{ code, message }`.

```json
{
  "code": 409,
  "error": "Conflict - The resource state conflicts with this request",
  "details": {
    "code": "RESOURCE_CHANGED",
    "message": "La configuración cambió desde que la leíste. Vuelve a consultarla."
  }
}
```

The general error format is in [Errors](/api-reference/errors).

</Collapsible>

## Notes

- To change only the value of the signature without touching the webhook, you can also [rotate the secret](/api-reference/secrets/rotate) of the `webhook.secret` slot.
- To bind a secret that already exists, use [bind secrets](/api-reference/webhooks/bind-secrets).
