Pular para o conteúdo 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"
}
Envie um documento de identidade para um cliente ou representante empresarial como parte do processo de verificação KYC ou KYB. Os documentos são submetidos como dados de formulário multipart. Os formatos de arquivo aceitos são PDF, JPEG, PNG, HEIC e TIFF, com tamanho máximo de arquivo de 15 MB. Os campos target e documentType determinam como o SpherePay roteará e processará o envio — clientes individuais, clientes empresariais e representantes empresariais possuem seus próprios conjuntos de tipos de documentos aceitos.
Documentos para clientes individuais são enviados com target: "customer". Documentos para representantes empresariais (UBOs) usam target: "business_representative" e o targetId deve ser o ID do representante, não o do cliente.

Autorizações

Authorization
string
header
obrigatório

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

Corpo

multipart/form-data

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

targetId
string
obrigatório

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

Minimum string length: 1
Exemplo:

"customer_66c4168d418a410eae282b83883bdc39"

file
file
obrigatório

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

country
string
obrigatório

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

Exemplo:

"USA"

target
enum<string>
obrigatório

The target entity for which the document is being uploaded

Opções disponíveis:
customer
Exemplo:

"customer"

documentType
enum<string>
obrigatório

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

Opções disponíveis:
drivers,
id_card,
passport,
residence_permit
Exemplo:

"passport"

description
string

Optional description or notes about the document

Exemplo:

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

Opções disponíveis:
front,
back
Exemplo:

"front"

Resposta

Response for an ID document uploaded for an individual customer.

targetId
string
obrigatório

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

Exemplo:

"customer_66c4168d418a410eae282b83883bdc39"

createdAt
string
obrigatório

The date and time the document was created

Exemplo:

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

fileName
string
obrigatório

The name of the document file

Exemplo:

"passport_front_20250101.pdf"

fileSize
number
obrigatório

The size of the document in bytes

Exemplo:

2048576

mimeType
string
obrigatório

The MIME type of the document file

Exemplo:

"application/pdf"

target
enum<string>
obrigatório

The target entity for which the document is being uploaded

Opções disponíveis:
customer
Exemplo:

"customer"

documentType
enum<string>
obrigatório

The type of the document

Opções disponíveis:
drivers,
id_card,
passport,
residence_permit
Exemplo:

"passport"

side
enum<string> | null
obrigatório

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

Opções disponíveis:
front,
back
Exemplo:

"front"

description
string

The description of the document

Exemplo:

"Passport photo page"

country
string

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

Exemplo:

"USA"

Última modificação em 18 de junho de 2026