This endpoint fetches all documents associated with a specific lead.
Path Parameters
The unique identifier of the lead
Response
Array of document objects
Unique identifier for the document
MIME type of the document (e.g., “application/pdf”, “image/jpeg”)
Document metadata including classification and processing status
Status of document extraction (e.g., “completed”)
Pre-signed URL for accessing the document (expires after 1 hour)
ISO 8601 timestamp when the document was created
Signed URLs expire after 1 hour. Request a new document to get a fresh signed URL if needed.
const leadId = '4ef30123-90c2-4dc0-bd28-b43eee8664ea';
const options = {
method: 'GET',
headers: {
'x-api-key': '<your-api-key>',
},
};
fetch(`https://api-v2.getomni.ai/api/v1/leads/${leadId}/documents`, options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
[
{
"id": "6e1f8dd6-d582-4a92-8770-2a21b1f0573b",
"filename": "driver-li.jpg",
"mimeType": "image/jpeg",
"size": 484222,
"metadata": {
"documentType": "Driver's License",
"extractionStatus": "completed",
"lastProcessed": "2025-10-13T19:45:42.292Z"
},
"signedUrl": "https://omniai-server-v2-dev.s3.us-east-2.amazonaws.com/...",
"createdAt": "2025-10-13T19:45:00.215Z"
}
]