This endpoint fetches a single document by ID, including metadata and a signed URL for accessing the document.
Path Parameters
The unique identifier of the document
Optional. Whether to include the document’s base64-encoded content in the response
Response
Unique identifier for the document
MIME type of the document (e.g., “application/pdf”, “image/jpeg”)
ID of the lead this document belongs to
ID of the workspace this document belongs to
Pre-signed URL for accessing the document (expires after 1 hour)
Base64-encoded document content
ISO 8601 timestamp when the document was created
ISO 8601 timestamp when the document was last updated
Signed URLs expire after 1 hour. Use this API again to get a fresh signed URL.
const documentId = 'd29176d4-25c6-4345-852d-0792e3812c70';
const options = {
method: 'GET',
headers: {
'x-api-key': '<your-api-key>',
},
};
fetch(`https://api-v2.getomni.ai/api/v1/documents/${documentId}`, options)
.then((response) => response.json())
.then((response) => console.log(response))
.catch((err) => console.error(err));
import requests
document_id = 'd29176d4-25c6-4345-852d-0792e3812c70'
url = f"https://api-v2.getomni.ai/api/v1/documents/{document_id}"
headers = {
"x-api-key": "<your-api-key>"
}
response = requests.request("GET", url, headers=headers)
print(response.json())
curl --request GET \
--url https://api-v2.getomni.ai/api/v1/documents/d29176d4-25c6-4345-852d-0792e3812c70 \
--header 'x-api-key: <your-api-key>'
{
"id": "d29176d4-25c6-4345-852d-0792e3812c70",
"filename": "omniai-technology-inc-8961-monthly-statement-2025-05.pdf",
"mimeType": "application/pdf",
"size": 131777,
"leadId": "4cc8af99-b313-4c1f-b98b-009f38a4721a",
"workspaceId": "6048d78a-584a-4f1e-9e39-e011ca4cc48c",
"signedUrl": "https://omniai-server-v2-dev.s3.us-east-2.amazonaws.com/...",
"createdAt": "2025-10-30T20:07:24.663Z",
"updatedAt": "2025-10-30T20:08:20.033Z"
}