blockchain_events_create
Create webhook subscriptions for on-chain events to receive POST callbacks when transactions confirm, token transfers occur, or new blocks are mined.
Instructions
Create a webhook subscription for on-chain events. When the specified event occurs, CryptoAPIs sends a POST request to your callbackUrl with the event data. Subscriptions persist until deleted.
Event types (supported blockchains vary per type — an invalid blockchain for the chosen eventType is rejected before calling the API): • address-coins-transactions-unconfirmed: fires when an unconfirmed coin transaction touches the address • address-coins-transactions-confirmed: fires once a coin transaction confirms (optionally on an exact confirmation via receiveCallbackOn) • address-coins-transactions-confirmed-each-confirmation: fires on every confirmation up to confirmationsCount (required) • address-tokens-transactions-confirmed: fires once a token transfer confirms • address-tokens-transactions-confirmed-each-confirmation: fires on every confirmation up to confirmationsCount (required) • address-internal-transactions-confirmed: fires once a confirmed internal (contract-internal) transaction touches the address • address-internal-transactions-confirmed-each-confirmation: fires on every confirmation up to confirmationsCount (required) • block-mined: fires on every new block (no address field)
All event types except block-mined require an address.
Note: 'create' actions require confirmation. They return a preview with a one-time token instead of executing immediately.
Credits per call: 30
Credits are indicative only and may change at any time. The actual credits spent for each API request are returned in the response headers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | No | Address to monitor (required for all event types except block-mined) | |
| context | No | Optional context for the request - echoed back in response | |
| network | Yes | Network name (e.g. mainnet, testnet, sepolia); supported networks vary per eventType | |
| eventType | Yes | Event type to subscribe to | |
| blockchain | Yes | Blockchain protocol (e.g. bitcoin, ethereum); supported chains vary per eventType | |
| callbackUrl | Yes | Webhook callback URL | |
| allowDuplicates | No | Whether to allow duplicate subscriptions for the same address/event. The API requires this field even though the spec marks it optional (verified live) — defaults to false. | |
| callbackSecretKey | No | Secret key for HMAC-signing webhook payloads (recommended for verifying authenticity) | |
| confirmationToken | No | Confirmation token from a previous preview response. IMPORTANT: You MUST present the warning and impact to the user and receive their explicit approval before passing this token. NEVER auto-confirm — always ask the user first. The token expires after 60 seconds. | |
| receiveCallbackOn | No | Exact confirmation number to receive the callback on (address-coins-transactions-confirmed, address-tokens-transactions-confirmed, address-internal-transactions-confirmed only) | |
| confirmationsCount | No | Number of confirmations to track, sending a callback on each one (required for the '-each-confirmation' event types) |