Skip to main content

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.

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

id
string
required
The subscription ID (e.g. sub_2QkP9aB7xN...).

Body

All fields are optional. Omit the body entirely to send a service.ping.
{
  "kind": "wallet.transfer.broadcasted",
  "data": {}
}
kind
string
The event kind to simulate. Currently supported: wallet.transfer.broadcasted, service.ping. Defaults to service.ping when omitted.
data
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.

Example 1 — send a ping

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

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.
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.

Errors

CodeHTTPDescription
not_found404The subscription ID does not exist or belongs to a different API key.
unsupported_event400The kind value is not a supported event type for /test.
unauthorized401The Authorization header is missing or the key is invalid.