AI Empire API
REST endpoints + webhooks · integra tu PMS · CRM o sistema propio con AI Empire. Preview ahora · acceso completo en plan Enterprise post-CIF · pública para developers H2 2026.
Estado actual · honest disclosure
La API interna existe · alimenta el dashboard ejecutivo y los webhooks Meta/Stripe/Cal.com en producción. Lo que falta para public release: documentación OpenAPI completa · rate limits per-key · auth API key panel · changelog versionado público. Roadmap H2 2026. Mientras tanto · custom integration disponible en plan Enterprise (consultar).
Endpoints preview
REST API · 6 categorías
Patients
CRUD pacientes · search por teléfono · histórico interacciones · GDPR delete + export
- GET /api/patients
- POST /api/patients
- GET /api/patients/:id
- DELETE /api/patients/:id (GDPR)
Appointments
Citas · crear · cancelar · reprogramar · listar próximas · no-show flag
- GET /api/appointments
- POST /api/appointments
- PATCH /api/appointments/:id
- POST /api/appointments/:id/no-show
Messages
Enviar WhatsApp · templates · ver thread paciente · IA insights
- POST /api/messages/send
- POST /api/messages/send-template
- GET /api/messages/:patientId
Metrics
KPIs clínica · revenue recovered · no-shows prevented · NPS · cost tracking
- GET /api/metrics/dashboard
- GET /api/metrics/revenue
- GET /api/metrics/cost-tracking
Webhooks
Eventos outbound · message-received · appointment-booked · no-show-detected · handoff-opened
- POST your-endpoint (message.received)
- POST your-endpoint (appointment.booked)
- POST your-endpoint (no_show.detected)
Knowledge
RAG · documentos clínica · embed · search · update precios + servicios
- POST /api/knowledge
- POST /api/knowledge/from-url
- GET /api/knowledge
- DELETE /api/knowledge/:id
Autenticación
Bearer token · scoped por clínica
Authentication es Bearer token obtenido del panel admin de tu clínica. Cada token es scoped a tu clinica_id · rotable · revocable · audit trail completo.
# Example request
curl https://api.aiempire.software/v1/patients \
-H "Authorization: Bearer aie_live_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json"
# Example response
{
"data": [
{ "id": "uuid", "telefono": "+34xxx", "nombre": "...", ... }
],
"meta": { "total": 142, "page": 1, "per_page": 50 }
}Rate limits: 60 requests/min default · 600 requests/min plan Enterprise. Burst 120 / 1200 respectivamente. Headers X-RateLimit-* en cada response.
Webhooks outbound
Eventos al instante · firmados HMAC
Recibe eventos en tu endpoint · firmados con HMAC-SHA256 · dedup automático por event_id · retry exponencial 5 intentos con backoff.
# Webhook payload example
POST https://your-clinic.com/webhooks/aiempire
X-Signature-256: sha256=<hmac>
X-Event-Id: evt_xxx
X-Event-Type: appointment.booked
{
"id": "evt_xxx",
"type": "appointment.booked",
"created_at": "2026-05-14T18:32:00Z",
"data": {
"appointment_id": "uuid",
"patient_id": "uuid",
"scheduled_at": "2026-05-20T10:30:00Z",
"trigger_source": "bot_conversation"
}
}¿Necesitas integración custom hoy?
El API público completo viene H2 2026. Mientras · plan Enterprise (1.499€/mes) incluye integraciones custom 1:1 con el founder · PMS · CRM · sistemas legacy. Cuéntame tu stack actual y te confirmo si encaja.
Hablar de integraciónhello@aiempire.software · respondo en <24h