Home
Home
  1. Embeddable widgets
  • 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. Embeddable widgets

Overview

Niva's embeddable document upload widget collects files directly from your users and displays upload and validation results. Use it inside your own onboarding flow, with your own document labels and instructions.
For a custom upload interface, use the Public Documents API.

1. Load the widget#

Load the script directly from Niva in your page:
Use this production script with production credentials and submissions. Contact Niva about testing in another environment.

2. Create a submission on your server#

Call Create new submission from your backend using a private API key. Keep the returned id, and pass its token to your frontend for the applicant who owns that submission.
The submission token expires 24 hours after issue. Your backend can call Get submission for a fresh one.

3. Use a public API key in the browser#

Create a public API key in Settings › API Keys. The widget needs both that key (ntpub_…) and the submission token.
NOTE
Keep private API keys (nt_…) on your server. A public API key and a submission token serve different purposes; neither replaces the other. See Authentication.

4. Add an upload field#

This example collects an incorporation deed for a Mexican submission:
Replace the credentials and choose the correct document configuration for the submission's market. Widget attribute names and Mexican document identifiers differ from HTTP API field names. See Document upload widget for the complete configuration, events, form validation, and examples for other markets.
The widget uploads documents; your backend still needs to call Run business verification when collection is complete.
Previous
Webhooks
Next
Document upload widget