Update Webhook
Modifies an existing webhook URL on an instance: change subscribed events, enable/disable delivery, or update the retry policy. (Paid users only)
Authentication Required
Login to swap the placeholders with your real Instance ID and Access Token.
Log InNo query parameters required
This endpoint doesn't expect data in the URL.
Best practices
Disable a webhook instead of deleting it when you need to pause it temporarily.
After changing events, verify your endpoint still handles the new payload shapes correctly.
Keep the system webhook active with at least 'message' events if you use the Wawp inbox.
Update Webhook: /v2/webhook/update
The /v2/webhook/update endpoint lets you modify an existing webhook URL without replacing the whole webhook list. You can change the event filter, toggle the active state, or adjust the retry policy.
[!IMPORTANT] This endpoint is only available for paid subscription accounts (Unlimited tiers). Free tier users will receive a
403 Forbiddenerror with codesubscription_required.
🎯 When to Use This Endpoint
Use this endpoint when you want to:
- Enable or disable a webhook temporarily without deleting it.
- Add or remove specific events from a webhook subscription.
- Change the retry policy (delay and attempts) for a specific URL.
📦 Request Body
url(required): The exact webhook URL that already exists on the instance.events(optional): A new array of events. If omitted, the current event list is kept.is_active(optional):1to enable or0to disable. If omitted, the current state is kept.retries(optional): New retry policy object. If omitted, the current policy is kept.hmac(optional): New HMAC secret. If omitted, the current secret is kept.
🚀 Available Events
The same event list used in the Wawp Dashboard is supported:
| Category | Events |
|---|---|
| Messages | message, message.any, message.ack, message.ack.group, message.waiting, message.revoked, message.edited, message.reaction, poll.vote, poll.vote.failed |
| Groups | group.join, group.leave, group.v2.join, group.v2.leave, group.v2.update, group.v2.participants |
| Session & Calls | session.status, state.change, presence.update, chat.archive, call.received, call.accepted, call.rejected |
| Labels | label.upsert, label.deleted, label.chat.added, label.chat.deleted |
| Advanced | event.response |
� Request Samples
cURL
curl -X PATCH "https://api.wawp.net/v2/webhook/update" -H "Content-Type: application/json" -d '{
"access_token": "YOUR_ACCESS_TOKEN",
"instance_id": "Your_Instance_ID",
"url": "https://my-app.com/webhook",
"name": "Updated CRM",
"events": ["message", "message.ack", "group.v2.update"],
"is_active": 0
}'
JavaScript (Fetch)
const res = await fetch('https://api.wawp.net/v2/webhook/update', {
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
access_token: 'YOUR_ACCESS_TOKEN',
instance_id: 'Your_Instance_ID',
url: 'https://my-app.com/webhook',
events: ['message', 'message.ack', 'group.v2.update'],
is_active: 0
})
});
const data = await res.json();
console.log(data);
�🛡️ System Webhook
You can update the system webhook (https://app.wawp.net/api/webhook/{token}) to change which events are synced to the Wawp inbox. The URL itself cannot be changed through this endpoint.
Request Parameters
Configure the parameters required to interact with this endpoint. All query and body arguments are listed below with their details.
Request Body
Sent as a JSON objectstring | The 12-character ID of the instance Example: | ||
string | Your API Access Token Example: | ||
string | The exact webhook URL that already exists on the instance Example: | ||
string | — | An updated display name for this webhook Example: | |
array | — | Updated list of event names to subscribe to Example: | |
number | — | 1 to enable the webhook, 0 to disable Example: | |
object | — | Updated retry policy: delay in seconds and number of attempts Example: | |
string | — | Updated HMAC secret for request verification Example: |
Request Samples
Use these ready-to-go code snippets to integrate our API into your project quickly and efficiently. Choose your preferred language and library.
Expected Responses
Explore all possible responses and outcomes from the server. We have documented each status code with data examples to make success and error handling easier.
Example
{
"status": "success",
"message": "Webhook updated successfully.",
"webhook": {
"url": "https://my-app.com/webhook",
"events": {
"0": "message",
"1": "message.ack",
"2": "group.v2.update"
},
"is_active": 0,
"enabled": false,
"retries": {
"delay": 5,
"attempts": 10
}
}
}Command Palette
Search for a command to run...