Test a webhook

SDK platic.webhooks.test()

Verify the destination and activate the webhook if it responds. Use this after fixing a failure when creating or updating the webhook.

Example

await platic.webhooks.test("webhook_123");

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

It takes no body.

How it is verified

Platica sends a HEAD request to the webhook URL and waits for the response for up to 15 seconds. It does not send any event.

  • A response with a status below 500 passes, 404 or 405 too: many servers only accept POST.
  • A 5xx status, or no response, does not pass.

Response

data carries the whole webhook, with the fields from get a webhook, plus activation.

{
  "status": "success",
  "message": "Webhook verified and active",
  "data": {
    "id": "webhook_abc123",
    "name": "Notifications webhook",
    "url": "https://example.com/webhook",
    "events": [
      "conversation.created",
      "message.created"
    ],
    "active": true,
    "hasSecret": true,
    "headers": {
      "Custom-Header": "custom value"
    },
    "createdAt": "2026-10-28T12:05:00.000Z",
    "updatedAt": "2026-10-28T12:20:41.000Z",
    "creationDate": "2026-10-28T12:05:00.000Z",
    "lastUpdate": "2026-10-28T12:20:41.000Z",
    "lastDeliveryAt": null,
    "lastDeliveryStatus": null,
    "lastDeliveryCode": null,
    "lastDeliveryError": null,
    "status": "enabled",
    "version": 4,
    "verified": true,
    "secrets": [
      {
        "slot": "webhook.secret",
        "state": "authorized",
        "secretId": "a1c3e5f7092b4d6f8a0c2e4f6b8d0a1c3e5f7092b4d6f8a0c2e4f6b8d0a1c3e5"
      }
    ],
    "activation": { "active": true },
    "workspaceId": "ws_123",
    "nextStep": "Active. It delivers: conversation.created, message.created."
  }
}

Response fields

FieldTypeDescription
activebooleantrue if the webhook ended up delivering
activation.activebooleanResult of this verification
activation.reasonobjectOnly if it did not pass: { code, message } with the reason
All the others—See get a webhook

message is Webhook verified and active when it passed and The destination did not pass verification when it did not. In both cases the response is 200: check active.

activation.reason.codeWhen
VERIFICATION_FAILEDThe destination answered with a 5xx status
OPERATION_UNCONFIRMEDThe verification could not be completed, for example because the destination did not answer in time
SECRETS_NEED_AUTHORIZATIONThere are slots in missing or needs_authorization. Send the credentials again with update a webhook or bind secrets

Errors

Statusdetails.codeWhen
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
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
409REQUEST_ID_CONFLICTYou repeated an Idempotency-Key with a different body. Use a new key for a new operation
{
  "code": 404,
  "error": "Not Found - The resource doesn't exist",
  "details": {
    "code": "NOT_FOUND",
    "message": "Integración no encontrada."
  }
}

The general error format is in Errors.

Notes

  • Reactivating a webhook that paused itself resets consecutiveFailures to 0.