# Testing your webhook endpoint

> Test a Safecube webhook endpoint for free with the demo shipment ZZZZ0000000, which sends sample events regularly, or by sending an example event on demand with POST /endpoint/{endpoint_id}/send-example.

Safecube offers two ways to send sample webhooks to an endpoint and check that it works: subscribing the endpoint to a demo shipment, and sending an example event on demand. Both send sample data, not real tracking data, and neither is charged.

## Demo shipment

An endpoint subscribed to the demo shipment `ZZZZ0000000` receives events from it regularly: every event the endpoint subscribes to, every 6 hours. The demo shipment is free of charge.

Add it to the endpoint like any other shipment, with [`POST /easy-shipment-asynchronous`](/en/api/webhooks/reference/easy-shipment/easy-shipment-add-async), and with no shipping line:

```bash
curl -X POST "https://api.sinay.ai/webhook/api/v1/easy-shipment-asynchronous" \
  -H "API_KEY: $SAFECUBE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "{endpoint_id}": {
      "shipments": [{ "number": "ZZZZ0000000" }]
    }
  }'
```

In the Safecube web application, the webhook settings page also offers an option to add the demo shipment to a webhook. The page is at `https://app.safecube.ai/api/webhooks`: open **Developers** in the sidebar, then the **Webhooks** tab.

## Send an example event with the API

[`POST /endpoint/{endpoint_id}/send-example`](/en/api/webhooks/reference/endpoints/endpoint-send-example) sends one sample event of the chosen type to the endpoint, at any time. Set the event type in the request body; the [Webhook events](/en/api/webhooks/guides/events) page lists every type.

```bash
curl -X POST "https://api.sinay.ai/webhook/api/v1/endpoint/{endpoint_id}/send-example" \
  -H "API_KEY: $SAFECUBE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{ "eventType": "shipment.any.change" }'
```

## Send an example event from the Svix dashboard

The Svix dashboard sends the same sample events from a browser.

1. In the Safecube web application, open **Developers** in the sidebar, then the **Webhooks** tab (`https://app.safecube.ai/api/webhooks`).
2. Click **Open Svix dashboard**. The Svix app portal opens, with a left menu made of **Activity**, **Endpoints**, **Event Catalog** and **Logs**.
3. In **Endpoints**, select the endpoint to test. The list shows each endpoint URL with its description and error rate.
4. Open the **Testing** tab, choose an event type, then click **Send example**.

The example contains sample data, not real data, and is not charged.

## Test without a public URL

To test webhooks before your own public URL is ready, create the endpoint with a [Svix Playground](https://www.svix.com/play/) URL. The events sent to `https://play.svix.com/in/{your_url_id}` are visible in any browser at `https://play.svix.com/view/{your_url_id}`. The Safecube webhook settings page also links to the playground, through **Use our playground**, to generate a demo webhook.
