Gmail, Outlook and IMAP behind the same endpoints.
The mail API is the mailbox, not a sending service. You are working the user's own inbox: their threads, their folders, their drafts.
Threads and messages
curl "https://api.aux0.com/v1/threads?account_id=acc_gm_tom&folder_id=fld_inbox" \
-H "Authorization: Bearer $AUX0_API_KEY"
curl "https://api.aux0.com/v1/emails?thread_id=thr_rfp" \
-H "Authorization: Bearer $AUX0_API_KEY"Sending and replying
curl https://api.aux0.com/v1/emails \
-H "Authorization: Bearer $AUX0_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"account_id": "acc_gm_tom",
"to": [{ "address": "devika@lumenfreight.com", "name": "Devika Menon" }],
"subject": "Re: security questionnaire",
"body": "Both are a yes...",
"reply_to_message_id": "eml_rfp_1"
}'reply_to_message_id keeps the message in the thread on the provider's side,
which matters more than it sounds: a reply that starts a new thread is the
most common way an integration annoys the recipient.
Drafts
curl https://api.aux0.com/v1/emails/drafts \
-H "Authorization: Bearer $AUX0_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"account_id": "acc_gm_tom",
"to": [{ "address": "devika@lumenfreight.com" }],
"subject": "Re: security questionnaire",
"body": "Draft for review"
}'The draft appears in the user's own mail client, where a human reads it, edits it and sends it. For anything an agent writes, this is usually the shape you want rather than sending directly.
Folders and labels
curl "https://api.aux0.com/v1/folders?account_id=acc_gm_tom" \
-H "Authorization: Bearer $AUX0_API_KEY"Well-known folders carry a role (inbox, sent, drafts, archive,
spam, trash); everything else is a label or a user folder with a name
only.
Open tracking
Set track_opens: true and aux0 adds a pixel, then fires email.opened.
Open tracking is a privacy decision, not a feature flag. Most clients block remote images, so the signal is weak and biased, and in some jurisdictions tracking without disclosure is a compliance problem. Default it off and let your customers turn it on knowingly.
Choosing a connector
| Use it for | |
|---|---|
| Gmail | Google accounts. Narrowest scopes Google offers for what you enable. Restricted scopes need Google's verification before you leave testing. |
| Outlook | Microsoft work and personal accounts over Graph, including shared mailboxes. A tenant admin may need to consent first. |
| IMAP | Everything else: self-hosted, regional providers, the long tail. Realtime depends on the server supporting IDLE; aux0 falls back to a short poll. |