Update Webhook
PATCH
You can modify the subscription condition of a Webhook, or activate or deactivate a Webhook.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.networkstringrequired
Parameter specifying the network of the target chain.subscriptionIdstringrequired
Parameter to specify the subscriptionId assigned to the Webhook you want to query. You can use the subscriptionId returned when creating a Webhook to query, modify, and delete Webhook information.Request Body
notificationobject
Parameter specifying the information required to receive notifications when an event occurs.webhookUrlstring
Parameter specifying the webhook URL to receive notifications when the subscribed event occurs. A publicly accessible URL must be specified.descriptionstring
Parameter specifying the description of the event.isActiveboolean
Parameter specifying whether the Webhook is active. When set to true, the Webhook is activated; when set to false, it is deactivated. A deactivated Webhook cannot receive notifications but is not deleted.conditionobject
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
resultboolean
Field indicating the result of the call. Returns true on success and false on failure.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 PATCH 'https://web3.nodit.io/v1/aptos/mainnet/webhooks/5001' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{}'