updateNotificationWebhook
PUT
/api/v1/notifications/webhooks/{id}
const url = 'https://example.com/api/v1/notifications/webhooks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","url":"https://example.com","enabled":true,"categories":["incident"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/notifications/webhooks/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "url": "https://example.com", "enabled": true, "categories": [ "incident" ] }'Update a notification webhook. Requires an Owner or Administrator with the admin scope. Cookie-authenticated unsafe requests require X-CSRF-Token.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Header Parameters
Section titled “Header Parameters”X-CSRF-Token
string
Cookie-backed browser requests only, and only on unsafe methods. Bearer grants never send it.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
string
url
string format: uri
enabled
boolean
categories
Array<string>
Responses
Section titled “ Responses ”Notification webhook updated
Media typeapplication/json
object
data
required
object
id
required
string format: uuid
name
required
string
url
required
string format: uri
enabled
required
boolean
categories
required
Array<string>
lastAttemptAt
string format: date-time
lastSuccessAt
string format: date-time
lastError
string
createdAt
required
string format: date-time
Example
{ "data": { "categories": [ "incident" ] }}Invalid webhook id or body
Dashboard authentication required
Insufficient role
Webhook not found