Update a webhook

SDK platic.webhooks.update()

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

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

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

Path parameters

ParameterTypeDescriptionRequired
webhookIdstringWebhook id✓

Request body

{
  "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.

ParameterTypeDescription
namestringWebhook name, 1 to 100 characters
urlstringURL where the notifications are sent, up to 500 characters
eventsarrayEvents it subscribes to, at least one. It replaces the list
activebooleanfalse pauses it. true reactivates it, after verifying the destination
secretstringNew 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
headersobjectReplaces 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
secretsobjectMap of slot to the id of a secret that already exists: webhook.secret or header:<name>
autoPauseobject | nullWhen 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
expectedVersionnumberThe 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, plus activation.

{
  "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.

What happens depending on what you change

ChangeResult
active: falseThe webhook pauses: status: "paused". Nothing is verified
active: trueThe destination is verified. If it passes, it is active and consecutiveFailures goes back to 0
Only autoPauseIt 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 domainThe credentials are kept. If the webhook was active, the destination is verified again
url to another domainThe credentials stay authorized only for the previous destination. See below
secret or secretsThe credential is replaced and, if the webhook was active, it is verified again

If the verification fails after a change, the change is saved and the webhook stops delivering until test a webhook passes.

A webhook that paused itself stays paused even if you edit other fields. To reactivate it, send active: true or use test a webhook.

Errors

Statusdetails.codeWhen
400INVALID_REQUESTThe 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)
400INVALID_REQUESTYour 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
400INVALID_CONFIGThe name, the URL, or the events are not valid
400SECRET_DESTINATION_INVALIDYou 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
401UNAUTHENTICATEDThe credential is missing or invalid
403FORBIDDENAn 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
404NOT_FOUNDThe webhook does not exist in the workspace
409RESOURCE_CHANGEDexpectedVersion does not match, or the webhook changed while it was being saved. Read it and repeat
409REQUEST_ID_CONFLICTYou 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 }.

{
  "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.

Notes

  • To change only the value of the signature without touching the webhook, you can also rotate the secret of the webhook.secret slot.
  • To bind a secret that already exists, use bind secrets.