We use cookies to improve your experience and analyze site traffic. By clicking “Accept”, you agree to our use of cookies.

Learn more about our privacy practices
Corvo
Português

Webhooks

Register webhook configurations and inspect deliveries.

Permissions: webhooks.view for fetches; webhooks.manage for registration, deletion, test and retry.

GET/v1/webhooks200 OK
full_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
  }
}
POST/v1/webhooks201 Created
full_access

Registers a webhook configuration.

FieldTypeRequiredDescription
urlstring✓Must use HTTP or HTTPS and must not point to private/loopback/link-local hosts.
eventsstring[]✓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.authorized
  • nfse.invoice.rejected
  • nfse.invoice.failed
  • nfse.invoice.reconciliation_required
  • nfse.invoice.manual_review
  • nfse.invoice.documents_ready
  • nfse.invoice.email_sent
  • nfse.invoice.email_failed
  • nfse.invoice.fiscal_discrepancy
  • nfse.invoice.cancelled
  • nfse.invoice.cancellation_rejected
DELETE/v1/webhooks/:id200 OK
full_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
  }
}
POST/v1/webhooks/:id/test200 OK
full_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
  }
}
GET/v1/webhooks/deliveries200 OK
full_accessinvoices_read_write

Lists webhook deliveries, newest first.

FieldTypeRequiredDescription
hoursnumberWindow in hours (default 24); it stays fixed on following pages.
limitintegerDefaults to 50; accepts integers from 1 to 1000 (an invalid value returns 400).
cursorstringnextCursor from the previous page, keeping the same filters.
environmentstringtest 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"
  }
}
GET/v1/webhooks/deliveries/stats200 OK
full_accessinvoices_read_write

Fetches delivery statistics for the recent window.

FieldTypeRequiredDescription
hoursnumberDefaults to 24.
environmentstringtest 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
  }
}
POST/v1/webhooks/deliveries/:id/retry200 OK
full_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
  }
}