Latest API and SDK updates. Subscribe via RSS · Discord

December 22, 2025

Summary

Webhooks & Events – receive email and domain events via HTTP callbacks. Subscribe to message lifecycle events (received, sent, delivered, bounced, complained, rejected) and domain verification. Use Svix headers for verification and filter by inbox or pod. Perfect for agents that need reliable, async notifications without keeping a WebSocket open.

What’s new?

Webhook events:

  • message.received - New inbound email
  • message.sent - Outbound message sent
  • message.delivered - Delivery confirmed
  • message.bounced - Bounce (with type and recipients)
  • message.complained - Spam complaint
  • message.rejected - Rejection (e.g. validation)
  • domain.verified - Domain verification succeeded

Delivery & verification:

  • Svix-style headers: svix-id, svix-signature, svix-timestamp for verification
  • Filter by inbox or pod (up to 10 per webhook)
  • Payloads include inbox_id, thread_id, message_id, timestamps, and event-specific data

Use cases

Build agents that:

  • React to new emails, bounces, and complaints via HTTP
  • Sync email state to your database or queue
  • Trigger workflows on domain verification
  • Verify webhook signatures for security
1from agentmail import AgentMail
2
3client = AgentMail(api_key="your-api-key")
4
5# in your webhook handler: verify signature and handle event
6# (use Svix or the raw headers for verification)
7def handle_webhook(request):
8 event_id = request.headers.get("svix-id")
9 signature = request.headers.get("svix-signature")
10 payload = request.json()
11 if payload.get("event_type") == "message.received":
12 message = payload.get("message")
13 # process new email
14 elif payload.get("event_type") == "domain.verified":
15 domain = payload.get("domain")
16 # domain is verified

Set up and verify webhooks in our Webhooks documentation.