Webhooks
Listar endpoints de webhook
Lista os endpoints da organização, activos e inactivos, do mais recente para o mais antigo.
GET https://api.diska.ai/v1/webhook-endpoints
Âmbito: webhooks:manage
Exemplos
curl "https://api.diska.ai/v1/webhook-endpoints" \
-H "Authorization: Bearer $DISKA_API_KEY"
import os
import requests
response = requests.get(
"https://api.diska.ai/v1/webhook-endpoints",
headers={"Authorization": f"Bearer {os.environ['DISKA_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())
// Node.js 18 ou superior, num ficheiro .mjs
const response = await fetch('https://api.diska.ai/v1/webhook-endpoints', {
headers: { Authorization: `Bearer ${process.env.DISKA_API_KEY}` }
})
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');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('DISKA_API_KEY')],
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));
Experimentar
Envie o pedido a partir desta página, com a sua chave. A chave fica só nesta página: não é guardada e só é enviada para api.diska.ai. Use uma chave de teste com os âmbitos mínimos.
GET
https://api.diska.ai/v1/webhook-endpointsComeça por dsk_. Fica só neste separador do browser.
Introduza uma chave API (dsk_…).
Resposta 200
| Campo | Tipo | Descrição |
|---|---|---|
[].id | string | Identificador do endpoint. |
[].url | string | Destino das entregas. |
[].description | string | null | Descrição. |
[].events | array | Eventos subscritos. |
[].active | boolean | false quando foi desactivado (por si ou automaticamente). Padrão: true. |
[].disabled_reason | string | null | Motivo da desactivação automática, ou null. |
[].failure_count | integer | Entregas falhadas seguidas. Padrão: 0. |
[].last_delivery_at | string | null | Última entrega. |
[].last_delivery_status | string | null | Resultado da última entrega, por exemplo delivered (200). |
[].secret_preview | string | Início e fim do secret, para o identificar. |
[].created_at | string | null | Data de criação (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"
}
]
Erros
Este endpoint não tem erros próprios.
Os erros comuns a todos os endpoints (401, 403, 422, 429 e 5xx) estão em Erros.

