Use this endpoint to create a new subscription that delivers webhook events to your HTTPS endpoint. Once created, Off the Hook immediately begins matching on-chain activity against the subscription’s address filters and queues deliveries signed with the subscription’s secret. The secret is returned only in this response — store it somewhere safe before the request completes.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.
Request
POST /v1/subscriptions
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer oth_YOUR_API_KEY |
Content-Type | Yes | application/json |
Idempotency-Key | No | Unique string to make this request idempotent. Re-sending the same key returns the original response without creating a second subscription. |
Body
Webhook delivery target. Only HTTPS is supported today; additional destination types (SQS, Pub/Sub) are planned.
One or more event kinds to subscribe to. Must be non-empty. Example:
["wallet.transfer.broadcasted"]. See Supported events for valid values.Whether the subscription should immediately receive events. Accepted values:
"enabled" or "disabled". Defaults to "enabled" when omitted.A human-readable label for your own reference. Not interpreted by Off the Hook.
Supported events
| Event kind | Status |
|---|---|
wallet.transfer.broadcasted | Available |
service.ping | Available (fired by /test) |
wallet.transfer.confirmed | Planned |
wallet.transfer.failed | Planned |
Example request
Response
201 Created
Response fields
Unique subscription identifier. Always prefixed with
sub_.Webhook delivery target.
The event kinds this subscription will receive.
Address filters attached to this subscription.
"enabled" or "disabled".The human-readable label supplied at creation time. Empty string if none was provided.
ISO 8601 timestamp of when the subscription was created.
ISO 8601 timestamp of the most recent update.
Errors
| Code | Description |
|---|---|
invalid_request | The request body is missing a required field, contains an invalid value, or the JSON is malformed. |
ssrf_blocked | The destination.url resolved to a private or reserved IP range. The error detail includes the blocked IP and CIDR. |
unsupported_event | One or more entries in events are not recognized. The error detail names the unsupported value. |
description_too_long | The description field exceeds the maximum allowed length. |
idempotency_in_flight | Another request with the same Idempotency-Key is still being processed. Wait and retry. |
idempotency_conflict | A completed request with the same Idempotency-Key exists but had a different request body. Use a new key. |
unauthorized | The Authorization header is missing or the API key is invalid. |