cURL
curl --request DELETE \
--url https://api.lightspark.com/grid/2025-10-13/documents/{documentId} \
--header 'Authorization: Basic <encoded-value>'import LightsparkGrid from '@lightsparkdev/grid';
const client = new LightsparkGrid({
username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
});
await client.documents.delete('documentId');package com.lightspark.grid.example
import com.lightspark.grid.client.LightsparkGridClient
import com.lightspark.grid.client.okhttp.LightsparkGridOkHttpClient
import com.lightspark.grid.models.documents.DocumentDeleteParams
fun main() {
val client: LightsparkGridClient = LightsparkGridOkHttpClient.fromEnv()
client.documents().delete("documentId")
}{
"status": 401,
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}{
"status": 404,
"code": "TRANSACTION_NOT_FOUND",
"message": "<string>",
"details": {}
}{
"status": 409,
"code": "TRANSACTION_NOT_PENDING_PLATFORM_APPROVAL",
"message": "<string>",
"details": {}
}{
"status": 500,
"code": "GRID_SWITCH_ERROR",
"message": "<string>",
"details": {}
}Documents
Delete a document
Delete an uploaded document. This cannot be undone. Documents that have already been submitted for verification may not be deletable.
DELETE
/
documents
/
{documentId}
cURL
curl --request DELETE \
--url https://api.lightspark.com/grid/2025-10-13/documents/{documentId} \
--header 'Authorization: Basic <encoded-value>'import LightsparkGrid from '@lightsparkdev/grid';
const client = new LightsparkGrid({
username: process.env['GRID_CLIENT_ID'], // This is the default and can be omitted
password: process.env['GRID_CLIENT_SECRET'], // This is the default and can be omitted
});
await client.documents.delete('documentId');package com.lightspark.grid.example
import com.lightspark.grid.client.LightsparkGridClient
import com.lightspark.grid.client.okhttp.LightsparkGridOkHttpClient
import com.lightspark.grid.models.documents.DocumentDeleteParams
fun main() {
val client: LightsparkGridClient = LightsparkGridOkHttpClient.fromEnv()
client.documents().delete("documentId")
}{
"status": 401,
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}{
"status": 404,
"code": "TRANSACTION_NOT_FOUND",
"message": "<string>",
"details": {}
}{
"status": 409,
"code": "TRANSACTION_NOT_PENDING_PLATFORM_APPROVAL",
"message": "<string>",
"details": {}
}{
"status": 500,
"code": "GRID_SWITCH_ERROR",
"message": "<string>",
"details": {}
}Was this page helpful?
⌘I