Flujos para desarrolladores
Construye con la API REST y Webhooks de MyCaly
Descubre cómo se conectan los endpoints de MyCaly para reservar citas, registrar asistentes en seminarios web, sincronizar contactos CRM y verificar webhooks en tiempo real.
No revises decenas de endpoints aislados. Elige un flujo real abajo, inspecciona la cadena exacta de petición y respuesta y pruébalo en vivo en la documentación interactiva.
https://saifmeetup.mycaly.io/api/v1
- JSON REST API v1 (60 pet./min)
- Autenticación Bearer con Sanctum
- Webhooks firmados con HMAC-SHA256
curl -X POST "https://saifmeetup.mycaly.io/api/v1/auth/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"email": "you@company.com",
"password": "your-password",
"device_name": "CRM Integration"
}'
# Include the returned token on protected endpoints:
# Authorization: Bearer 1|9xK3...token_hash
Genera un token personal en API y Webhooks (o mediante POST /api/v1/auth/login) y envíalo en la cabecera Bearer en las rutas protegidas.
Cómo encajan la autenticación y los endpoints
Las rutas protegidas requieren un token Bearer y un plan con acceso a la API REST, mientras que los endpoints públicos permiten widgets de reserva y registro desde el navegador.
Crea tu token de API
Genera tokens personales en tu panel bajo API y Webhooks, o créalos programáticamente con POST /api/v1/auth/tokens.
Envía autorización Bearer
Incluye Authorization: Bearer <token> y Accept: application/json en tus peticiones protegidas. Todas devuelven { success, message, data }.
Endpoints públicos para clientes
Usa GET /events/{id}/available-slots y POST /webinars/{id}/register en widgets de reserva sin exponer credenciales privadas.
Sigue las cadenas de petición de principio a fin
Selecciona un flujo y haz clic en cada paso para ver cómo pasan los IDs y horarios de un endpoint al siguiente.
Crea tu propio flujo de reservas
Carga tus tipos de evento activos, consulta horarios libres para una fecha y crea, reprograma o cancela la cita.
curl -X GET "https://saifmeetup.mycaly.io/api/v1/events?per_page=10" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
{
"success": true,
"message": "Events retrieved successfully.",
"data": {
"events": [
{
"id": 12,
"name": "30-Min Consultation",
"event_link": "30-min-consultation",
"slot_time": 30,
"event_location": 2,
"status": true,
"share_url": "/s/ali/30-min-consultation"
}
],
"pagination": { "total": 1, "per_page": 10, "current_page": 1, "last_page": 1 }
}
}
curl -X GET "https://saifmeetup.mycaly.io/api/v1/events/12/available-slots?date=2026-12-10&timezone=America/New_York" \
-H "Accept: application/json"
{
"success": true,
"message": "Available slots retrieved successfully.",
"data": {
"event_id": 12,
"event_name": "30-Min Consultation",
"slot_duration_minutes": 30,
"date": "2026-12-10",
"slots": [
"09:00 AM - 09:30 AM",
"10:00 AM - 10:30 AM",
"02:00 PM - 02:30 PM"
]
}
}
curl -X POST "https://saifmeetup.mycaly.io/api/v1/bookings" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"event_id": 12,
"schedule_date": "2026-12-10",
"slot_time": "09:00 AM - 09:30 AM",
"name": "Alex Rivera",
"email": "alex@example.com",
"phone_number": "+14155550140"
}'
{
"success": true,
"message": "Appointment booked successfully.",
"data": {
"id": 408,
"uuid": "8f3c2e10-7b1d-4d62-a210-91b7c4f0192e",
"event_id": 12,
"schedule_date": "2026-12-10",
"slot_time": "09:00 AM - 09:30 AM",
"status": 1,
"status_text": "Booked",
"source": "api",
"meeting": {
"meeting_url": "https://meethour.io/room-408",
"meeting_id": "mh_408"
}
}
}
POST /bookings/{id}/reschedule
POST /bookings/{id}/cancel
Automatiza seminarios en vivo e inscripciones
Crea eventos tipo webinar, inscribe asistentes desde tu propia landing page y sincroniza o cancela registros por API.
curl -X POST "https://saifmeetup.mycaly.io/api/v1/webinars" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Product Launch Live Q&A",
"event_link": "launch-qa",
"slot_time": 60,
"event_location": 2,
"schedule_from": "2026-12-15 14:00:00",
"schedule_to": "2026-12-15 15:00:00"
}'
{
"success": true,
"message": "Webinar created successfully.",
"data": {
"id": 54,
"name": "Product Launch Live Q&A",
"event_link": "launch-qa",
"schedule_from": "2026-12-15 14:00:00",
"schedule_to": "2026-12-15 15:00:00",
"slot_time": 60,
"status": true,
"share_url": "/s/ali/launch-qa"
}
}
PATCH /webinars/{id}/status
curl -X POST "https://saifmeetup.mycaly.io/api/v1/webinars/54/register" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Sara Kim",
"email": "sara@example.com",
"phone_number": "+14155550192"
}'
{
"success": true,
"message": "Webinar registration successful.",
"data": {
"id": 915,
"event_id": 54,
"schedule_date": "2026-12-15",
"slot_time": "10:00 AM - 11:00 AM",
"guest": {
"name": "Sara Kim",
"email": "sara@example.com",
"phone": "+14155550192"
},
"status_text": "Booked"
}
}
curl -X GET "https://saifmeetup.mycaly.io/api/v1/webinars/54/attendees?per_page=50" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
{
"success": true,
"message": "Webinar attendees retrieved successfully.",
"data": {
"webinar_id": 54,
"webinar_name": "Product Launch Live Q&A",
"attendees": [
{
"id": 915,
"schedule_date": "2026-12-15",
"guest": { "name": "Sara Kim", "email": "sara@example.com" },
"status_text": "Booked"
}
],
"pagination": { "total": 1, "per_page": 50, "current_page": 1, "last_page": 1 }
}
}
POST /webinars/{id}/attendees/{attendeeId}/cancel
Sincroniza contactos CRM e historial de citas
Busca contactos existentes, crea o actualiza registros por correo sin duplicados y obtén sus reservas vinculadas.
curl -X GET "https://saifmeetup.mycaly.io/api/v1/contacts?search=alex&per_page=20" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
{
"success": true,
"message": "Contacts retrieved successfully.",
"data": {
"contacts": [
{
"id": 77,
"name": "Alex Rivera",
"email": "alex@example.com",
"phone_number": "+14155550140",
"billing_address": "123 Market St, San Francisco, CA"
}
],
"pagination": { "total": 1, "per_page": 20, "current_page": 1, "last_page": 1 }
}
}
curl -X POST "https://saifmeetup.mycaly.io/api/v1/contacts" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Alex Rivera",
"email": "alex@example.com",
"phone_number": "+14155550140",
"billing_address": "123 Market St, San Francisco, CA"
}'
{
"success": true,
"message": "Contact saved successfully.",
"data": {
"id": 77,
"name": "Alex Rivera",
"email": "alex@example.com",
"phone_number": "+14155550140",
"billing_address": "123 Market St, San Francisco, CA"
}
}
PUT /contacts/{id}
curl -X GET "https://saifmeetup.mycaly.io/api/v1/contacts/77" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
{
"success": true,
"message": "Contact details retrieved successfully.",
"data": {
"contact": {
"id": 77,
"name": "Alex Rivera",
"email": "alex@example.com"
},
"bookings": [
{
"id": 408,
"event_id": 12,
"schedule_date": "2026-12-10",
"slot_time": "09:00 AM - 09:30 AM",
"status_text": "Booked"
}
]
}
}
Suscribe, prueba y audita webhooks en tiempo real
Registra URLs HTTPS para eventos de reservas, webinars, contactos y pagos, envía un ping de prueba y revisa los logs.
curl -X POST "https://saifmeetup.mycaly.io/api/v1/webhooks" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "CRM Listener",
"target_url": "https://api.yourapp.com/webhooks/mycaly",
"events": ["booking.created", "booking.rescheduled", "webinar.registrant_added"]
}'
{
"success": true,
"message": "Webhook subscription registered successfully.",
"data": {
"id": 9,
"name": "CRM Listener",
"target_url": "https://api.yourapp.com/webhooks/mycaly",
"secret": "a9c8f7d6e5b4...",
"events": ["booking.created", "booking.rescheduled", "webinar.registrant_added"],
"is_active": true
}
}
curl -X POST "https://saifmeetup.mycaly.io/api/v1/webhooks/9/test" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
{
"success": true,
"message": "Test webhook dispatched.",
"data": {
"id": 102,
"webhook_endpoint_id": 9,
"event_type": "endpoint.test",
"response_status": 200,
"attempt": 1,
"delivered_at": "2026-12-03T12:45:00+00:00",
"error_message": null
}
}
curl -X GET "https://saifmeetup.mycaly.io/api/v1/webhooks/9/deliveries?per_page=20" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
{
"success": true,
"message": "Delivery logs retrieved successfully.",
"data": {
"deliveries": [
{
"id": 102,
"webhook_endpoint_id": 9,
"event_type": "endpoint.test",
"response_status": 200,
"attempt": 1,
"delivered_at": "2026-12-03T12:45:00+00:00",
"error_message": null
}
],
"pagination": { "total": 1, "per_page": 20, "current_page": 1, "last_page": 1 }
}
}
Verifica cada webhook entrante con HMAC-SHA256
Cada webhook saliente incluye tres cabeceras personalizadas y un sobre JSON para validar su autenticidad antes de ejecutar acciones.
Cabeceras enviadas por MyCaly
-
X-SignatureResumen HMAC-SHA256 hexadecimal del cuerpo JSON crudo firmado con el secreto del endpoint.
-
X-Event-TypeNombre del evento como booking.created, booking.rescheduled o webinar.registrant_confirmed.
-
X-Event-IdIdentificador único del evento (evt_...) útil para controlar idempotencia.
Principales eventos soportados
Puedes suscribirte a eventos específicos o usar "*" al registrar tu endpoint.
booking.created, booking.pending_approval, booking.confirmed, booking.declined, booking.rescheduled, booking.cancelled
webinar.created, webinar.updated, webinar.registrant_added, webinar.registrant_confirmed, webinar.registrant_cancelled
contact.created, contact.updated, contact.deleted, payment.completed, payment.failed
Ejemplo de verificación de firma
Calcula el HMAC-SHA256 sobre el cuerpo crudo de la petición con tu secreto y compáralo en tiempo constante.
import crypto from 'node:crypto';
// Use express.raw({ type: 'application/json' }) so req.body stays unparsed
const expected = crypto
.createHmac('sha256', process.env.MYCALY_WEBHOOK_SECRET)
.update(req.body)
.digest('hex');
const signature = req.get('X-Signature') || '';
const isValid =
expected.length === signature.length &&
crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
if (!isValid) return res.status(401).send('Invalid webhook signature');
const payload = JSON.parse(req.body.toString('utf8'));
$rawBody = file_get_contents('php://input');
$headerSignature = $_SERVER['HTTP_X_SIGNATURE'] ?? '';
$expected = hash_hmac('sha256', $rawBody, $webhookSecret);
if (! hash_equals($expected, $headerSignature)) {
http_response_code(401);
exit('Invalid webhook signature');
}
$event = json_decode($rawBody, true);
// Process $event['id'], $event['event'], $event['data']
{
"id": "evt_7f8e9d10c2b3a4f5e6d7c8b9",
"event": "booking.created",
"timestamp": "2026-12-03T12:45:00+00:00",
"data": {
"id": 408,
"event_id": 12,
"schedule_date": "2026-12-10",
"slot_time": "09:00 AM - 09:30 AM",
"guest": {
"name": "Alex Rivera",
"email": "alex@example.com"
},
"source": "api"
}
}
Preguntas frecuentes sobre API y Webhooks
¿Dónde creo y gestiono tokens de API y webhooks?
Inicia sesión en tu panel de MyCaly y abre API y Webhooks en la barra lateral bajo Integraciones. Desde ahí o mediante /api/v1 puedes crear/revocar tokens y gestionar webhooks.
¿Qué endpoints no requieren token Bearer?
POST /api/v1/auth/login, GET /api/v1/events/{id}/available-slots y POST /api/v1/webinars/{id}/register son públicos para que widgets de reserva y formularios funcionen sin exponer claves privadas.
¿Cuáles son los límites de peticiones y requisitos del plan?
El límite por defecto es de 60 peticiones por minuto por usuario/IP (devuelve HTTP 429 si se supera). Las rutas protegidas /api/v1 y los webhooks salientes requieren un plan con acceso a API / Webhooks habilitado.
¿Cómo debe verificar mi servidor los webhooks de MyCaly?
Lee el cuerpo HTTP crudo antes de reserializar el JSON, calcula el HMAC-SHA256 con el secreto de tu endpoint y compáralo con la cabecera X-Signature usando hash_equals (PHP) o crypto.timingSafeEqual (Node.js).
Tu agenda no debería frenarte.
Empieza a programar de forma más inteligente con MyCaly. Conecta tus calendarios, define tus reglas de precios y empieza hoy mismo a recibir reservas de clientes.
- Programación inteligente
- Pagos directos
- Reuniones de vídeo HD