Webhooks y API (Business)
Si tu negocio requiere integración custom con sistemas propios (ERP, CRM custom, marketplace propio), Brote expone webhooks salientes y API REST — disponibles en plan Business ($349/mes).
Webhooks salientes
Sección titulada «Webhooks salientes»Cada evento del sistema Brote dispara un POST HTTPS a los endpoints que configures, firmado con HMAC-SHA256.
Eventos disponibles
Sección titulada «Eventos disponibles»conversation.createdconversation.updatedconversation.closedmessage.receivedmessage.sentcontact.createdcontact.updatedcontact.opted_outticket.createdticket.stage_changedticket.wonticket.lostlead.qualifiedpayment.receivedcampaign.completedagent.handoffPayload típico
Sección titulada «Payload típico»{ "event": "payment.received", "timestamp": "2026-05-19T10:23:45.000Z", "organization_id": "uuid", "data": { "payment_id": "mp_payment_123", "amount": 49000, "currency": "CLP", "conversation_id": "uuid", "contact_id": "uuid", "contact": { "name": "María González", "phone": "+569·········", "email": "maria@ejemplo.cl" }, "external_reference": "ticket_uuid" }}Verificar HMAC
Sección titulada «Verificar HMAC»Header X-Brote-Signature: sha256=<hex>. Computas en tu servidor:
const expected = crypto.createHmac('sha256', WEBHOOK_SECRET) .update(rawBody) .digest('hex')const isValid = `sha256=${expected}` === req.headers['x-brote-signature']Si no validás el HMAC, cualquiera podría postearte fake events. Validá siempre.
Retries + deliveries log
Sección titulada «Retries + deliveries log»Si tu endpoint responde con 5xx o timeout, Brote re-intenta con backoff exponencial: 1min, 5min, 30min, 2h, 12h. Después marca como failed. Todas las entregas (exitosas y fallidas) quedan en el log de webhook_deliveries consultable desde el dashboard.
API REST
Sección titulada «API REST»Endpoint base: https://api.brote.ai/v1/
Auth: Bearer token (API key per-org, generás desde Configuración → API Keys).
Endpoints principales
Sección titulada «Endpoints principales»GET /v1/contacts # listar contactosPOST /v1/contacts # crear contactoGET /v1/contacts/{id} # detallePATCH /v1/contacts/{id} # actualizar
GET /v1/conversations # listar convPOST /v1/conversations/{id}/messages # enviar mensaje desde sistema externo
GET /v1/tickets # listar ticketsPATCH /v1/tickets/{id}/stage # mover etapa
POST /v1/payments/links # crear link MP programáticoGET /v1/payments # listar pagos
GET /v1/campaigns # listar campañasPOST /v1/campaigns # crear campaña vía APIRate limits
Sección titulada «Rate limits»- 100 req/min sostenido en plan Business.
- Burst de 200 ocasional.
- Si superas: 429 con
Retry-Afterheader.