Home
Home
  1. Home
  • Getting started
  • Authentication
  • Webhooks
  • Embeddable widgets
    • Overview
    • Document upload widget
      • Designing an upload flow
  • Guides
    • Verifying a new business
    • Verifying bank accounts
    • Uploading documents
    • Country-specific fields
    • Supported document types
  • API reference
    • Submissions
      • Reports
        • List available report templates
        • Download a report
      • Create new submission
      • Get submission
      • Update submission
      • Update submission status
      • Run a submission pre-flight check
      • Run business verification
      • Get submission checks
      • Delete submission
      • List submissions
    • Documents
      • Public documents API
        • List documents (public)
        • Upload document (public)
        • Get document (public)
        • Delete document (public)
        • Download document file (public)
        • Rerun validations (public)
      • List documents
      • Upload document
      • Get document
      • Delete document
      • Download document file
      • Rerun validations
    • RPC search
      • RPC search
      • Get company with ID
      • Look up company by RFC
      • Search companies by name
      • Download RPC document
    • Utilities
      • Matcher
        • Run name matching
  1. Home

Webhooks

Niva sends an HTTP POST to your webhook endpoint when a submission or document changes. Configure your endpoint URL, event subscriptions, and signing secret in the Niva dashboard under Settings › Webhooks.
Events are available for submissions in Mexico (mx), Brazil (br), Chile (cl), and Colombia (co).

Webhook events#

submission.created: A submission is created.
submission.status_updated: Processing starts, or the status enters needs_review, pending_rfi, approved, or rejected.
document.created: A document is uploaded through the API, or a new merged corporate document is created. Ordinary widget uploads do not send this event.
document.validated: Instant document validation finishes. Read validation_status for the result; it can report a failed check.
document.deleted: A document is removed through the API or archived by Niva, including some failed uploads.
Submission events contain the summary returned by Create new submission. document.created contains the shape returned by Upload document; document.validated and document.deleted contain the shape returned by Get document.
For verification progress, listen for submission.status_updated and inspect payload.status. A processing event means processing started. A later needs_review, pending_rfi, approved, or rejected status tells you the next action to take. Use Get submission to retrieve the current full result.

Message body#

Each message contains id, event, timestamp, and payload. id is Niva's message ID (whm_…), and timestamp is its creation time in UTC. The message ID stays the same when that message is retried.
For example, this message reports that a submission is ready for review. The submission token is represented by a placeholder:
{
  "id": "whm_2b9XkQe7Lm",
  "event": "submission.status_updated",
  "timestamp": "2026-10-23T21:31:33Z",
  "payload": {
    "id": "sub_12345AbCdE",
    "token": "SUBMISSION_TOKEN",
    "country_code": "mx",
    "status": "needs_review",
    "business_type": "persona_moral",
    "legal_name": "Nueva Vista Alimentos S.A. de C.V.",
    "tax_id_number": "NVA120409XD2",
    "tax_id_label": "rfc",
    "created_at": "2026-10-23T21:31:32Z",
    "updated_at": "2026-10-23T21:31:33Z",
    "external_id": "nueva-vista-001",
    "policy_id": "pol_7mN2pQ8rXc4v",
    "dashboard_url": "https://app.niva.co/dashboard/submissions/sub_12345AbCdE/details"
  }
}

Verify signatures#

Niva uses Svix for webhook delivery. Use the endpoint's signing secret from Settings › Webhooks to verify the signature and timestamp before accepting a message. This secret is different from your API key.
Use the original request body, before parsing or changing it. The Svix verification library accepts both webhook-* and svix-* signature headers; pass the received headers through to the library. See Svix signature verification for supported languages and frameworks.
For Node.js, install svix, then verify the incoming request in your handler:
Do not parse and re-serialize JSON before verification. Return a failure response when verification fails; do not process an unverified message.

Acknowledge and retry safely#

Return a 2xx response promptly after you have safely accepted the message. Process longer work asynchronously. Non-2xx responses, redirects, and timeouts cause delivery failures and retries. Svix uses a backoff schedule; consult Svix's retry documentation and the delivery attempts shown in Settings › Webhooks.
Use the body id to ignore duplicate deliveries. Different messages can describe the same submission status, so your processing should also tolerate repeated state notifications. Fetch the current submission when you need its latest state rather than assuming webhook arrival order.
Inspect and replay failed messages in Settings › Webhooks.

Firewall configuration#

If your endpoint restricts incoming addresses, use the current Svix static source IP list for the delivery region configured for your account. Contact support@niva.co to confirm that region. Continue verifying signatures even when an IP allowlist is in place.
Previous
Authentication
Next
Overview