Saltar al contenido
Krezkadev
POST/webhook_endpoints

Registrar un endpoint de webhook

Registra una URL HTTPS y los eventos que quieres recibir. El secret HMAC se devuelve solo en esta respuesta: guárdalo.

Cuerpo de la solicitud

urlstringrequerido
eventsstring[]requerido

Respuestas

  • 201Endpoint registrado. Guarda el secret: no se vuelve a mostrar.
  • 401API key ausente o inválida
  • 422Parámetros inválidos. code indica el campo o la regla SUNAT incumplida.
POST /webhook_endpoints
curl -X POST https://api.krezka.com/api/v1/invoicing/webhook_endpoints \
  -H "Authorization: Bearer $FALCONEXT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://tu-app.com/webhooks/krezka",
    "events": [
      "invoice.accepted",
      "invoice.rejected"
    ]
  }'
Respuesta · 201
JSON
{
  "id": "we_9Lm2Xq",
  "object": "webhook_endpoint",
  "url": "string",
  "events": [
    "invoice.sent"
  ],
  "secret": "whsec_…",
  "status": "enabled",
  "created_at": "2025-07-01T14:03:11Z"
}
Pruébalo
API de Facturación2026-11-01

Se guarda solo en tu navegador (localStorage). Nunca se incluye en el código copiable.

POSThttps://api.krezka.com/api/v1/invoicing/webhook_endpoints
curl -X POST https://api.krezka.com/api/v1/invoicing/webhook_endpoints \
  -H "Authorization: Bearer $FALCONEXT_API_KEY"
Respuesta

Envía una solicitud para ver la respuesta