Upload a document
Changed onUpload a verification document for a customer or beneficial owner. The request must use multipart/form-data with the file in the file field and metadata in the remaining fields.
Every upload requires file, documentType, country, and documentHolder. Identity documents require more fields:
| documentType | Also required | side |
|---|---|---|
| PASSPORT | documentNumber, issuingAuthority | Not allowed |
| DRIVERS_LICENSE | documentNumber, issuingAuthority | Required |
| NATIONAL_ID | documentNumber, issuingAuthority | Required |
| RESIDENCE_PERMIT | documentNumber, issuingAuthority | Required |
| Any other type | None | Optional |
Where side is required, upload the FRONT and BACK as two separate documents. A driver's license issued in Brazil (country is BR) is the exception: upload it as one image and omit side.
A missing required field, or a side that isn't allowed, returns 400 INVALID_INPUT.
Supported file types: application/pdf, image/jpeg, and image/png. Grid matches on the Content-Type of the multipart part, not the file extension. Any other type, and any file over 10 MB, returns 400 INVALID_INPUT.
Grid forwards the file to its verification provider, which screens it as the request is handled and can reject it with 422 DOCUMENT_REJECTED. To pass that screen, a photo or scan of a document must:
- show the whole document, with all four corners inside the frame and nothing overlapping an edge
- be in focus and free of glare, so every field and the machine-readable zone can be read
- be in color, not a black-and-white copy
- be a photo or scan of the physical document, not a screen capture, and not retouched in an image editor
- be unexpired
Request
- Base URLhttps://api.lightspark.com/grid/2025-10-13
- URLhttps://api.lightspark.com/grid/2025-10-13/documents
- AuthHTTP basic
Request body multipart/form-data
Example request
{
"documentType": "PASSPORT",
"side": "FRONT",
"country": "US",
"documentNumber": "A12345678",
"issuingAuthority": "U.S. Department of State",
"documentHolder": "BeneficialOwner:019542f5-b3e7-1d02-0000-000000000001"
}Response
Document uploaded successfully
Example response
{
"id": "Document:019542f5-b3e7-1d02-0000-000000000001",
"documentHolder": "BeneficialOwner:019542f5-b3e7-1d02-0000-000000000001",
"documentType": "PASSPORT",
"side": "FRONT",
"country": "US",
"documentNumber": "A12345678",
"issuingAuthority": "U.S. Department of State",
"fileName": "passport_scan.pdf",
"createdAt": "2025-10-03T12:00:00Z",
"updatedAt": "2025-10-03T12:00:00Z"
}Changes
- warning
added the new
RESIDENCE_PERMITenum value to theresponse property for the response status - info
added the new
RESIDENCE_PERMITenum value to the request property////
- warning
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info