Endpoints
POST /webhooks (register)
Register a webhook endpoint and get a signing secret.
POST
/api/v1/webhookssecret keyRegister a webhook endpoint. The response includes a per-endpoint secret used to sign deliveries.
Body parameters
urlstringHTTPS endpoint que recibirá los deliveries. Si la omitís, autogeneramos una URL en nuestro dominio (managed inbox) y la respuesta incluye `managed: true`.eventsstring[]requiredLista de event names del catálogo (ver Webhooks & signing). `["*"]` se suscribe a todos.descriptionstringEtiqueta libre (≤240 chars) — visible en el dashboard para distinguir múltiples subscriptions.
Request
curl https://sandbox.key2pays.com/api/v1/webhooks \
-H "Authorization: Bearer sk_test_51N8mP...exampleK3Y" \
-H "Content-Type: application/json" \
-d '{ "url": "https://acme.com/webhooks/key2pay", "events": ["payment.completed"] }'Response
{
"id": "wh_2zP97…",
"url": "https://acme.com/webhooks/key2pay",
"events": ["payment.completed"],
"secret": "whsec_2zP97…",
"managed": false,
"active": true,
"createdAt": "2026-05-12T15:24:27.426Z"
}