Create a Webhook
Create a new webhook to receive real-time event notifications.
POST https://api.platica.mx/v1/webhooks Request body
{
"name": "Webhook de Notificaciones",
"url": "https://mi-app.com/webhook",
"events": [
"conversation.created",
"conversation.status.updated",
"message.created",
"client.created",
"client.customFields.updated"
],
"active": true,
"secret": "mi_secreto_seguro",
"headers": {
"Authorization": "Bearer token123",
"Custom-Header": "valor personalizado"
}
} Body parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
name | string | Descriptive webhook name (max 100 characters) | ✓ |
url | string | URL where notifications are sent (max 500 characters) | ✓ |
events | array | List of events to subscribe to — see available events | ✓ |
active | boolean | Webhook state | — |
secret | string | Secret used to validate authenticity (max 255 characters) | — |
headers | object | Custom headers to include in the requests (max 10) | — |
Consejo
You can mix conversation, message, customer, and WhatsApp Flows events on the same webhook. If you use whatsapp.flows.*, your endpoint must respond with JSON in under 700 ms — see WhatsApp Flows .
Response
{
"status": "success",
"message": "Webhook creado exitosamente",
"data": {
"id": "webhook_abc123",
"workspaceId": "ws_456"
}
}