---
title: "Send a test event"
method: POST
path: "/webhook-endpoints/{webhookEndpoint}/test"
tags: ["Webhooks"]
---

# Send a test event

`POST /webhook-endpoints/{webhookEndpoint}/test`

## Request

- Base URL: `https://vocenya.com/api/public/v1`
- URL: `https://vocenya.com/api/public/v1/webhook-endpoints/{webhookEndpoint}/test`
- Auth: HTTP bearer

Send a signed `webhook.test` event to this endpoint, with `{"message": "..."}` as its data. Pass
`event` to get a sample of a real event instead (for example `chat.message.created`), with made-up
data and `"sample": true`, cut down to ids for HIPAA-mode accounts like the real thing. It is
delivered in the background like any other event, even when the endpoint is paused.

```bash
curl -X POST https://vocenya.com/api/public/v1/webhook-endpoints/3/test \
  -H "Authorization: Bearer $VOCENYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event": "chat.message.created"}'
```

## Path parameters

- `webhookEndpoint` integer, required

## Request body

- TestWebhookEndpointRequest
  - `event` 'lead.created' | 'call.completed' | 'booking.created' | 'chat.handed_off' | 'outbound_call.completed' | 'chat.started' | 'chat.message.created' | 'chat.lead_captured' | 'chat.handoff_requested' | 'chat.closed' | 'call.missed' | 'message.taken' | 'sms.received' | 'sms.sent': Events a client can subscribe a webhook endpoint to.

## Response `202`

The queued delivery.

- object
  - `data` WebhookDeliveryResource, required
    - `id` integer, required
    - `livemode` boolean, required: `true` for live data, `false` for test data (created with a `vk_test_` key).
    - `event_id` string, required: The event id, also sent as the `Vocenya-Delivery` header. Use it to ignore duplicates.
    - `event` string, required
    - `webhook_endpoint_id` integer, required
    - `status` 'pending' | 'delivered' | 'failed', required: | | |---| | `pending` <br/> Waiting for its first or next attempt. | | `delivered` <br/> The endpoint answered with a 2xx status. | | `failed` <br/> Every attempt failed, or the endpoint was unsafe to call. |
    - `attempts` integer, required
    - `response_status` integer, nullable, required
    - `last_error` string, nullable, required
    - `next_attempt_at` string, nullable, required
    - `delivered_at` string, nullable, required
    - `created_at` string, nullable, required

## Other responses

- `401`: The API key is missing, invalid, expired or revoked.
- `403`: The key does not have the `webhooks:manage` scope.
- `404`: No record with that id belongs to your account.
- `422`: Validation error
- `429`: Too many requests for this key. Wait for the `Retry-After` seconds.

---

[API](https://skmtc.dev/vocenya/apis/vocenya-api.md) · [All operations](https://skmtc.dev/vocenya/apis/vocenya-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vocenya/apis/vocenya-api/revisions/946913941565?raw)
