Webhooks
Register webhook configurations and inspect deliveries.
Permissions: webhooks.view for fetches; webhooks.manage for registration, deletion, test and retry.
/v1/webhooks200 OKfull_accessinvoices_read_write
Lists the webhook configurations of the account.
curl "$BASE_URL/webhooks" -H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{
"data": [
{
"id": "7b8c9d0e-1f2a-4b3c-8d5e-6f7a8b9c0d1e",
"url": "https://integracao.example.com/webhooks/corvo",
"events": [
"nfse.invoice.authorized"
],
"active": true,
"createdAt": "2026-10-10T12:00:00.000Z",
"updatedAt": "2026-10-10T12:00:00.000Z"
}
],
"pagination": {
"limit": 50,
"hasMore": false,
"nextCursor": null
}
}/v1/webhooks201 Createdfull_access
Registers a webhook configuration.
| Field | Type | Required | Description |
|---|---|---|---|
| url | string | ✓ | Must use HTTP or HTTPS and must not point to private/loopback/link-local hosts. |
| events | string[] | ✓ | Non-empty array containing only accepted public events (list below). |
curl -X POST "$BASE_URL/webhooks" \
-H "X-API-Key: $CORVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://integracao.example.com/webhooks/corvo",
"events": [
"nfse.invoice.authorized",
"nfse.invoice.documents_ready",
"nfse.invoice.email_sent",
"nfse.invoice.email_failed"
]
}'Response — 201 Created
{
"data": {
"id": "7b8c9d0e-1f2a-4b3c-8d5e-6f7a8b9c0d1e",
"url": "https://integracao.example.com/webhooks/corvo",
"events": [
"nfse.invoice.authorized"
],
"active": true,
"secret": "whsec_...",
"createdAt": "2026-10-10T12:00:00.000Z",
"updatedAt": "2026-10-10T12:00:00.000Z"
}
}Subscribed events
nfse.invoice.authorizednfse.invoice.rejectednfse.invoice.failednfse.invoice.reconciliation_requirednfse.invoice.manual_reviewnfse.invoice.documents_readynfse.invoice.email_sentnfse.invoice.email_failednfse.invoice.fiscal_discrepancynfse.invoice.cancellednfse.invoice.cancellation_rejected
/v1/webhooks/:id200 OKfull_access
Deletes a webhook configuration.
curl -X DELETE "$BASE_URL/webhooks/$WEBHOOK_ID" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{
"data": {
"deleted": true
}
}/v1/webhooks/:id/test200 OKfull_access
Sends a webhook.test event — always with environment test — to the registered URL.
curl -X POST "$BASE_URL/webhooks/$WEBHOOK_ID/test" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{
"data": {
"sent": true
}
}/v1/webhooks/deliveries200 OKfull_accessinvoices_read_write
Lists webhook deliveries, newest first.
| Field | Type | Required | Description |
|---|---|---|---|
| hours | number | Window in hours (default 24); it stays fixed on following pages. | |
| limit | integer | Defaults to 50; accepts integers from 1 to 1000 (an invalid value returns 400). | |
| cursor | string | nextCursor from the previous page, keeping the same filters. | |
| environment | string | test or live. |
curl "$BASE_URL/webhooks/deliveries?hours=24&limit=50" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{
"data": [
{
"id": "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"webhookConfigId": "7b8c9d0e-1f2a-4b3c-8d5e-6f7a8b9c0d1e",
"eventType": "nfse.invoice.authorized",
"environment": "test",
"url": "https://integracao.example.com/webhooks/corvo",
"statusCode": 200,
"status": "sent",
"durationMs": 120,
"retryCount": 0,
"createdAt": "2026-10-10T12:00:05.000Z"
}
],
"pagination": {
"limit": 50,
"hasMore": true,
"nextCursor": "eyJ2IjoxLCJjcmVhdGVkQXQiOiIyMDI2LTEwLTA5VDEyOjAwOjAwLjAwMDAwMFoiLCJpZCI6IjNmMWM4YTkwIn0"
}
}/v1/webhooks/deliveries/stats200 OKfull_accessinvoices_read_write
Fetches delivery statistics for the recent window.
| Field | Type | Required | Description |
|---|---|---|---|
| hours | number | Defaults to 24. | |
| environment | string | test or live. |
curl "$BASE_URL/webhooks/deliveries/stats?hours=24" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{
"data": {
"total": 10,
"sent": 7,
"failed": 1,
"pending": 1,
"delayed": 1
}
}/v1/webhooks/deliveries/:id/retry200 OKfull_access
Schedules a new delivery attempt for a failed delivery.
curl -X POST "$BASE_URL/webhooks/deliveries/$DELIVERY_ID/retry" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{
"data": {
"retried": true
}
}