Menú de la documentación

Referencia

Webhooks y eventos

Endpoints que reciben eventos firmados y el registro de eventos.

Listar eventos

GET/v1/events

Permiso: webhooks:read

Eventos de los últimos 30 días, del más nuevo al más antiguo. Sirve para recuperar lo que tu sistema no alcanzó a procesar. Solo aparecen los tipos que la clave puede leer (reservas con appointments:read, clientes con clients:read).

Parámetros

NombreEnTipoDescripción
limitqueryintegerElementos por página (1 a 100).
Por defecto: 25 · Entre 1 y 100
cursorquerystringValor next_cursor de la página anterior.
typequeryEventTypeValores: appointment.created, appointment.updated, appointment.rescheduled, appointment.confirmed, appointment.cancelled, appointment.deleted, client.created, client.updated
created_sincequerystring

Ejemplo

curl
curl "https://api.mihoraya.com/v1/events?type=appointment.created" \
  -H "Authorization: Bearer $MIHORAYA_API_KEY"
JavaScript (Node.js 18+)
JavaScript (Node.js)
const res = await fetch("https://api.mihoraya.com/v1/events?type=appointment.created", {
  headers: {
    Authorization: `Bearer ${process.env.MIHORAYA_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (${data.error.request_id})`);
console.log(data);
Python (requests)
Python
import os
import requests

res = requests.get(
    "https://api.mihoraya.com/v1/events?type=appointment.created",
    headers={"Authorization": f"Bearer {os.environ['MIHORAYA_API_KEY']}"},
    timeout=30,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)
PHP (cURL)
PHP
<?php
$ch = curl_init('https://api.mihoraya.com/v1/events?type=appointment.created');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('MIHORAYA_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
    throw new RuntimeException($data['error']['code'] . ': ' . $data['error']['message']);
}
print_r($data);

Respuestas

  • 200 OK · Página de eventos.
  • 400 Petición inválida · Parámetros inválidos (parameter_invalid, parameter_missing, parameter_unknown, invalid_body, idempotency_key_required).
  • 401 No autenticado · API key ausente, inválida (invalid_api_key), revocada (api_key_revoked) o vencida (api_key_expired).
  • 402 Plan · El plan del negocio no incluye la API (feature_locked) o se alcanzó un límite del plan (limit_reached).
  • 403 Sin permiso · La API key no tiene el permiso necesario (insufficient_scope).
  • 429 Demasiadas llamadas · Se superó el límite por minuto (rate_limited) o la cuota mensual del plan (quota_exceeded).

Obtener un evento

GET/v1/events/{id}

Permiso: webhooks:read

Parámetros

NombreEnTipoDescripción
id obligatoriorutainteger

Ejemplo

curl
curl https://api.mihoraya.com/v1/events/1200 \
  -H "Authorization: Bearer $MIHORAYA_API_KEY"
JavaScript (Node.js 18+)
JavaScript (Node.js)
const res = await fetch("https://api.mihoraya.com/v1/events/1200", {
  headers: {
    Authorization: `Bearer ${process.env.MIHORAYA_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (${data.error.request_id})`);
console.log(data);
Python (requests)
Python
import os
import requests

res = requests.get(
    "https://api.mihoraya.com/v1/events/1200",
    headers={"Authorization": f"Bearer {os.environ['MIHORAYA_API_KEY']}"},
    timeout=30,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)
PHP (cURL)
PHP
<?php
$ch = curl_init('https://api.mihoraya.com/v1/events/1200');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('MIHORAYA_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
    throw new RuntimeException($data['error']['code'] . ': ' . $data['error']['message']);
}
print_r($data);

Respuesta de ejemplo (200)

JSON
{
  "id": 1200,
  "object": "event",
  "type": "appointment.rescheduled",
  "api_version": "2026-11-24",
  "created_at": "2026-11-24T15:30:00-03:00",
  "livemode": true,
  "data": {
    "object": {
      "id": 987,
      "object": "appointment",
      "status": "scheduled",
      "starts_at": "2026-12-02T16:00:00-03:00",
      "ends_at": "2026-12-02T17:00:00-03:00",
      "duration_minutes": 60,
      "time_zone": "America/Santiago",
      "service_id": 15,
      "professional_id": 21,
      "location_id": 7,
      "client_id": 3301,
      "price": {
        "amount": 15000,
        "currency": "CLP"
      },
      "notes": "Reservado desde el sitio web",
      "source": "api",
      "confirmed_at": null,
      "attended_at": null,
      "no_show_at": null,
      "cancellation": null,
      "created_at": "2026-11-24T12:00:00-03:00",
      "updated_at": "2026-11-24T15:30:00-03:00",
      "livemode": true
    },
    "previous_attributes": {
      "starts_at": "2026-12-01T10:00:00-03:00"
    }
  }
}

Respuestas

  • 200 OK · El evento.
  • 401 No autenticado · API key ausente, inválida (invalid_api_key), revocada (api_key_revoked) o vencida (api_key_expired).
  • 402 Plan · El plan del negocio no incluye la API (feature_locked) o se alcanzó un límite del plan (limit_reached).
  • 403 Sin permiso · La API key no tiene el permiso necesario (insufficient_scope).
  • 404 No encontrado · El recurso no existe o es de otro negocio (resource_not_found).
  • 429 Demasiadas llamadas · Se superó el límite por minuto (rate_limited) o la cuota mensual del plan (quota_exceeded).

Listar endpoints de webhook

GET/v1/webhook_endpoints

Permiso: webhooks:read

Ejemplo

curl
curl https://api.mihoraya.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $MIHORAYA_API_KEY"
JavaScript (Node.js 18+)
JavaScript (Node.js)
const res = await fetch("https://api.mihoraya.com/v1/webhook_endpoints", {
  headers: {
    Authorization: `Bearer ${process.env.MIHORAYA_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (${data.error.request_id})`);
console.log(data);
Python (requests)
Python
import os
import requests

res = requests.get(
    "https://api.mihoraya.com/v1/webhook_endpoints",
    headers={"Authorization": f"Bearer {os.environ['MIHORAYA_API_KEY']}"},
    timeout=30,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)
PHP (cURL)
PHP
<?php
$ch = curl_init('https://api.mihoraya.com/v1/webhook_endpoints');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('MIHORAYA_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
    throw new RuntimeException($data['error']['code'] . ': ' . $data['error']['message']);
}
print_r($data);

Respuestas

  • 200 OK · Todos los endpoints del negocio (máximo 10).
  • 401 No autenticado · API key ausente, inválida (invalid_api_key), revocada (api_key_revoked) o vencida (api_key_expired).
  • 402 Plan · El plan del negocio no incluye la API (feature_locked) o se alcanzó un límite del plan (limit_reached).
  • 403 Sin permiso · La API key no tiene el permiso necesario (insufficient_scope).
  • 429 Demasiadas llamadas · Se superó el límite por minuto (rate_limited) o la cuota mensual del plan (quota_exceeded).

Crear un endpoint de webhook

POST/v1/webhook_endpoints

Permiso: webhooks:write

Registra una URL https:// pública que recibirá los eventos elegidos (["*"] = todos). La respuesta incluye secret (whsec_…) para verificar la firma: guárdalo, no se vuelve a mostrar por la API. Para suscribirte a eventos de reservas la clave necesita appointments:read; a los de clientes, clients:read. No se aceptan direcciones privadas, locales ni reservadas.

Cuerpo (JSON)

CampoTipoDescripción
url obligatoriostring (uri)https:// pública
events obligatorioarray de string
descriptionstringMáx. 200 caracteres

Ejemplo

curl
curl -X POST https://api.mihoraya.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $MIHORAYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://crm.example.com/webhooks/mihoraya",
  "events": [
    "appointment.created",
    "appointment.cancelled",
    "appointment.rescheduled"
  ],
  "description": "CRM"
}'
JavaScript (Node.js 18+)
JavaScript (Node.js)
const res = await fetch("https://api.mihoraya.com/v1/webhook_endpoints", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MIHORAYA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://crm.example.com/webhooks/mihoraya",
    "events": [
      "appointment.created",
      "appointment.cancelled",
      "appointment.rescheduled"
    ],
    "description": "CRM"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (${data.error.request_id})`);
console.log(data);
Python (requests)
Python
import os
import requests

res = requests.post(
    "https://api.mihoraya.com/v1/webhook_endpoints",
    headers={"Authorization": f"Bearer {os.environ['MIHORAYA_API_KEY']}"},
    json={
        "url": "https://crm.example.com/webhooks/mihoraya",
        "events": ["appointment.created", "appointment.cancelled", "appointment.rescheduled"],
        "description": "CRM",
    },
    timeout=30,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)
PHP (cURL)
PHP
<?php
$ch = curl_init('https://api.mihoraya.com/v1/webhook_endpoints');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('MIHORAYA_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'url' => 'https://crm.example.com/webhooks/mihoraya',
        'events' => ['appointment.created', 'appointment.cancelled', 'appointment.rescheduled'],
        'description' => 'CRM',
    ]),
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
    throw new RuntimeException($data['error']['code'] . ': ' . $data['error']['message']);
}
print_r($data);

Respuesta de ejemplo (201)

JSON
{
  "id": 5,
  "object": "webhook_endpoint",
  "url": "https://crm.example.com/webhooks/mihoraya",
  "description": "CRM",
  "events": [
    "appointment.created",
    "appointment.cancelled",
    "appointment.rescheduled"
  ],
  "status": "enabled",
  "disabled_reason": "",
  "consecutive_failures": 0,
  "last_success_at": null,
  "last_failure_at": null,
  "created_at": "2026-11-24T12:00:00-03:00",
  "updated_at": "2026-11-24T12:00:00-03:00",
  "secret": "whsec_3kT9pQ2xV7mN1bL8cR4sY6dF0gH5jK2a",
  "livemode": true
}

Respuestas

  • 201 Creado · Endpoint creado (con su secreto).
  • 400 Petición inválida · Parámetros inválidos (parameter_invalid, parameter_missing, parameter_unknown, invalid_body, idempotency_key_required).
  • 401 No autenticado · API key ausente, inválida (invalid_api_key), revocada (api_key_revoked) o vencida (api_key_expired).
  • 402 Plan · El plan del negocio no incluye la API (feature_locked) o se alcanzó un límite del plan (limit_reached).
  • 403 Sin permiso · La API key no tiene el permiso necesario (insufficient_scope).
  • 409 Conflicto · Conflicto con el estado actual (slot_unavailable, appointment_cancelled, client_exists, idempotency_in_progress, conflict).
  • 429 Demasiadas llamadas · Se superó el límite por minuto (rate_limited) o la cuota mensual del plan (quota_exceeded).

Obtener un endpoint de webhook

GET/v1/webhook_endpoints/{id}

Permiso: webhooks:read

Parámetros

NombreEnTipoDescripción
id obligatoriorutainteger

Ejemplo

curl
curl https://api.mihoraya.com/v1/webhook_endpoints/5 \
  -H "Authorization: Bearer $MIHORAYA_API_KEY"
JavaScript (Node.js 18+)
JavaScript (Node.js)
const res = await fetch("https://api.mihoraya.com/v1/webhook_endpoints/5", {
  headers: {
    Authorization: `Bearer ${process.env.MIHORAYA_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (${data.error.request_id})`);
console.log(data);
Python (requests)
Python
import os
import requests

res = requests.get(
    "https://api.mihoraya.com/v1/webhook_endpoints/5",
    headers={"Authorization": f"Bearer {os.environ['MIHORAYA_API_KEY']}"},
    timeout=30,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)
PHP (cURL)
PHP
<?php
$ch = curl_init('https://api.mihoraya.com/v1/webhook_endpoints/5');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('MIHORAYA_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
    throw new RuntimeException($data['error']['code'] . ': ' . $data['error']['message']);
}
print_r($data);

Respuestas

  • 200 OK · El endpoint (sin el secreto).
  • 401 No autenticado · API key ausente, inválida (invalid_api_key), revocada (api_key_revoked) o vencida (api_key_expired).
  • 402 Plan · El plan del negocio no incluye la API (feature_locked) o se alcanzó un límite del plan (limit_reached).
  • 403 Sin permiso · La API key no tiene el permiso necesario (insufficient_scope).
  • 404 No encontrado · El recurso no existe o es de otro negocio (resource_not_found).
  • 429 Demasiadas llamadas · Se superó el límite por minuto (rate_limited) o la cuota mensual del plan (quota_exceeded).

Editar un endpoint de webhook

PATCH/v1/webhook_endpoints/{id}

Permiso: webhooks:write

Cambia URL, eventos, descripción o estado. status=enabled reactiva un endpoint desactivado (por ti o por fallos) y reinicia el contador de fallos.

Parámetros

NombreEnTipoDescripción
id obligatoriorutainteger

Cuerpo (JSON)

CampoTipoDescripción
urlstring (uri)
eventsarray de string
descriptionstringMáx. 200 caracteres
statusstringValores: enabled, disabled

Ejemplo

curl
curl -X PATCH https://api.mihoraya.com/v1/webhook_endpoints/5 \
  -H "Authorization: Bearer $MIHORAYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "enabled"
}'
JavaScript (Node.js 18+)
JavaScript (Node.js)
const res = await fetch("https://api.mihoraya.com/v1/webhook_endpoints/5", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.MIHORAYA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "status": "enabled"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (${data.error.request_id})`);
console.log(data);
Python (requests)
Python
import os
import requests

res = requests.patch(
    "https://api.mihoraya.com/v1/webhook_endpoints/5",
    headers={"Authorization": f"Bearer {os.environ['MIHORAYA_API_KEY']}"},
    json={
        "status": "enabled",
    },
    timeout=30,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)
PHP (cURL)
PHP
<?php
$ch = curl_init('https://api.mihoraya.com/v1/webhook_endpoints/5');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('MIHORAYA_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'status' => 'enabled',
    ]),
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
    throw new RuntimeException($data['error']['code'] . ': ' . $data['error']['message']);
}
print_r($data);

Respuestas

  • 200 OK · Endpoint actualizado.
  • 400 Petición inválida · Parámetros inválidos (parameter_invalid, parameter_missing, parameter_unknown, invalid_body, idempotency_key_required).
  • 401 No autenticado · API key ausente, inválida (invalid_api_key), revocada (api_key_revoked) o vencida (api_key_expired).
  • 402 Plan · El plan del negocio no incluye la API (feature_locked) o se alcanzó un límite del plan (limit_reached).
  • 403 Sin permiso · La API key no tiene el permiso necesario (insufficient_scope).
  • 404 No encontrado · El recurso no existe o es de otro negocio (resource_not_found).
  • 429 Demasiadas llamadas · Se superó el límite por minuto (rate_limited) o la cuota mensual del plan (quota_exceeded).

Eliminar un endpoint de webhook

DELETE/v1/webhook_endpoints/{id}

Permiso: webhooks:write

Parámetros

NombreEnTipoDescripción
id obligatoriorutainteger

Ejemplo

curl
curl -X DELETE https://api.mihoraya.com/v1/webhook_endpoints/5 \
  -H "Authorization: Bearer $MIHORAYA_API_KEY"
JavaScript (Node.js 18+)
JavaScript (Node.js)
const res = await fetch("https://api.mihoraya.com/v1/webhook_endpoints/5", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.MIHORAYA_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (${data.error.request_id})`);
console.log(data);
Python (requests)
Python
import os
import requests

res = requests.delete(
    "https://api.mihoraya.com/v1/webhook_endpoints/5",
    headers={"Authorization": f"Bearer {os.environ['MIHORAYA_API_KEY']}"},
    timeout=30,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)
PHP (cURL)
PHP
<?php
$ch = curl_init('https://api.mihoraya.com/v1/webhook_endpoints/5');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('MIHORAYA_API_KEY'),
    ],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
    throw new RuntimeException($data['error']['code'] . ': ' . $data['error']['message']);
}
print_r($data);

Respuesta de ejemplo (200)

JSON
{
  "id": 5,
  "object": "webhook_endpoint",
  "deleted": true,
  "livemode": true
}

Respuestas

  • 200 OK · Eliminado.
  • 401 No autenticado · API key ausente, inválida (invalid_api_key), revocada (api_key_revoked) o vencida (api_key_expired).
  • 402 Plan · El plan del negocio no incluye la API (feature_locked) o se alcanzó un límite del plan (limit_reached).
  • 403 Sin permiso · La API key no tiene el permiso necesario (insufficient_scope).
  • 404 No encontrado · El recurso no existe o es de otro negocio (resource_not_found).
  • 429 Demasiadas llamadas · Se superó el límite por minuto (rate_limited) o la cuota mensual del plan (quota_exceeded).

Enviar un evento de prueba

POST/v1/webhook_endpoints/{id}/test

Permiso: webhooks:write

Envía al endpoint, en el acto, un evento de prueba firmado (livemode: false): ping por defecto o un ejemplo ficticio del tipo pedido. Devuelve el resultado de la entrega. Máximo 10 pruebas por minuto.

Parámetros

NombreEnTipoDescripción
id obligatoriorutainteger

Cuerpo (JSON) · opcional

CampoTipoDescripción
typestringping o un tipo de evento.
Por defecto: "ping"

Ejemplo

curl
curl -X POST https://api.mihoraya.com/v1/webhook_endpoints/5/test \
  -H "Authorization: Bearer $MIHORAYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "appointment.created"
}'
JavaScript (Node.js 18+)
JavaScript (Node.js)
const res = await fetch("https://api.mihoraya.com/v1/webhook_endpoints/5/test", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MIHORAYA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "type": "appointment.created"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message} (${data.error.request_id})`);
console.log(data);
Python (requests)
Python
import os
import requests

res = requests.post(
    "https://api.mihoraya.com/v1/webhook_endpoints/5/test",
    headers={"Authorization": f"Bearer {os.environ['MIHORAYA_API_KEY']}"},
    json={
        "type": "appointment.created",
    },
    timeout=30,
)
data = res.json()
if not res.ok:
    raise RuntimeError(f"{data['error']['code']}: {data['error']['message']}")
print(data)
PHP (cURL)
PHP
<?php
$ch = curl_init('https://api.mihoraya.com/v1/webhook_endpoints/5/test');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('MIHORAYA_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'type' => 'appointment.created',
    ]),
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($status >= 400) {
    throw new RuntimeException($data['error']['code'] . ': ' . $data['error']['message']);
}
print_r($data);

Respuesta de ejemplo (200)

JSON
{
  "id": 77,
  "object": "webhook_delivery",
  "endpoint_id": 5,
  "event_id": 1201,
  "event_type": "ping",
  "status": "succeeded",
  "attempts": 1,
  "response_status": 200,
  "response_body": "ok",
  "error": "",
  "duration_ms": 182,
  "created_at": "2026-11-24T12:01:00-03:00",
  "last_attempt_at": "2026-11-24T12:01:00-03:00",
  "next_attempt_at": null,
  "delivered_at": "2026-11-24T12:01:00-03:00"
}

Respuestas

  • 200 OK · Resultado de la entrega de prueba.
  • 400 Petición inválida · Parámetros inválidos (parameter_invalid, parameter_missing, parameter_unknown, invalid_body, idempotency_key_required).
  • 401 No autenticado · API key ausente, inválida (invalid_api_key), revocada (api_key_revoked) o vencida (api_key_expired).
  • 402 Plan · El plan del negocio no incluye la API (feature_locked) o se alcanzó un límite del plan (limit_reached).
  • 403 Sin permiso · La API key no tiene el permiso necesario (insufficient_scope).
  • 404 No encontrado · El recurso no existe o es de otro negocio (resource_not_found).
  • 429 Demasiadas llamadas · Se superó el límite por minuto (rate_limited) o la cuota mensual del plan (quota_exceeded).

Objetos

El objeto Event

CampoTipoDescripción
idintegerÚsalo para no procesar dos veces el mismo evento.
objectstringSiempre event
typestringTipo de evento (o ping en las pruebas).
api_versionstring
created_atstring (date-time)
livemodebooleanfalse en los eventos de prueba.
dataobject
data.objectobjectEl recurso tal como quedó (Appointment o Client).
data.previous_attributesobjectValores anteriores (en appointment.rescheduled).

El objeto WebhookEndpoint

CampoTipoDescripción
idinteger
objectstringSiempre webhook_endpoint
urlstring (uri)
descriptionstring
eventsarray de string
statusstringValores: enabled, disabled
disabled_reasonstringValores: "", manual, failures
consecutive_failuresinteger
last_success_atstring | null (date-time)
last_failure_atstring | null (date-time)
created_atstring (date-time)
updated_atstring (date-time)
secretstringSolo al crear. Clave para verificar MiHoraYa-Signature.
livemodeboolean

El objeto WebhookDelivery

CampoTipoDescripción
idinteger
objectstringSiempre webhook_delivery
endpoint_idinteger
event_idinteger
event_typestring
statusstringValores: pending, succeeded, failed
attemptsinteger
response_statusinteger | null
response_bodystringPrimeros 1.024 bytes de la respuesta.
errorstring
duration_msinteger | null
created_atstring (date-time)
last_attempt_atstring | null (date-time)
next_attempt_atstring | null (date-time)
delivered_atstring | null (date-time)