AegisAI Perspectives · 119
API-based email security reads mail in the mailbox after delivery and can pull it back later, while a gateway holds mail first because MX points to it.
See it on your own Google Workspace or Microsoft 365 tenant. No MX change.
Or get the Q3 2026 State of the AI Attack report (free, instant download)
Not ready for a demo? Check your domain (free, about 10 seconds).

API-based email security has the edge on removal after delivery and on outages, and a gateway still wins on holding mail before any mailbox sees it71. AegisAI reads mail through the Microsoft 365 or Google Workspace API after delivery19, so it works after the mailbox receives a message. API-based email security reads mail in the mailbox after delivery, where Microsoft's own purge reaches back only 48 hours11. A gateway sits in front of the mailbox, because the MX record must point to the gateway.
No design is complete: Microsoft says total protection never reaches 100 percent9.
API-based email security sits after delivery, and a gateway sits before it. Follow one inbound message through both designs in seven steps.
With a gateway, your domain's MX record must point to the gateway. With an API-based design, the MX record keeps pointing at Microsoft 365 or Gmail.
Microsoft tells you to lock down Exchange Online to accept mail only from that service2. Mail smart-host routed straight to Exchange Online is then rejected.
The message adopts the source IP of the last hop in front of Microsoft 3654. Turn on Enhanced Filtering for Connectors to preserve the source IP and sender information.
A gateway that modifies messages without ARC sealing invalidates their DKIM signatures6.
A service using the Microsoft Graph API scans messages after delivery and can also remove them7.
Zero-hour auto purge (ZAP) searches only the last 48 hours of delivered email, and users are not notified when it moves a message12.
That integration typically needs full access to mailboxes8. Microsoft Graph allows 10,000 API requests in a 10-minute period per app and mailbox13.
Draw these seven steps for your own tenant and mark which product acts at each one.
Short on time? Watch the explainer, or book a demo.
API-based email security can remove a message from mailboxes after delivery, which a gateway in front of the platform cannot reach. Using the Graph API to scan after delivery lets the service remove messages it judges malicious or unwanted. A gateway's verdict is final once it passes the message on.
ZAP acts on messages already in a mailbox, within a 48 hour search window. Users are not told when ZAP moves a message, so the help desk needs its own record of what was pulled.
The Outlook service allows four concurrent requests per app and mailbox14, within the 10,000 requests per 10 minutes. Exceeding the limit for one mailbox does not affect the app's access to another mailbox.
Ask every candidate how many mailboxes it can clear in one hour, and where that number is recorded.
A gateway failure delays inbound mail, and an API failure delays detection. The difference follows from where the MX record points.
When a gateway stops. Senders cannot hand mail to it, so their servers queue the message. RFC 5321 says the retry interval should be at least 30 minutes15, and the give-up time generally needs to be at least 4-5 days. Mail cannot route around the gateway, because Exchange Online rejects mail that did not come through it.
When an API service stops. Delivery continues, because the MX record still points at the platform. Detection and removal wait until the service returns, and messages sit in mailboxes unscanned by it in that time. The platform's own purge still runs inside its 48 hour window.
When the API is throttled or consent is revoked. Requests above the Graph limit wait. An admin who removes the app's mailbox access ends its ability to remove mail.
When authentication breaks. A gateway that rewrites messages without ARC breaks DKIM, and Microsoft 365 sees the gateway's IP unless Enhanced Filtering is on. Read the full outage question set in what happens to my mail flow if you go down.
Write one line per failure mode in your runbook: who notices, and what the user sees.
The table scores both designs on architecture only; the gateway wins one row.
| Criterion | Gateway in the MX path | API-based email security after delivery |
|---|---|---|
| Where the MX record points | To the gateway | To Microsoft 365 or Gmail, unchanged |
| Holding mail before any mailbox receives it | Gateway wins. It scans first, because the MX record points to it | No hold. It scans after delivery |
| Removal after delivery | No reach into the mailbox; the platform's purge covers 48 hours | Removes messages through the Graph API |
| Sender IP the platform sees | The gateway's, unless Enhanced Filtering is on | The last hop in front of the platform, with no gateway added |
| If the service stops | Senders queue and retry at least every 30 minutes | Delivery continues; detection waits |
| Access it needs | DNS and connector control | Full mailbox access, typically |
| Volume ceiling | Set by the vendor | 10,000 requests per 10 minutes per app and mailbox |
Pick the gateway where a policy says mail must never reach a mailbox before a verdict. Pick API-based email security where a security outage must never stop mail, and where messages must be pulled back after delivery. Running both adds a layer: in-and-out routing counts messages twice in most reporting tools10.
The detection side, AI against rules, is covered in secure email gateway or AI-native email security. The four deployment models, journaling and hybrid included, are in cloud-native email security deployment options. Score your current setup on all seven rows before the next renewal.
AegisAI works post-delivery through the Microsoft 365 or Google Workspace API26. Mail keeps flowing21. Detection pauses until the service returns. One bad email is pulled from every inbox it reached, forwards included. Removal needs write access your admin grants and can revoke.
Illustrative example, figures are fictional: Northgate Freight (fictional) has 1,400 mailboxes on Microsoft 365 and a gateway in the MX path. On a Tuesday the gateway is unreachable for 3 hours. Senders queue inbound mail and retry, so 2,100 messages arrive late and none route around it, because Exchange Online accepts mail only from the gateway. Two weeks later a phishing message reaches 220 mailboxes at 09:10 and is identified as malicious at 11:40 the next day. The gateway's verdict was final, so the admin team relies on the platform's 48 hour purge and finds 37 users opened it. In a 30-day trial of an API-based layer in monitoring mode, the same tenant records 0 delayed messages during a 2 hour outage of the API service, and 14 messages flagged after delivery that the gateway had passed.
Rebuild this timeline with your own outage hours and post-delivery detections before you choose.
Track three numbers, each in a system you already run.
Compare the three numbers for each design on day 30, and keep the one whose failures you can live with.
It has the edge on removal after delivery and on outages. A Graph API service can remove messages after delivery, and its outage does not stop mail, because the MX record still points at the platform. A gateway still wins on holding mail before delivery.
No. A gateway needs the MX record pointed to it. An API-based service reads the mailbox through the platform's API after delivery, so the MX record stays as it is.
Senders queue and retry, at intervals of at least 30 minutes, for at least 4-5 days. Mail cannot bypass the gateway while Exchange Online accepts mail only from it.
Microsoft says a Graph API integration typically requires full access to mailboxes. Review the vendor's security and support practices before you grant it.
It can. A gateway that modifies messages without ARC sealing invalidates DKIM signatures, and Microsoft 365 sees the gateway's IP as the source unless Enhanced Filtering is on.
ZAP covers the last 48 hours of delivered email and does not notify users. Check whether your threats are found within that window.