Webhooks
Update a webhook endpoint
Changes only the fields you send.
PATCH https://api.diska.ai/v1/webhook-endpoints/{endpoint_id}
Scope: webhooks:manage
active: true re-enables a disabled endpoint and resets failure_count; active: false stops deliveries. The secret does not change.
Parameters
Path
| Name | Type | Required | Description |
|---|---|---|---|
endpoint_id | string | Yes | The endpoint's ID. |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
url | string | null | No | New https:// URL. 12 to 2000 characters. |
description | string | null | No | New description; "" clears it. Up to 500 characters. |
events | array | No | New event list (at least one). |
active | boolean | null | No | true re-enables and resets failure_count; false stops deliveries. |
{
"active": true
}
Examples
curl -X PATCH "https://api.diska.ai/v1/webhook-endpoints/<endpoint_id>" \
-H "Authorization: Bearer $DISKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"active":true}'
import os
import requests
response = requests.patch(
"https://api.diska.ai/v1/webhook-endpoints/<endpoint_id>",
headers={"Authorization": f"Bearer {os.environ['DISKA_API_KEY']}"},
json={
"active": True,
},
timeout=30,
)
response.raise_for_status()
print(response.json())
// Node.js 18 or later, in a .mjs file
const response = await fetch('https://api.diska.ai/v1/webhook-endpoints/<endpoint_id>', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.DISKA_API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"active": true
})
})
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())
<?php
$ch = curl_init('https://api.diska.ai/v1/webhook-endpoints/<endpoint_id>');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('DISKA_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'active' => true,
]),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status >= 400) {
throw new RuntimeException("HTTP $status: $body");
}
print_r(json_decode($body, true));
Try it
Send the request from this page, with your key. The key stays on this page: it is not stored and is only sent to api.diska.ai. Use a test key with the fewest scopes you need.
PATCH
https://api.diska.ai/v1/webhook-endpoints/{endpoint_id}Starts with dsk_. It stays in this browser tab only.
path
Enter an API key (dsk_…).
Response 200
| Field | Type | Description |
|---|---|---|
id | string | Endpoint ID. |
url | string | Delivery destination. |
description | string | null | Description. |
events | array | Subscribed events. |
active | boolean | false when disabled (by you or automatically). Default: true. |
disabled_reason | string | null | Why it was disabled automatically, or null. |
failure_count | integer | Consecutive failed deliveries. Default: 0. |
last_delivery_at | string | null | Last delivery. |
last_delivery_status | string | null | Result of the last delivery, for example delivered (200). |
secret_preview | string | Start and end of the secret, to identify it. |
created_at | string | null | Creation date (ISO 8601). |
{
"id": "e7a1c3f5-9b2d-4f6e-8a0c-3d5f7b9e1c24",
"url": "https://o-seu-sistema.com/hooks/diska",
"description": "CRM — produção",
"events": [
"call.completed"
],
"active": true,
"disabled_reason": null,
"failure_count": 0,
"last_delivery_at": "2026-10-25T18:40:00Z",
"last_delivery_status": "delivered (200)",
"secret_preview": "dskw_AbC…wXyZ",
"created_at": "2026-10-25T18:40:00Z"
}
Errors
| Code | When |
|---|---|
400 | URL inválido: use um endpoint https:// completo. (use a full https:// URL), URL bloqueado por segurança: … (blocked for security), Subscreva pelo menos um evento. (at least one event), Eventos desconhecidos: … (unknown events) or Limite de 10 endpoints por organização atingido. (10 endpoints per organization). |
404 | Endpoint não encontrado. (endpoint not found). |
Errors common to every endpoint (401, 403, 422, 429 and 5xx) are in Errors.

