API Docs
Webhook Interceptor API
Aquí gestionas la API del producto. Incluye captura de webhooks, gestión de endpoints, privacidad, colaboración con share links y administración de tiers.
START HERE
Quickstart en 60 segundos
- Crea tu endpoint desde home con un ID único
- Envía un evento de prueba a http://localhost:3000/api/webhook/my-endpoint
- Abre el inspector en http://localhost:3000/webhook/my-endpoint
curl -X POST http://localhost:3000/api/webhook/my-endpoint \
-H "Content-Type: application/json" \
-d '{"event":"quickstart.test","ok":true}'POST | PUT | PATCH | DELETE
/api/webhook/{id}
Captura cualquier request entrante para inspección de payload.
Auth: no requerida. Si es private endpoint, exige `x-webhook-key`.
curl -X POST http://localhost:3000/api/webhook/my-endpoint \
-H "Content-Type: application/json" \
-d '{"event":"order.created"}'{ "success": true, "webhookId": "uuid" }GET
/api/webhook/{id}?_dashboard=1
Devuelve historial del endpoint para UI/dashboard.
Auth: requerida para private endpoint (owner o colaborador aprobado).
curl "http://localhost:3000/api/webhook/my-endpoint?_dashboard=1"
POST
/api/webhook/register
Registra un webhook ID para un usuario autenticado.
Auth: requerida. Respeta límites del tier y ownership.
{ "webhookId": "my-endpoint" }{ "success": true }POST
/api/webhook/register-guest
Registra endpoint para guest mode y emite `guest_id` firmado.
Auth: no requerida. Límite free aplicado por cookie firmada.
{ "webhookId": "guest-endpoint" }GET
/api/account
Resumen de tier, policy y uso (endpoints + requests mensuales).
Auth: opcional. Si no hay sesión, retorna contexto guest/free.
GET
/api/account/endpoints
Lista endpoints del owner con privacidad y metadata.
Auth: requerida.
PATCH
/api/account/endpoints/{id}/privacy
Activa o desactiva endpoint privado y devuelve `accessKey` cuando aplica.
Auth: requerida. Private endpoint disponible desde STARTER.
{ "isPrivate": true }{ "success": true, "isPrivate": true, "accessKey": "hex" }GET / DELETE
/api/account/endpoints/{id}/access
Consulta colaboradores con acceso y revoca por `userId`.
Auth: requerida. Solo owner.
{ "userId": "supabase-user-id" }GET
/api/account/access-requests
Inbox de solicitudes pendientes para endpoints del owner.
Auth: requerida.
PATCH
/api/account/access-requests/{requestId}
Aprueba o rechaza solicitud de acceso (`approve` | `reject`).
Auth: requerida. Solo owner del endpoint.
{ "action": "approve" }Errores estándar
| Status | Cuándo ocurre | Ejemplo |
|---|---|---|
| 400 | Body inválido o falta campo requerido | { "error": "webhookId is required" } |
| 401 | Usuario no autenticado en rutas protegidas | { "error": "Unauthorized" } |
| 402 | Límite del tier o feature no disponible | { "error": "Private endpoints are available from STARTER tier" } |
| 403 | Sin permisos sobre recurso del owner | { "error": "Forbidden" } |
| 404 | Recurso no encontrado | { "error": "Endpoint not found" } |
| 409 | Conflicto de ownership o webhook ID en uso | { "error": "This webhook ID is already owned by another user" } |
| 410 | Share link expirado | { "error": "Share link expired" } |
Snippets de integración
Node.js (fetch)
await fetch("http://localhost:3000/api/webhook/my-endpoint", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ event: "invoice.paid", amount: 42 }),
});Python (requests)
import requests
requests.post(
"http://localhost:3000/api/webhook/my-endpoint",
json={"event": "invoice.paid", "amount": 42},
timeout=10,
)