POSTCreate Webhook

Webhook APIhttps://web3.nodit.io/v1/aptos/mainnet/webhooks

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.

condition for ADDRESS_ACTIVITY

Provide the condition of an ADDRESS_ACTIVITY event in exactly one of the following two ways. Providing both returns 400 INVALID_PARAMETER, and providing neither returns 400 MISSING_REQUIRED_PARAMETER.

  • addresses: list the monitored addresses directly. This is the existing method and keeps working as before.
  • addressSetId: specify a set created in advance with the Address Set API. The set must be in READY status (otherwise 409 ADDRESS_SET_NOT_READY), and its addressFormat must match the chain's address format (otherwise 422 ADDRESS_SET_FORMAT_MISMATCH, e.g. attaching a TRON set to an EVM chain). A set that does not exist, or that belongs to another account or a project other than the one creating the Webhook, returns 404 RESOURCE_NOT_FOUND. Passing addressSetId for an event type other than ADDRESS_ACTIVITY returns 400.

Request examples:

  • Existing method: { "eventType": "ADDRESS_ACTIVITY", "condition": { "addresses": ["0x..."] } }
  • Using an Address Set: { "eventType": "ADDRESS_ACTIVITY", "condition": { "addressSetId": "1788439512345678901" } }
Path Parameters
chainstring (enum)required

Parameter to specify the target chain for the query.

networkstring (enum)required

Parameter to specify the network of the target chain. Supported networks may vary depending on the chain.

Request Body
eventTypestring (enum)required

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

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 when creating an ADDRESS_ACTIVITY event on EVM-based chains and Tron. When enabled, EVM-based chains deliver messages of the nativeTransfer, withdrawal, atomic, erc20, erc721, and erc1155 types, and Tron delivers messages of the Native Transfer (Tron) type.

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
oneOf

Monitors activity of the addresses you specify. This event sends a notification whenever these accounts are involved as either sender (from) or recipient (to) in a transaction, i.e., when a transaction, token transfer (ERC20), or NFT transfer (ERC721, ERC1155) occurs. This service enables users to track activity across multiple addresses in real time and effectively monitor asset movements and transactions. Provide the monitored addresses in exactly one of two ways, either listing them directly in addresses or specifying the addressSetId of a set created in advance with the Address Set API. Providing both returns 400 INVALID_PARAMETER, and providing neither returns 400 MISSING_REQUIRED_PARAMETER.

addressesstring (^0[xX][0-9a-fA-F]{40}$)[]

List of addresses to monitor for events. Cannot be used together with addressSetId.

addressSetIdstring

The addressSetId of the Address Set whose addresses are to be monitored. Specify a set created in advance with the Address Set API; it cannot be used together with addresses. The set must be in READY status (otherwise 409 ADDRESS_SET_NOT_READY), and its addressFormat must match the chain's address format (otherwise 422 ADDRESS_SET_FORMAT_MISMATCH). Specifying a set that does not exist, or that belongs to another account or another project, returns 404 RESOURCE_NOT_FOUND. Pass the 19-digit number as a string.

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.

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.

X-API-KEY
Request
cURL
curl -X POST "https://web3.nodit.io/v1/aptos/mainnet/webhooks" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "eventType": "ADDRESS_ACTIVITY",
  "description": "Your webhook description",
  "notification": {
    "webhookUrl": "https://your-webhook-url.com"
  },
  "condition": {
    "addresses": [
      "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
    ]
  },
  "isInstant": false
}'
Response
Example · 201
{
  "subscriptionId": "string",
  "description": "string",
  "protocol": "string",
  "network": "string",
  "eventType": "string",
  "notification": {
    "webhookUrl": "string"
  },
  "signingKey": "string",
  "isInstant": true,
  "condition": {},
  "createdAt": "string"
}