---
title: "Send a test event"
method: POST
path: "/v1/webhook_endpoints/{id}/test"
tags: ["Webhooks"]
---

# Send a test event

`POST /v1/webhook_endpoints/{id}/test`

## Request

- Base URL: `https://api.tryleap.ai`
- URL: `https://api.tryleap.ai/v1/webhook_endpoints/{id}/test`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Sends a `webhook.test` event to this endpoint only, once, even if it's disabled, and answers with the delivery and how the try went. The event's `data.object` is the endpoint, never its secret. Tests and redeliveries share a budget of 100 an hour per workspace.

Needs an API key with the `generations:write` scope.

## Path parameters

- `id` string, required: The endpoint's ID, `we_...`.

## Response `200`

The delivery, with the try's result.

- WebhookDelivery: One event on its way to one URL, with every try so far.
  - `id` string, required: The delivery's ID, `whd_...`.
  - `object` 'webhook_delivery', required
  - `event` string, required: The event it carries, `evt_...`.
  - `endpoint` string, nullable, required: The endpoint, or null for the webhook URL a request named.
  - `url` string, required: Where it goes.
  - `status` 'pending' | 'succeeded' | 'failed', required: `pending` while tries remain, `succeeded` once your server answered 2xx, `failed` after the last try.
  - `attempts` object[], required: Every try so far, oldest first.
    - `attempted_at` string, date-time, required
    - `succeeded` boolean, required
    - `status_code` integer, nullable, required: Your server's HTTP status; null when it never answered.
    - `error` string, nullable, required: Why the try failed, when your server did not answer 2xx, such as a timeout.
    - `duration_ms` integer, required: How long the try took.
  - `next_attempt_at` string, date-time, nullable, required: When Leap tries again; null once it succeeded or gave up.
  - `created_at` string, date-time, required: When it was queued.
  - `completed_at` string, date-time, nullable, required: When it succeeded or Leap gave up; null while tries remain.

## Other responses

- `400`: `conflicting_credentials`
- `401`: `authentication_required`
- `403`: `permission_denied`
- `404`: `resource_not_found`
- `429`: `rate_limit_exceeded`

---

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