Update a Specific Webhook Endpoint
This endpoint updates a specific webhook endpoint
info
This operation requires admin role.
HTTP Request
PUT /api/v2/webhook/endpoint/{id}/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | A unique integer value identifying this endpoint |
» is_active | body | boolean | false | Endpoint active status |
» target | body | string(uri) | true | Endpoint target |
» description | body | string | false | Endpoint description |
» events | body | list | true | Endpoint events objects |
»» type | body | string | true | The webhook event type |
» ssl_cert_verification | body | boolean | false | If true, the SSL certificates for HTTPS requests must be enabled |
Example Body Parameters
- JSON
{
"is_active": "boolean",
"target": "string",
"description": "string",
"events": [
{
"type": "string"
}
],
"ssl_cert_verification": "boolean"
}
Example Request
- JavaScript
- Bash
const inputBody = '{
"is_active": "boolean",
"target": "string",
"description": "string",
"events": [
{
"type": "string"
}
],
"ssl_cert_verification": "boolean"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};
fetch('/api/v2/webhook/endpoint/{id}/',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X PUT /api/v2/webhook/endpoint/{id}/ \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access_token}' \
--data-raw '{
"is_active": "boolean",
"target": "string",
"description": "string",
"events": [
{
"type": "string"
}
],
"ssl_cert_verification": "boolean"
}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Response status code | Endpoint |
Example responses
- 200
{
"id": "integer",
"created_at": "string",
"updated_at": "string",
"is_active": "boolean",
"target": "string",
"description": "string",
"events": [
{
"type": "string",
"added_at": "string"
}
],
"ssl_cert_verification": "boolean"
}