---
title: "Enqueue a webhook test event"
description: "PubNio API webhooks.test: enqueue a webhook test event. Request fields, examples in five clients, errors, and idempotency."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Enqueue a webhook test event

Enqueue a webhook test event with [`POST /api/v1/workspaces/{workspaceId}/webhook-endpoints/{endpointId}/test`](https://pubnio.com/api/v1/docs#tag/webhooks/POST/api/v1/workspaces/{workspaceId}/webhook-endpoints/{endpointId}/test). Requires a signed-in workspace owner, in the web app or the CLI; API keys are not accepted and MCP cannot call it.

## Request

| Parameter     | In   | Type | Required |
| ------------- | ---- | ---- | -------- |
| `workspaceId` | path | UUID | Yes      |
| `endpointId`  | path | UUID | Yes      |

## Response

- HTTP 202: an object with `deliveryId`.

The [OpenAPI document](https://pubnio.com/api/v1/openapi) has each field's type.

## Examples

### TypeScript

```ts
const accepted = await workspace.webhooks.test(endpointId);
```

Create this client with a signed-in person's `accessToken`, not an `apiKey`.

### Python

The Python SDK authenticates with a workspace API key, which this operation does not accept, so it has no method for it.

### cURL

```sh
curl -X POST "https://pubnio.com/api/v1/workspaces/$WORKSPACE_ID/webhook-endpoints/$ENDPOINT_ID/test" \
  -H "Authorization: Bearer $PUBNIO_TOKEN"
```

### CLI

```sh
pnio webhooks test "$ENDPOINT_ID"
```

### MCP execute

```js
async () => {
  const endpointId = "<endpointId>";
  const response = await codemode.request({
    method: "POST",
    path: `/api/v1/workspaces/${codemode.workspaceId}/webhook-endpoints/${endpointId}/test`,
  });
  return response.data;
};
```

## Errors

- [`webhook-test-rate-limited`](https://pubnio.com/docs/problems/webhook-test-rate-limited/): HTTP 429, Webhook test rate limited

It also declares the problems [most operations](https://pubnio.com/docs/reference/#shared-problems) declare.

## Idempotency

No key, so a retried `POST` is not deduplicated. Read the current state before you retry.

## Rate limits

One test event per endpoint per minute. A second test inside that minute returns `webhook-test-rate-limited` (HTTP 429); wait the `Retry-After` header's seconds.

## Limits

- API keys and MCP cannot call it. A signed-in person runs it from the CLI after `pnio auth login` or in the web app.

## Related

- [Webhooks operations](https://pubnio.com/docs/reference/#webhooks)
- [Webhooks](https://pubnio.com/docs/webhooks/)
- [Webhook events](https://pubnio.com/docs/webhook-events/)

Source: https://pubnio.com/docs/reference/webhooks-test/index.mdx
