curl --request PUT \
--url https://api.lightspark.com/grid/2025-10-13/documents/{documentId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form documentType=PASSPORT \
--form country=US \
--form side=FRONT \
--form documentNumber=A12345678{
"id": "Document:019542f5-b3e7-1d02-0000-000000000001",
"documentHolder": "BeneficialOwner:019542f5-b3e7-1d02-0000-000000000001",
"documentType": "PASSPORT",
"country": "US",
"fileName": "passport_scan.pdf",
"createdAt": "2025-10-03T12:00:00Z",
"side": "FRONT",
"documentNumber": "A12345678",
"updatedAt": "2025-10-03T12:00:00Z"
}Replace an existing document with a new file and/or updated metadata. This is useful when a document was rejected and needs to be re-uploaded. The request must use multipart/form-data.
curl --request PUT \
--url https://api.lightspark.com/grid/2025-10-13/documents/{documentId} \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form documentType=PASSPORT \
--form country=US \
--form side=FRONT \
--form documentNumber=A12345678{
"id": "Document:019542f5-b3e7-1d02-0000-000000000001",
"documentHolder": "BeneficialOwner:019542f5-b3e7-1d02-0000-000000000001",
"documentType": "PASSPORT",
"country": "US",
"fileName": "passport_scan.pdf",
"createdAt": "2025-10-03T12:00:00Z",
"side": "FRONT",
"documentNumber": "A12345678",
"updatedAt": "2025-10-03T12:00:00Z"
}API token authentication using format <api token id>:<api client secret>
Document ID
The document file (PDF, JPEG, or PNG, max 10 MB)
Type of identity or business verification document
PASSPORT, DRIVERS_LICENSE, NATIONAL_ID, PROOF_OF_ADDRESS, BANK_STATEMENT, TAX_RETURN, CERTIFICATE_OF_INCORPORATION, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, STATE_REGISTRY_EXCERPT, GOOD_STANDING_CERTIFICATE, INFORMATION_STATEMENT, INCUMBENCY_CERTIFICATE, BUSINESS_LICENSE, SHAREHOLDER_REGISTER, POWER_OF_ATTORNEY, UTILITY_BILL, SELFIE, OTHER "PASSPORT"
Country that issued the document (ISO 3166-1 alpha-2)
"US"
Which side of the document (for two-sided documents like driver's licenses)
FRONT, BACK "FRONT"
Document identification number (e.g., passport number)
"A12345678"
Document replaced successfully
Unique identifier for this document
"Document:019542f5-b3e7-1d02-0000-000000000001"
ID of the entity that owns this document. Can be a Customer ID or a BeneficialOwner ID.
"BeneficialOwner:019542f5-b3e7-1d02-0000-000000000001"
Type of identity or business verification document
PASSPORT, DRIVERS_LICENSE, NATIONAL_ID, PROOF_OF_ADDRESS, BANK_STATEMENT, TAX_RETURN, CERTIFICATE_OF_INCORPORATION, ARTICLES_OF_INCORPORATION, ARTICLES_OF_ASSOCIATION, STATE_REGISTRY_EXCERPT, GOOD_STANDING_CERTIFICATE, INFORMATION_STATEMENT, INCUMBENCY_CERTIFICATE, BUSINESS_LICENSE, SHAREHOLDER_REGISTER, POWER_OF_ATTORNEY, UTILITY_BILL, SELFIE, OTHER "PASSPORT"
Country that issued the document (ISO 3166-1 alpha-2)
"US"
Original file name of the uploaded document
"passport_scan.pdf"
When this document was uploaded
"2025-10-03T12:00:00Z"
Which side of the document this upload represents. Relevant for two-sided documents like driver's licenses or national IDs.
FRONT, BACK "FRONT"
Document identification number (e.g., passport number)
"A12345678"
When this document was last updated
"2025-10-03T12:00:00Z"
Was this page helpful?