Saltar al contingut principal
POST

Deshabilitar un webhook

Scope:developers:webhooks.write
https://api.holded.com/api/v2/webhooks/{webhookId}/disable

Deshabilita un webhook, deixant d'enviar-li esdeveniments. Es registra qui l'ha deshabilitat i el motiu.

Paràmetres

Paràmetres de ruta

webhookIdstringobligatori

ID del webhook (ObjectId hexadecimal de 24 caràcters)

Cos de la petició

object
reasonstringrequired

Motiu pel qual es deshabilita el webhook (obligatori)

Petició

python
import requests

url = "https://api.holded.com/api/v2/webhooks/507f1f77bcf86cd799439011/disable"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "reason": "Endpoint returning 5xx errors"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Respostes

Respostes exitoses

204Webhook deshabilitat

Respostes d'error

400El camp reason és obligatoriapplication/json
401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
404Webhook no trobatapplication/json
429Límit de sol·licituds exceditapplication/json