Triggered when a document is received.
Event Type
document.received
Description
This event is fired whenever a document is received by the agent, whether via email, SMS, portal upload, or API. Use this event to track document collection and trigger downstream processing.
Payload Structure
The event type: document.received
The received document object Unique identifier for the document
Original filename of the document
ID of the lead this document belongs to
Pre-signed URL for accessing the document (expires after 1 hour)
MIME type of the document (e.g., application/pdf, image/jpeg)
ID of the message that contained this document (if applicable)
Additional metadata about the document
ISO 8601 timestamp when the document was created
ID of the workspace this event belongs to
Signed URLs
The signedUrl field provides temporary access to the document. Note that:
URLs expire after 1 hour
Request a new document via the API to get a fresh signed URL
URLs are pre-signed for secure access
Next Steps
After receiving this event, you may want to:
Download and process the document
Wait for the document.extracted event for extraction results
Update your system with the new document information
{
"event" : "document.received" ,
"document" : {
"id" : "a80e6241-327f-419d-bae1-a4806d1a7641" ,
"size" : 153143 ,
"leadId" : "50713355-df73-4077-9d84-dcda6da5729c" ,
"filename" : "vital-checking-june-25.pdf" ,
"metadata" : null ,
"mimeType" : "application/pdf" ,
"createdAt" : "2025-10-31T19:00:01.675Z" ,
"messageId" : "1ae4c028-ae4d-4e6d-aebd-cde96fdd8b3f" ,
"signedUrl" : "https://omniai-server-v2-dev.s3.us-east-2.amazonaws.com/..."
},
"workspaceId" : "6048d78a-584a-4f1e-9e39-e011ca4cc48c"
}