Onboarding
Upload Document
Uploads a document for a customer.
AuthorizationBearer <token>
JWT Bearer token authentication
In: header
targetstring
The category of the document being uploaded.
Default
"customer"Value in
"customer"targetIdstring
The id of the target of which the document is being uploaded to.
Match
^{customer|application|payout}_[a-z0-9]+$documentTypestring
The type of the document being uploaded.
Value in
"passport" | "id_card" | "drivers_license" | "residence_permit"description?string
The description of the document being uploaded.
filestring
The file of the document being uploaded.
side?string
The side of the document being uploaded.
Value in
"front" | "back"countrystring
The country of the document being uploaded.
Format
ISO-3166Length
length <= 3Response Body
curl -X POST "https://api.sandbox.spherepay.co/v2/document" \
-F target="customer" \
-F targetId="customer_287ds89789ds79cx7979797" \
-F documentType="passport" \
-F side="front" \
-F country="USA" \
-F file="binary_file_data" \
-F description="Passport for identity verification"{
"target": "customer",
"targetId": "customer_287ds89789ds79cx7979797",
"documentType": "passport",
"description": "Passport for identity verification",
"fileName": "passport_john_doe.jpg",
"fileSize": 2048576,
"mimeType": "image/jpeg",
"createdAt": "2025-05-23T11:45:00Z"
}{
"ts": "2025-04-20T00:09:16.870Z",
"error": {
"information": [
"Required"
]
}
}{
"ts": "2025-04-20T00:09:16.870Z",
"error": {
"general": "{{information}} Not Found"
}
}