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": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"filename": "vital-checking-june-25.pdf",
"mimeType": "application/pdf",
"size": 153143,
"metadata": {
"extractionStatus": "completed",
"Matched checklist items": [
{
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"label": "Bank Statements"
}
]
},
"signedUrl": "https://omniai-server-v2-prod.s3.us-east-2.amazonaws.com/...",
"leadChecklistItemDocument": [
{
"id": "0e66ab12-af87-4dbc-956a-2063b4ecb552",
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"documentId": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"overallValid": true,
"validationResult": {
"otherNotes": "",
"overallValid": true,
"validationResults": [
{
"isValid": true,
"ruleName": "Files must be business bank statements",
"isValidReason": "The document is a business bank statement..."
}
]
}
}
]
}
]
Leads
Get Lead Documents
Fetch all documents associated with a specific lead
GET
/
api
/
v1
/
leads
/
{leadId}
/
documents
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": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"filename": "vital-checking-june-25.pdf",
"mimeType": "application/pdf",
"size": 153143,
"metadata": {
"extractionStatus": "completed",
"Matched checklist items": [
{
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"label": "Bank Statements"
}
]
},
"signedUrl": "https://omniai-server-v2-prod.s3.us-east-2.amazonaws.com/...",
"leadChecklistItemDocument": [
{
"id": "0e66ab12-af87-4dbc-956a-2063b4ecb552",
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"documentId": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"overallValid": true,
"validationResult": {
"otherNotes": "",
"overallValid": true,
"validationResults": [
{
"isValid": true,
"ruleName": "Files must be business bank statements",
"isValidReason": "The document is a business bank statement..."
}
]
}
}
]
}
]
This endpoint fetches all documents associated with a specific lead.Documentation Index
Fetch the complete documentation index at: https://docs.getomni.ai/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
The unique identifier of the lead
Response
Array of document objects
Show documents
Show documents
Unique identifier for the document
Original filename of the document
MIME type of the document (e.g., “application/pdf”, “image/jpeg”)
File size in bytes
Pre-signed URL for accessing the document (expires after 1 hour)
Document metadata including processing status
Array of checklist item document associations with validation results
Show leadChecklistItemDocument
Show leadChecklistItemDocument
Unique identifier for the checklist item document association
ID of the checklist item this document is associated with
ID of the document
Whether the document passed overall validation
Detailed validation result for the document
Show validationResult
Show validationResult
Additional notes about the validation
Whether the document passed overall validation
Signed URLs expire after 1 hour. Use Get Document API
to get a fresh signed URL.
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": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"filename": "vital-checking-june-25.pdf",
"mimeType": "application/pdf",
"size": 153143,
"metadata": {
"extractionStatus": "completed",
"Matched checklist items": [
{
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"label": "Bank Statements"
}
]
},
"signedUrl": "https://omniai-server-v2-prod.s3.us-east-2.amazonaws.com/...",
"leadChecklistItemDocument": [
{
"id": "0e66ab12-af87-4dbc-956a-2063b4ecb552",
"leadChecklistItemId": "fb6c17f3-4d7e-4979-a262-9c287ae0e6dd",
"documentId": "4fa0d0de-6958-4d1f-9468-ebb8629eae8c",
"overallValid": true,
"validationResult": {
"otherNotes": "",
"overallValid": true,
"validationResults": [
{
"isValid": true,
"ruleName": "Files must be business bank statements",
"isValidReason": "The document is a business bank statement..."
}
]
}
}
]
}
]
⌘I