---
docId: doc_e41999626311402fbc647827473b536f
title: Test a webhook
description: "Verify a webhook destination and activate it if it responds."
api:
  group: webhooks
  auth: bearer
  operations:
    - operationId: testWebhook
      method: POST
      path: '/v1/webhooks/{webhookId}/test'
      postmanName: Test a webhook
---

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

# Test a webhook

Verify the destination and activate the webhook if it responds. Use this after fixing a failure when [creating](/api-reference/webhooks/create) or [updating](/api-reference/webhooks/update) the webhook.

## Example

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

```bash
curl -X POST https://api.platic.ai/v1/webhooks/$WEBHOOK_ID/test \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

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

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

</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

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](/api-reference/webhooks/get#response-fields), plus `activation`.

```json
{
  "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

| Field | Type | Description |
|-------|------|-------------|
| `active` | boolean | `true` if the webhook ended up delivering |
| `activation.active` | boolean | Result of this verification |
| `activation.reason` | object | Only if it did not pass: `{ code, message }` with the reason |
| All the others | — | See [get a webhook](/api-reference/webhooks/get#response-fields) |

`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.code` | When |
|--------------------------|------|
| `VERIFICATION_FAILED` | The destination answered with a `5xx` status |
| `OPERATION_UNCONFIRMED` | The verification could not be completed, for example because the destination did not answer in time |
| `SECRETS_NEED_AUTHORIZATION` | There are slots in `missing` or `needs_authorization`. Send the credentials again with [update a webhook](/api-reference/webhooks/update) or [bind secrets](/api-reference/webhooks/bind-secrets) |

## Errors

| Status | `details.code` | When |
|--------|----------------|------|
| `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 |
| `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` | `REQUEST_ID_CONFLICT` | You repeated an `Idempotency-Key` with a different body. Use a new key for a new operation |

```json
{
  "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](/api-reference/errors).

<Note type="warning">

A successful test activates the webhook, even if you paused it.

</Note>

## Notes

- Reactivating a webhook that [paused itself](/api-reference/webhooks/signatures#automatic-pause) resets `consecutiveFailures` to `0`.
