---
source_url: https://www.pubnub.com/docs/integrations/event-forwarding/create-webhook-action
title: Create a Webhook action
updated_at: 2026-09-30T07:20:08.000Z
---

# Create a Webhook action

## Documentation index

To discover more PubNub resources:

1. Fetch [PubNub's llms.txt](https://www.pubnub.com/llms-full.txt) for a list of available pages in Markdown format.
2. Identify relevant URLs from that index.
3. Fetch the target pages.

Do not assume a path exists, always check the index first.

Create a Webhook action in the [Admin Portal](https://admin.pubnub.com/) to forward matching events from an Events & Actions listener to your own HTTPS endpoint.

If you're migrating a webhook you previously configured on the Keysets page, see the [legacy webhooks migration guide](https://www.pubnub.com/docs/migration-guides/legacy-webhooks.md) instead. It covers the payload differences and the exact steps to move it here.

## Configure the action

1. In **Events & Actions** on the [Admin Portal](https://admin.pubnub.com/), click **+ Add Action**.
2. Click **Webhook** to select the action type.
3. Enter the HTTPS URL of your endpoint under **Configuration**, for example `https://your-domain.com/webhook/pubnub`.
4. If your endpoint requires authentication, add custom headers and select secret keys from your keyset.
5. If you expect a high volume of events and want to send them together instead of one request per event, turn on **Batching** and set the item count and time bound. See [Available actions](https://www.pubnub.com/docs/integrations/event-forwarding/available-actions.md) for how the item count and time bound interact.
6. If you want PubNub to retry failed deliveries automatically, turn on **Webhook retry** and set the retry count and interval.
7. Pair the action with an event listener without leaving **Actions**. Click **Add event listener** and select an existing listener, or [create one](https://www.pubnub.com/docs/integrations/event-forwarding/configure.md#create-an-event-listener) first.
8. Click **Save changes**.

A Webhook delivery succeeds after a `2XX` response, follows a `301` for up to three redirects, and retries other statuses according to the action's retry policy.

Events & Actions retries are available on paid tiers. The Free tier's single listener does not retry failed deliveries. See [Available actions](https://www.pubnub.com/docs/integrations/event-forwarding/available-actions.md#retries) for the tier breakdown and the full retry mechanics.

:::tip Export Functions logs through a Webhook action
You can export logs from your [Functions](https://www.pubnub.com/docs/message-processing/serverless/create-function.md) using a Webhook action configured the same way.
:::

## Confirm the webhook fires

Publish a message, or trigger whichever event you configured, so it matches your listener's filter. For how publishing works, see [Publishing messages with PubNub](https://www.pubnub.com/docs/pub-sub/publish/overview.md). Check that your endpoint receives a request. For the exact JSON your endpoint receives, see [Payloads](https://www.pubnub.com/docs/integrations/event-forwarding/payloads.md).

If your endpoint doesn't receive a request, confirm the action is paired with a listener whose filter matches the event you triggered. Also confirm your endpoint URL accepts HTTPS requests from PubNub.

## Related tasks

* [Configure Events & Actions](https://www.pubnub.com/docs/integrations/event-forwarding/configure.md). Create the event listener that triggers this action.
* [Available actions](https://www.pubnub.com/docs/integrations/event-forwarding/available-actions.md). Compare a Webhook action against other ways to forward events.
* [Legacy webhooks migration guide](https://www.pubnub.com/docs/migration-guides/legacy-webhooks.md). Move a webhook configured on the Keysets page to Events & Actions.
* [Payloads](https://www.pubnub.com/docs/integrations/event-forwarding/payloads.md). Look up the exact JSON your endpoint receives for each event type.

Last updated at: 2026-09-30T07:20:08.000Z
