Skip to main content
Upload Document
Upload an identity document for a customer or business representative as part of the KYC or KYB verification process. Documents are submitted as multipart form data. Accepted file formats are PDF, JPEG, and PNG, validated by file signature rather than extension. Maximum file size is 10 MB per file, or 8 MB for identity documents (passport, drivers, id_card, residence_permit, br_digital_drivers, br_digital_id). The target and documentType fields determine how SpherePay routes and processes the upload — individual customers, business customers, and business representatives each have their own set of accepted document types.
Documents for individual customers are uploaded with target: "customer". Documents for business representatives (UBOs) use target: "business_representative" and the targetId must be the representative’s ID, not the customer’s.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data

Upload identity documents for individual customers. Requires country of issuance and optionally the document side (front/back).

country
string
required

The ISO3166-1 Alpha-3 country code associated with the document (e.g., USA, GBR, FRA). See Country Codes.

Example:

"USA"

documentType
enum<string>
required

ID documents for individual customers. See Document Guideline for requirements.

Available options:
passport,
drivers,
id_card,
residence_permit,
br_digital_drivers,
br_digital_id
Example:

"passport"

file
file
required

The document file to upload. Accepted formats: PDF, JPEG, PNG. Maximum file size: 8MB. Minimum file size: 10KB.

target
enum<string>
required

The target entity for which the document is being uploaded

Available options:
customer
Example:

"customer"

targetId
string
required

The unique identifier of the target entity for which the document is being uploaded

Minimum string length: 1
Example:

"customer_66c4168d418a410eae282b83883bdc39"

description
string

Optional description or notes about the document

Example:

"Front side of driver's license"

side
enum<string>

The side of the document if it has multiple sides (e.g., front, back). Leave undefined for single-sided documents.

Available options:
front,
back
Example:

"front"

Response

Response for an ID document uploaded for an individual customer.

country
string
required

The ISO3166-1 Alpha-3 country code associated with the document (e.g., USA, GBR, FRA)

Example:

"USA"

createdAt
string
required

The date and time the document was created

Example:

"2025-12-31T10:30:00.000Z"

description
string
required

The description of the document

Example:

"Passport photo page"

documentType
enum<string>
required

The type of the document

Available options:
drivers,
passport,
id_card,
residence_permit,
br_digital_drivers,
br_digital_id
Example:

"passport"

fileName
string
required

The name of the document file

Example:

"passport_front_20250101.pdf"

fileSize
number
required

The size of the document in bytes

Example:

2048576

id
string
required

The unique identifier of the document

Example:

"documentFile_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"

mimeType
string
required

The MIME type of the document file

Example:

"application/pdf"

side
enum<string>
required

The side of the document if it has multiple sides (e.g., front, back). Leave undefined for single-sided documents.

Available options:
front,
back
Example:

"front"

target
enum<string>
required

The target entity for which the document is being uploaded

Available options:
customer
Example:

"customer"

targetId
string
required

The unique identifier of the target entity for which the document is being uploaded

Example:

"customer_66c4168d418a410eae282b83883bdc39"

Last modified on August 19, 2026