Home
Home
  1. Public documents API
  • 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)
          GET
        • Upload document (public)
          POST
        • Get document (public)
          GET
        • Delete document (public)
          DELETE
        • Download document file (public)
          GET
        • Rerun validations (public)
          PUT
      • List documents
        GET
      • Upload document
        POST
      • Get document
        GET
      • Delete document
        DELETE
      • Download document file
        GET
      • Rerun validations
        PUT
    • 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. Public documents API

Upload document (public)

Production
https://api.niva.co/v1
Production
https://api.niva.co/v1
POST
https://api.niva.co/v1
/public/submissions/{submission_token}/documents
Uploads a document from the browser, e.g. from your own upload UI. Send your public API key in the apiKey header and the submission's token in the path; see Public Documents API. Otherwise this endpoint behaves exactly like its private counterpart.
Identify the document with country_code, document_type and document_subtype (pairs per market under Supported document types; the subtype may be omitted for photo_identification and address_proof). Send exactly one of file or files (PDF, JPG or PNG, 100 MB in total). Niva validates the document before responding; see Upload document for the validation rules, custom validation inputs, the timeout behaviour and the 422 messages.
TIP
Send only the fields you need: a blank field counts as sent.

Request

Authorization
Add parameter in header
apiKey
Example:
apiKey: ********************
Path Params

Header Params

Body Params multipart/form-data

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.niva.co/v1/public/submissions/YOUR_SUBMISSION_TOKEN/documents' \
--header 'Accept-Language: en' \
--header 'apiKey: <api-key>' \
--form 'document_type="formation"' \
--form 'document_subtype="acta_constitutiva"' \
--form 'country_code="mx"' \
--form 'file=@"acta_constitutiva.pdf"'

Responses

🟢201Created
application/json
Success
Bodyapplication/json

Examples
{
  "id": "doc_MAXm5v0B7kZVHorQL8YjV2y9",
  "submission_id": "sub_3ZMd9KJnvAdYt4mOyW7YQRAp",
  "validation_status": "valid",
  "country_code": "mx",
  "document_type": "formation",
  "document_subtype": "acta_constitutiva",
  "uploaded_at": "2026-10-23T21:31:32.588Z",
  "validation_errors": [],
  "source": "user",
  "external_id": "acta-001",
  "document_name": null,
  "file": {
    "name": "acta_constitutiva.pdf",
    "byte_size": 482113
  },
  "data": {
    "business": {
      "entity_type": null,
      "legal_name": "Nueva Vista Alimentos S.A. de C.V.",
      "previous_legal_names": [],
      "merged_company_legal_names": [],
      "incorporation_date": null
    },
    "document": {
      "document_type": "acta_constitutiva",
      "date_of_deed": "2012-04-09",
      "boleta": {
        "is_present": true,
        "entry_number": "N-2012012345"
      }
    },
    "officers": null
  },
  "parent_document_id": null,
  "merged_documents": []
}
🟠401Unauthorized
🟠404Not Found
🟠422Unprocessable Content
🔴500Internal Server Error
Previous
List documents (public)
Next
Get document (public)