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

# Send a test event

`POST /webhook_endpoints/{id}/test`

## Request

- Base URL: `https://www.happyscribe.com/api/v1`
- URL: `https://www.happyscribe.com/api/v1/webhook_endpoints/{id}/test`
- Auth: API key in header `Authorization`

Sends a signed sample event to the endpoint and answers once your receiver has, so
`deliveries[0].last_attempt.response_code` is what it returned. A receiver that fails is
retried like any delivery. The sample's ids do not exist, so do not fetch them. Up to 10
test events per workspace per minute.

## Request body

- object
  - `type` string: The event to send. Defaults to the first event the endpoint subscribes to.

## Response `201`

The test event, with this endpoint's delivery.

- WebhookEvent
  - `id` string: The event's ID, the same `id` your receiver got in the payload.
  - `object` string: Always `webhook_event`.
  - `type` string: The event type, as this request's API version names it.
  - `workspace_id` string: Workspace ID, beginning with `wks_`.
  - `test` boolean: A sample sent with `POST /webhook_endpoints/{id}/test`.
  - `created_at` string, date-time: When the event happened, in ISO 8601.
  - `data` object, nullable: Not in lists: the payload's `data`, as this request's API version shapes it. `null` if it can't be shaped at that version.
    - `object` object: The resource the event is about, as its webhook reference page describes it.
  - `deliveries` WebhookDelivery[]: One per endpoint it was sent to.
    - `endpoint_id` string: The endpoint it was sent to.
    - `status` 'pending' | 'succeeded' | 'failed' | 'cancelled': `pending` until its first answer, `succeeded` once your receiver returned `2xx`, `failed` when its last attempt failed (it is retried with backoff until it succeeds or 21 attempts are used), `cancelled` when the endpoint was disabled, stopped receiving the event, or could not be sent to (an unsafe address).
    - `attempt_count` integer: How many times it was sent.
    - `last_attempt` WebhookDeliveryAttempt
      - `number` integer: Which attempt this was, from 1.
      - `status` 'pending' | 'succeeded' | 'failed': - `pending`: sending. - `succeeded`: your receiver answered `2xx`. - `failed`: it answered something else, timed out, or could not be reached.
      - `response_code` integer, nullable: What your receiver answered; `null` when it could not be reached.
      - `response_body` string, nullable: Not in lists. The first 2,000 bytes of what your receiver answered.
      - `error` string, nullable: Not in lists. Why the request failed before an answer (a timeout, a refused connection).
      - `started_at` string, date-time: When the attempt started, in ISO 8601.
      - `completed_at` string, date-time, nullable: When your receiver answered, or `null` while sending.
    - `attempts` WebhookDeliveryAttempt[]: Not in lists.
      - `number` integer: Which attempt this was, from 1.
      - `status` 'pending' | 'succeeded' | 'failed': - `pending`: sending. - `succeeded`: your receiver answered `2xx`. - `failed`: it answered something else, timed out, or could not be reached.
      - `response_code` integer, nullable: What your receiver answered; `null` when it could not be reached.
      - `response_body` string, nullable: Not in lists. The first 2,000 bytes of what your receiver answered.
      - `error` string, nullable: Not in lists. Why the request failed before an answer (a timeout, a refused connection).
      - `started_at` string, date-time: When the attempt started, in ISO 8601.
      - `completed_at` string, date-time, nullable: When your receiver answered, or `null` while sending.
    - `created_at` string, date-time: When it was created, in ISO 8601.
    - `updated_at` string, date-time: When it last changed, in ISO 8601.

## Other responses

- `401`: Your API key is missing (`missing_api_key`) or wrong (`invalid_api_key`), or it may not access this resource (`unauthorized`).
- `404`: The specified resource could not be found, or this key cannot see it (`not_found`).
- `422`: The endpoint is disabled (`endpoint_disabled`), or does not receive `type` (`unsupported_event`).
- `429`: Rate limit reached (`rate_limited`). Wait `retry_in_seconds`, also sent as `Retry-After`, before retrying.

---

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