Update a webhook
Scope: developers:webhooks.write https://api.alladdin.com/api/v2/webhooks/{webhookId}
Updates the URL, events and description of a webhook.
Parameters
Path parameters
webhookId string required
Webhook ID
Request body
object url string<uri> required
Callback URL
events[] string[] required
Events to subscribe to
description string optional
Human-readable description
Request
import requests
url = "https://api.alladdin.com/api/v2/webhooks/507f1f77bcf86cd799439011"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"url": "https://example.com/webhook",
"events": [
"invoice.create"
],
"description": "My webhook"
}
response = requests.put(url, headers=headers, json=payload)
print(response.json())Responses
Success responses
204 Webhook updated
Error responses
400 Bad request application/json 401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Webhook not found application/json 409 An event subscription already exists for this account 422 The URL is not publicly accessible 429 Rate limit exceeded application/json
