> ## Documentation Index
> Fetch the complete documentation index at: https://docs.offthehook.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v1/subscriptions/:id/test

> Send a synthetic webhook event to your destination without waiting for on-chain activity. Use this to test your endpoint and signature verification.

This endpoint fires a synthetic webhook event to your subscription's destination immediately, without waiting for any on-chain activity. The event flows through the same delivery pipeline as a real event — Standard Webhooks signing, retry logic, and all delivery headers — so you can verify your full handler stack end to end.

With no request body, the endpoint sends a `service.ping` event. With a body, you can specify the event kind and provide your own `data` payload to simulate a real event shape.

## Request

```
POST /v1/subscriptions/:id/test
```

### Path parameters

<ParamField path="id" type="string" required>
  The subscription ID (e.g. `sub_2QkP9aB7xN...`).
</ParamField>

### Body

All fields are optional. Omit the body entirely to send a `service.ping`.

```json theme={null}
{
  "kind": "wallet.transfer.broadcasted",
  "data": {}
}
```

<ParamField body="kind" type="string">
  The event kind to simulate. Currently supported: `wallet.transfer.broadcasted`, `service.ping`. Defaults to `service.ping` when omitted.
</ParamField>

<ParamField body="data" type="object">
  Arbitrary data payload for the synthetic event. You are responsible for shaping this to match the expected event schema. Ignored when `kind` is `service.ping`.
</ParamField>

### Example 1 — send a ping

```bash theme={null}
curl -X POST https://api.offthehook.dev/v1/subscriptions/sub_2QkP9aB7xN.../test \
  -H "Authorization: Bearer oth_YOUR_API_KEY"
```

### Example 2 — send a synthetic transfer event

```bash theme={null}
curl -X POST https://api.offthehook.dev/v1/subscriptions/sub_2QkP9aB7xN.../test \
  -H "Authorization: Bearer oth_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "kind": "wallet.transfer.broadcasted", "data": {} }'
```

## Response

**200 OK** — the `EventView` for the test event that was queued for delivery.

<Note>
  The test event is queued for immediate delivery. Check your destination (e.g. webhook.site) within a few seconds to confirm receipt. If you do not see it, inspect the event's `status`, `responseStatus`, and `responseBody` fields using [GET /events/:eventId](/api/events/get).
</Note>

## Errors

| Code                | HTTP | Description                                                           |
| ------------------- | ---- | --------------------------------------------------------------------- |
| `not_found`         | 404  | The subscription ID does not exist or belongs to a different API key. |
| `unsupported_event` | 400  | The `kind` value is not a supported event type for `/test`.           |
| `unauthorized`      | 401  | The `Authorization` header is missing or the key is invalid.          |
