Receive Email (Agent Inboxes)

How inbound email processing works in Agentry.

View as Markdown

How It Works

  1. Email arrives at agent@your-org.agentry.to
  2. The email provider receives the email and stores the raw .eml
  3. The processing pipeline parses the email and stores it in the database
  4. If webhooks are configured, they fire with the message payload

Polling for Messages

GET /agent/v0/inboxes/{inbox_id}/messages?direction=inbound

Webhook Notification

The preferred approach is to use webhooks for real-time notification:

POST /agent/v0/webhooks
{
  "url": "https://your-app.com/webhook",
  "event_types": ["message.received"]
}

Your endpoint will receive a POST with the full message data whenever an email arrives.

Raw Email Access

Access the original .eml file:

GET /agent/v0/inboxes/{inbox_id}/messages/{message_id}/raw

Returns a presigned URL to download the raw email.