Actualizar configuración de webhook
Crea o actualiza la configuración de webhook de un cliente.
Endpoint: PUT /v1/webhook/config
Body
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
url | string | Sí | URL de notificación (https). |
client_id | number | No | Cliente a configurar. Default: el cliente del token. Requiere BSP_CN si difiere del token. |
active | boolean | No | Activa/desactiva la notificación. |
Request
curl --request PUT \
--url 'https://api.chattigo.com/v1/webhook/config' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"client_id": 6,
"url": "https://hooks.chattigo.com/evt"
}'Response
Éxito (200)
{
"client_id": 1001,
"url": "https://hooks.chattigo.com/evt",
"active": true
}Errores
| Código | Caso |
|---|---|
400 | url requerida, o client_id inválido |
403 | Cross-client sin BSP_CN |