Skip to main content
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

event
string
The event type, always “document.received”
document
object
The received document object
occurredAt
string
ISO 8601 timestamp when the event occurred
workspaceId
string
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/..."
  },
  "occurredAt": "2025-10-31T19:00:01.700Z",
  "workspaceId": "6048d78a-584a-4f1e-9e39-e011ca4cc48c"
}