Webhook endpoints
POST /v1/webhooksCreate an endpoint
POST /v1/webhooks with {"url": "https://...", "events": ["email.delivered"]} (omit events for all). Returns 201 including the signing secret (whsec_...), shown exactly once.
List endpoints
GET /v1/webhooks returns all endpoints with their subscriptions and disabled state (never the secret).
Disable an endpoint
DELETE /v1/webhooks/{id}. In-flight deliveries stop quietly; the delivery history is retained.
Delivery history
GET /v1/webhooks/{id}/deliveries returns the last 50 deliveries with their full attempt records:
{ "data": [ { "id": "...", "event_type": "email.delivered", "status": "delivered", "attempts": [ { "at": "...", "ok": true, "response_code": 200, "latency_ms": 184 } ], "delivered_at": "...", "created_at": "..." } ]}Replay a delivery
POST /v1/webhooks/deliveries/{id}/replay re-enqueues the same payload as a fresh delivery with a new attempt chain. Returns 201 with replay_of pointing at the original.