Empresas
Activar URL de webhook
Activa y valida una URL de webhook enviando una petición de prueba.
Parámetros (en el body):
- rut: RUT de la empresa (sin puntos, sin guión). Ejemplo: 76123456
- url: URL completa del webhook a activar
- token: (Opcional) Token de autenticación que se enviará en el header x-webhook-key: {token} para validar el webhook
Ejemplo de uso:
URL:
POST /api/v1/organizations/activar_webhook/
Body sin token:
{
"rut": "76123456",
"url": "https://tu-dominio.com/webhook"
}
Body con token:
{
"rut": "76123456",
"url": "https://tu-dominio.com/webhook",
"token": "mi-token-secreto-123"
}
Respuesta exitosa (200):
Si tu webhook responde con status 200:
- ✅ El webhook queda activado para recibir notificaciones reales
- ℹ️ Si enviaste un token, se guardará y se usará en el header x-webhook-key: {token} en las notificaciones reales
- ℹ️ Si NO enviaste un token, las notificaciones NO tendrán el header x-webhook-key
Con token:
{
"status": true,
"data": {
"rut": "1",
"url": "https://tu-dominio.com/webhook",
"http_status": 200,
"validated": true,
"webhook_token": "mi-token-secreto-123"
},
"message": "Webhook validado correctamente"
}
Sin token:
{
"status": true,
"data": {
"rut": "1",
"url": "https://tu-dominio.com/webhook",
"http_status": 200,
"validated": true
},
"message": "Webhook validado correctamente"
}
Respuesta fallida:
Si tu webhook NO responde con status 200:
- ❌ No se guarda la configuración del webhook
{
"status": false,
"data": {
"rut": "1"
"url": "https://tu-dominio.com/webhook",
"http_status": 500,
"validated": false
},
"message": "Webhook no validado"
}
post/v1/empresas/activar_webhook/
Request
- Base URL: https://api.clay.cl (the document declares no server; this is the origin it was published from)
- URL: https://api.clay.cl/v1/empresas/activar_webhook/
- Auth: API key in header Token
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.