GET /api/webhooks
List webhooks
Needs the webhooks.manage permission on the API key's role.
No request-body schema is supplied for this operation in the registry.
Documented responses
200— OK400— The body is not valid; `error` says why401— No valid API key403— The key's role lacks the permission, or the module is off
POST /api/webhooks
Add a webhook
Needs the webhooks.manage permission on the API key's role.
JSON request schema
{
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2000,
"format": "uri"
},
"secret": {
"type": "string",
"minLength": 16,
"maxLength": 512
},
"events": {
"minItems": 1,
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"maxLength": 80
}
}
},
"required": [
"url",
"secret",
"events"
]
}Documented responses
200— OK201— Created400— The body is not valid; `error` says why401— No valid API key403— The key's role lacks the permission, or the module is off
PATCH /api/webhooks/{id}
Switch a webhook on or off
Needs the webhooks.manage permission on the API key's role.
Path parameters
id— required path parameter
JSON request schema
{
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
},
"required": [
"enabled"
]
}Documented responses
200— OK400— The body is not valid; `error` says why401— No valid API key403— The key's role lacks the permission, or the module is off404— Not found in this company
DELETE /api/webhooks/{id}
Delete a webhook
Needs the webhooks.manage permission on the API key's role.
Path parameters
id— required path parameter
No request-body schema is supplied for this operation in the registry.
Documented responses
200— OK400— The body is not valid; `error` says why401— No valid API key403— The key's role lacks the permission, or the module is off404— Not found in this company
Other policy and state errors may also apply. See API key permissions and limits and the complete OpenAPI document.