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));
{ "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" }
Fetch a single document by ID