---
title: "Send a sample event"
method: POST
path: "/webhooks/subscriptions/{id}/test"
tags: ["Webhooks"]
---

# Send a sample event

`POST /webhooks/subscriptions/{id}/test`

## Request

- Base URL: `https://services.certseal.com/api/v1`
- URL: `https://services.certseal.com/api/v1/webhooks/subscriptions/{id}/test`
- Auth: HTTP bearer

Enqueues a synthetic event delivery for the requested event
type so consumers can verify their endpoint and pull a sample
payload. The delivery goes through the normal dispatcher —
signature, headers, and retry behavior are all identical to a
real event.

If `eventType` is omitted, the first event the subscription
listens for is used. Returns `202 Accepted` once the delivery
row is persisted; the outbound POST happens asynchronously.

## Path parameters

- `id` string, required

## Request body

- object
  - `eventType` 'certificate.issued' | 'certificate.sent' | 'certificate.failed' | 'certificate.viewed': Stable identifier for an event a subscription can listen to. Sent as the `X-CertSeal-Event` header on every delivery.

## Response `202`

Delivery enqueued. Will be POSTed by the dispatcher worker.

- object
  - `delivery` object, required
    - `id` string, required
    - `eventType` 'certificate.issued' | 'certificate.sent' | 'certificate.failed' | 'certificate.viewed', required: Stable identifier for an event a subscription can listen to. Sent as the `X-CertSeal-Event` header on every delivery.
    - `createdAt` string, date-time, required
  - `sample` WebhookEvent, required: Envelope every webhook POST body wraps. Use `id` as your idempotency key (also surfaced via the `X-CertSeal-Delivery` header). `data` is a discriminated union keyed off `type`: - `certificate.issued` / `certificate.sent` → `Recipient` - `certificate.failed` → `Recipient` plus an `error` field - `certificate.viewed` → `Recipient` plus a `viewer` sub-object
    - `id` string, required: Globally unique delivery id (also in `X-CertSeal-Delivery`).
    - `type` 'certificate.issued' | 'certificate.sent' | 'certificate.failed' | 'certificate.viewed', required: Stable identifier for an event a subscription can listen to. Sent as the `X-CertSeal-Event` header on every delivery.
    - `createdAt` string, date-time, required
    - `data` union, required: Shape depends on `type`. See the union members for the exact payload.
      - Recipient
        - `id` string, required
        - `batchId` string, required
        - `name` string, nullable
        - `email` string, email, nullable
        - `certificateId` string, nullable: Human-readable id, e.g. CERT-2026-003843-000001.
        - `shareToken` string, nullable: Opaque token used in public viewer URLs.
        - `certUrl` string, uri, nullable: Fully-qualified public viewer URL. Null when `PUBLIC_APP_URL` isn't configured on the server.
        - `issueDate` string, date-time, nullable
        - `expiryDate` string, date-time, nullable
        - `data` object, required: All free-form fields preserved from the original input; interpolated into the certificate template at render time.
        - `emailStatus` 'pending' | 'queued' | 'sending' | 'sent' | 'failed', required
        - `emailSentAt` string, date-time, nullable
        - `createdAt` string, date-time, required
      - WebhookCertificateFailedData
        - `id` string, required
        - `batchId` string, required
        - `name` string, nullable
        - `email` string, email, nullable
        - `certificateId` string, nullable: Human-readable id, e.g. CERT-2026-003843-000001.
        - `shareToken` string, nullable: Opaque token used in public viewer URLs.
        - `certUrl` string, uri, nullable: Fully-qualified public viewer URL. Null when `PUBLIC_APP_URL` isn't configured on the server.
        - `issueDate` string, date-time, nullable
        - `expiryDate` string, date-time, nullable
        - `data` object, required: All free-form fields preserved from the original input; interpolated into the certificate template at render time.
        - `emailStatus` 'pending' | 'queued' | 'sending' | 'sent' | 'failed', required
        - `emailSentAt` string, date-time, nullable
        - `createdAt` string, date-time, required
        - `error` string, required: Human-readable failure reason returned by Resend.
      - WebhookCertificateViewedData
        - `id` string, required
        - `batchId` string, required
        - `name` string, nullable
        - `email` string, email, nullable
        - `certificateId` string, nullable: Human-readable id, e.g. CERT-2026-003843-000001.
        - `shareToken` string, nullable: Opaque token used in public viewer URLs.
        - `certUrl` string, uri, nullable: Fully-qualified public viewer URL. Null when `PUBLIC_APP_URL` isn't configured on the server.
        - `issueDate` string, date-time, nullable
        - `expiryDate` string, date-time, nullable
        - `data` object, required: All free-form fields preserved from the original input; interpolated into the certificate template at render time.
        - `emailStatus` 'pending' | 'queued' | 'sending' | 'sent' | 'failed', required
        - `emailSentAt` string, date-time, nullable
        - `createdAt` string, date-time, required
        - `viewer` WebhookViewerInfo, required
          - `viewedAt` string, date-time, required
          - `userAgent` string, nullable, required
          - `referer` string, nullable, required
          - `ip` string, nullable, required: Raw viewer IP address. Note that under GDPR, IP addresses are personal data — strip or hash on your side if you don't need them.

## Other responses

- `400`: The request body or query was invalid.
- `401`: Missing, malformed, expired, or revoked API key.
- `404`: The requested resource was not found in this workspace.
- `429`: Too many requests for this API key. Honour the `Retry-After` response header (seconds) or the `detail.retryAfter` field.

---

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