Send & Receive Email

Full send/receive/reply/thread API. Your agent reads replies, sends follow-ups, and handles threads — all via REST.

Your agents can send emails, read replies, and manage threaded conversations — all through simple HTTP calls. No IMAP, no polling, no mail client libraries.

Sending

curl -X POST https://api.emails4agents.com/v1/messages/send \
  -H "X-API-Key: e4a_..." \
  -d '{
    "from_inbox_id": "inbox-uuid",
    "to": "[email protected]",
    "subject": "Your request has been processed",
    "text": "Hi! Your agent completed the task you requested.",
    "html": "<p>Hi! Your agent completed the task you requested.</p>"
  }'

Outbound delivery routes through AWS SES, which means enterprise-grade deliverability with SPF, DKIM, and DMARC authentication out of the box.

Receiving

Inbound email arrives via Postfix LMTP → FastAPI → Supabase. When a message lands, a webhook fires within seconds. Your agent gets notified via POST to your endpoint — no polling required.

Threading

Every message has a thread_id. Retrieve an entire conversation with one call:

GET /v1/threads/{thread_id}
# Returns all messages in the thread, ordered chronologically

Reply in-thread with reply_to_message_id to preserve the In-Reply-To header chain so email clients show proper conversation threading.

Key capabilities

  • HTML + plain text — Send both versions for maximum deliverability
  • Idempotency keys — Prevent duplicate sends in retry scenarios
  • Thread replies — Maintain conversation context across multiple turns
  • Message search — Full-text search across inbox contents
  • Read/unread state — Track which messages your agent has processed
  • Labels — Tag messages for custom routing or classification

Deliverability

Outbound mail routes through AWS SES with:

  • DKIM signing — Domain-specific keypairs generated automatically
  • SPF — Your domain’s SPF record includes SES sending IPs
  • DMARC — Policy enforcement with quarantine/reject options
  • Bounce handling — SES bounce notifications flow back via webhook events

Ready to get started?

Start your free trial today. No credit card required.