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

# Send a test webhook

`POST /v1/webhook-endpoints/{webhook_endpoint_id}/test`

## Request

- Base URL: `https://api.scrip.dev`
- URL: `https://api.scrip.dev/v1/webhook-endpoints/{webhook_endpoint_id}/test`
- Auth: HTTP bearer

Send one signed test delivery of an event type's sample payload to an endpoint, once and without retries.

## Path parameters

- `webhook_endpoint_id` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- TestWebhookRequest: Sends a sample event to a webhook endpoint. Choose the event type with `event_type`.
  - `event_type` string, required: The event type whose sample payload to send, for example `balance.credited`. List the types with `GET /v1/webhook-event-types`.

## Response `202`

Test delivery accepted

- WebhookDeliveryResponse: One attempt to deliver a webhook event to an endpoint, with its status and response.
  - `attempt_count` integer: Number of delivery attempts made so far
  - `created_at` string, date-time: When the delivery record was created
  - `delivered_at` string, date-time: When the delivery was successfully completed
  - `error_code` string: Stable, machine-readable classification of the last failed attempt, e.g. consumer_response_timeout, consumer_4xx, consumer_5xx, rate_limited, gone (omitted when none)
  - `event_type` string: The event type (e.g. balance.credited)
  - `id` string, uuid: The id of the delivery. Use it in `delivery_id` paths to retry or resend it.
  - `last_attempt_at` string, date-time: When the last attempt was made
  - `last_error` string: Error message from the last attempt (network errors, timeouts)
  - `last_response_body` string: Response body from the last attempt (truncated to 4 KB)
  - `last_response_status` integer: HTTP status code from the last attempt
  - `max_attempts` integer: Maximum attempts before marking as FAILED
  - `next_attempt_at` string, date-time: When Scrip will try the delivery next. Omitted once the delivery is `DELIVERED` or `FAILED`.
  - `resend_seq` integer: Manual-resend sequence: 0 = the original delivery, 1,2,... = manual resends
  - `status` 'PENDING' | 'SENDING' | 'DELIVERED' | 'FAILED': Where the delivery is in its attempt lifecycle. `PENDING` deliveries wait for their next attempt. A `PENDING` delivery stays `PENDING` while its endpoint is disabled or paused, and resumes when the endpoint is active again. `FAILED` is final: attempts ran out, the receiver answered `410 Gone`, or the endpoint was archived.
  - `updated_at` string, date-time: When the delivery record was last updated
  - `webhook_endpoint_id` string, uuid: The endpoint this delivery targets
  - `webhook_event_id` string, uuid: The webhook event that triggered this delivery

## Other responses

- `400`: Invalid endpoint id, or event_type missing or not a known event type (code: validation_error | invalid_json)
- `401`: The API key is missing or not valid. See [Authentication](https://docs.scrip.dev/authentication).
- `403`: The caller is not allowed to do this.
- `404`: Endpoint not found (code: webhook_endpoint_not_found)
- `409`: Endpoint is disabled or paused (code: endpoint_not_active)
- `429`: Too many requests. Wait the number of seconds in the `Retry-After` header, then retry. See [Limits and durations](https://docs.scrip.dev/limits#rate-limits).
- `500`: Something failed on Scrip's side. Retry the request, and quote `request_id` if it keeps failing. [Errors](https://docs.scrip.dev/errors) lists every code, and the [API introduction](https://docs.scrip.dev/api-reference/introduction) describes the error format.

---

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