Webhook management
One webhook endpoint per user (not per API key). See Webhooks for the event list, retry policy, and signature format.
GET /v1/webhook
Section titled “GET /v1/webhook”curl https://sandbox-api.nuez.app/v1/webhook \ -H "Authorization: Bearer <jwt>"{ "webhook": { "id": "...", "url": "https://example.com/webhooks/nuez", "active": true, "created_at": "...", "updated_at": "..." } }Returns {"webhook": null} (still 200) if none is configured.
PUT /v1/webhook
Section titled “PUT /v1/webhook”Creates or replaces the user’s webhook. secret is not generated by nuez — you choose it.
curl -X PUT https://sandbox-api.nuez.app/v1/webhook \ -H "Authorization: Bearer <jwt>" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com/webhooks/nuez", "secret": "at-least-16-characters-long"}'{ "webhook": { "id": "...", "url": "https://example.com/webhooks/nuez", "active": true, "created_at": "...", "updated_at": "..." } }Errors
Section titled “Errors”| Status | Code | Meaning |
|---|---|---|
400 | MISSING_URL | url empty |
400 | INVALID_URL | Not a valid http/https URL |
400 | SECRET_TOO_SHORT | secret under 16 characters |
DELETE /v1/webhook
Section titled “DELETE /v1/webhook”curl -X DELETE https://sandbox-api.nuez.app/v1/webhook \ -H "Authorization: Bearer <jwt>"Returns 204 No Content.
GET /v1/webhook/deliveries
Section titled “GET /v1/webhook/deliveries”Returns up to the 50 most recent delivery attempts, including failures.
curl https://sandbox-api.nuez.app/v1/webhook/deliveries \ -H "Authorization: Bearer <jwt>"{ "deliveries": [ { "id": "...", "event_type": "payout.submitted", "status": "delivered", "attempt_count": 1, "created_at": "..." }, { "id": "...", "event_type": "payout.approved", "status": "failed", "attempt_count": 3, "created_at": "..." } ]}