Update a webhook
curl --request POST \
--url https://back.leap.onclarity.com/api/webhooks/edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webhook_id": 123,
"endpoint": "<string>",
"event_ids": [
123
],
"status": "active"
}
'import requests
url = "https://back.leap.onclarity.com/api/webhooks/edit"
payload = {
"webhook_id": 123,
"endpoint": "<string>",
"event_ids": [123],
"status": "active"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhook_id: 123, endpoint: '<string>', event_ids: [123], status: 'active'})
};
fetch('https://back.leap.onclarity.com/api/webhooks/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"organization_id": 123,
"endpoint": "<string>",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"events": [
{
"id": 123,
"key": "message",
"display_name": "<string>",
"specs": null
}
]
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}Webhooks
Update a webhook
POST
/
api
/
webhooks
/
edit
Update a webhook
curl --request POST \
--url https://back.leap.onclarity.com/api/webhooks/edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"webhook_id": 123,
"endpoint": "<string>",
"event_ids": [
123
],
"status": "active"
}
'import requests
url = "https://back.leap.onclarity.com/api/webhooks/edit"
payload = {
"webhook_id": 123,
"endpoint": "<string>",
"event_ids": [123],
"status": "active"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({webhook_id: 123, endpoint: '<string>', event_ids: [123], status: 'active'})
};
fetch('https://back.leap.onclarity.com/api/webhooks/edit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"organization_id": 123,
"endpoint": "<string>",
"status": "active",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"events": [
{
"id": 123,
"key": "message",
"display_name": "<string>",
"specs": null
}
]
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}{
"code": "<string>",
"status": "error",
"message": "<string>",
"extra": {}
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.
Body
application/json
Response
Request fulfilled, document follows