Saltar al contenido principal
Upload Document
curl --request POST \
  --url https://api.spherepay.co/v2/document \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form targetId=customer_66c4168d418a410eae282b83883bdc39 \
  --form target=customer \
  --form documentType=passport \
  --form country=USA \
  --form side=front \
  --form 'description=Passport photo page' \
  --form 'file=(binary)' \
  --form 0.file='@example-file' \
  --form 1.file='@example-file' \
  --form 2.file='@example-file' \
  --form 3.file='@example-file' \
  --form 4.file='@example-file'
{
  "targetId": "customer_66c4168d418a410eae282b83883bdc39",
  "target": "customer",
  "documentType": "passport",
  "country": "USA",
  "side": "front",
  "description": "Passport photo page",
  "fileName": "passport_front_20250101.pdf",
  "fileSize": 2048576,
  "mimeType": "application/pdf",
  "createdAt": "2025-12-31T10:30:00.000Z"
}
Sube un documento de identidad para un cliente o representante empresarial como parte del proceso de verificación KYC o KYB. Los documentos se envían como datos de formulario multipart. Los formatos de archivo aceptados son PDF, JPEG, PNG, HEIC y TIFF, con un tamaño máximo de archivo de 15 MB. Los campos target y documentType determinan cómo SpherePay enruta y procesa la carga — los clientes individuales, los clientes empresariales y los representantes empresariales tienen cada uno su propio conjunto de tipos de documentos aceptados.
Los documentos para clientes individuales se suben con target: "customer". Los documentos para representantes empresariales (UBOs) usan target: "business_representative" y el targetId debe ser el ID del representante, no el del cliente.

Autorizaciones

Authorization
string
header
requerido

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

Cuerpo

multipart/form-data

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

targetId
string
requerido

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

Minimum string length: 1
Ejemplo:

"customer_66c4168d418a410eae282b83883bdc39"

file
file
requerido

The document file to upload. Accepted formats: PDF, JPEG, PNG, HEIC, TIFF. Maximum file size: 15MB

country
string
requerido

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

Ejemplo:

"USA"

target
enum<string>
requerido

The target entity for which the document is being uploaded

Opciones disponibles:
customer
Ejemplo:

"customer"

documentType
enum<string>
requerido

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

Opciones disponibles:
drivers,
id_card,
passport,
residence_permit
Ejemplo:

"passport"

description
string

Optional description or notes about the document

Ejemplo:

"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.

Opciones disponibles:
front,
back
Ejemplo:

"front"

Respuesta

Response for an ID document uploaded for an individual customer.

targetId
string
requerido

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

Ejemplo:

"customer_66c4168d418a410eae282b83883bdc39"

createdAt
string
requerido

The date and time the document was created

Ejemplo:

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

fileName
string
requerido

The name of the document file

Ejemplo:

"passport_front_20250101.pdf"

fileSize
number
requerido

The size of the document in bytes

Ejemplo:

2048576

mimeType
string
requerido

The MIME type of the document file

Ejemplo:

"application/pdf"

target
enum<string>
requerido

The target entity for which the document is being uploaded

Opciones disponibles:
customer
Ejemplo:

"customer"

documentType
enum<string>
requerido

The type of the document

Opciones disponibles:
drivers,
id_card,
passport,
residence_permit
Ejemplo:

"passport"

side
enum<string> | null
requerido

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

Opciones disponibles:
front,
back
Ejemplo:

"front"

description
string

The description of the document

Ejemplo:

"Passport photo page"

country
string

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

Ejemplo:

"USA"

Última modificación el 18 de junio de 2026