Skip to main content

Create Webhook

POST

API for creating a Webhook. Create a Webhook by providing subscription details and Webhook URL. Once created, events will be sent to the Webhook URL. On creation, the API returns the Webhook's Subscription ID, which you can use to query, update, and delete the Webhook.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.
networkstringrequired
Parameter specifying the network of the target chain.
Request Body
eventTypeoneOfrequired
Parameter that specifies the event type identifier to subscribe to via Webhook. For information on supported event types, refer to the Event Types page.
descriptionstring
Parameter that specifies the description of the event.
notificationobjectrequired
Parameter that specifies the information required to receive notifications when events occur.
webhookUrlstring
Parameter that specifies the webhook URL to receive notifications when subscribed events occur. Must be a publicly accessible URL.
isInstantboolean
Parameter that specifies whether to enable the Instant Webhook option. Defaults to false when not specified.
  • true: Enables the Instant Webhook option. You can receive Webhook messages immediately when the event is detected, regardless of block confirmation status.
  • false: Disables the Instant Webhook option. Messages are sent only after the block containing the event transaction has been confirmed.
withNativeboolean
Field that selects whether to retrieve native transfer information. It can only be set for EVM-based chains when creating an ADDRESS_ACTIVITY event, and when enabled you can receive messages of the nativeTransfer, withdrawal, atomic, erc20, erc721, and erc1155 types.
reorgCorrectionEnabledboolean
Field that selects whether to apply reorg detection and correction. With this option enabled, when a reorg block occurs, the message affected by the reorg is re-sent under the same Sequence Number with the event.reorgRemoved: true tag. The information of the new block is then sent under a new Sequence Number.
conditiononeOfrequired
Field for defining detailed conditions of the events you want to subscribe to. Available conditions vary by event type, so refer to the Webhook Types page for usage.Sends a notification whenever a specified event occurs. Users can quickly identify important activities happening on the network.
eventTypestringrequired
The event type to monitor. Event types refer to the name of the event struct defined in the module. Enter in the format module_address::module_name::event_name.

📘 Can't 0x1::transaction_fee::FeeStatement be used in eventType?

No. This event is included in all user transactions that consume gas fees.

Therefore, there is no need to subscribe to it as a separate event. We recommend subscribing to the Transaction event instead.

eventAccountAddressstringrequired
The address that emits the event you want to monitor.

📘 Must eventAccountAddress be 0x0 for Module Events?

Yes. When eventType is "Module Events", you must set eventAccountAddress to "0x0". For "Event-Handler Events", enter the account address that emitted the event. For more details on event types, see the Aptos official documentation.

eventDatastring
Object specifying event data filtering conditions. Use this field to filter for specific events by specifying key-value pairs. Supports JSON object format with up to 3 levels of nesting. Filtering applies only when the specified keys and values exactly match the event data.
Responses
subscriptionIdstring
Field representing the subscriptionId assigned to the Webhook. subscriptionId is a unique value that identifies the Webhook and is used to query, update, or delete the Webhook.
descriptionstring
Field representing the Webhook description.
protocolstring
Field representing the chain subscribed to via this Webhook. (e.g., ETHEREUM, POLYGON, OPTIMISM, ...)
networkstring
Field representing the network subscribed to via this Webhook. (e.g., MAINNET, SEPOLIA, MUMBAI, ...)
eventTypestring
Field representing the event type subscribed to by this Webhook.
Field representing the information for receiving notifications via Webhook.
webhookUrlstringrequired
Field representing the URL for receiving Webhook notifications.
signingKeystring
Field representing the signing key for authenticating Webhook notifications. After receiving a Webhook notification, use the signing key to verify the validity of the notification. The signing key is automatically generated when the Webhook is created and cannot be changed when updating the Webhook.
isInstantboolean
Field that specifies whether the Instant Webhook option is enabled.
  • true: When enabled, you can receive Webhook messages immediately when the monitored event is detected, regardless of block confirmation status.
  • false: When disabled, messages are sent only after the block containing the event transaction has been confirmed.
conditionobject
Field representing the Webhook subscription conditions. Conditions may vary by event type.
createdAtstring
Indicates when the webhook event occurred and the log was created. This field is returned in ISO 8601 format.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "MISSING_REQUIRED_PARAMETER",
"message": "Missing required parameter: { PARAMETER_NAME }"
}
cURL
curl -X POST 'https://web3.nodit.io/v1/aptos/mainnet/webhooks' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"eventType": "0x1::coin::CoinDeposit",
"description": "Your webhook description",
"notification": {
"webhookUrl": "https://your-webhook-url.com"
},
"isInstant": false,
"condition": {
"type": "BLOCK_PERIOD",
"block": 1
}
}'