Skip to main content

0. Install SDKs (optional)

Full SDK usage guide: SDKs.

1. Authenticate

Use a bearer API key from the dashboard.

2. Create inbox

3. Send email

4. List and mark inbound email

5. SDK examples

6. Shared-domain inbound route (manual setup)

For shared-domain inboxes (for example agent@emailagent.dev), configure this in Mailgun Routes:
  • Expression: match_recipient('.*@emailagent.dev')
  • Action 1: forward('https://app.emailagent.dev/webhooks/mailgun/inbound')
  • Action 2: stop()
Also set MAILGUN_WEBHOOK_SIGNING_KEY in app environment to enforce webhook signature validation. Expected successful webhook response:

7. Inbound troubleshooting

8. Inbound smoke test

  1. Create inbox agent@emailagent.dev in app.
  2. Send email from external mailbox to that inbox.
  3. Confirm message appears in dashboard inbox view.
  4. Confirm same message appears via GET /api/v1/emails?inboxId=<inbox_uuid>.

9. Check metrics

10. MCP (optional)

If your agent platform supports MCP, use the official MCP setup guide: