Email API
Aurinko's Email API provides a RESTful interface for accessing and syncing email messages across popular providers like Gmail, Office 365, iCloud, and more.
Aurinko Email API
The Aurinko Email API abstracts away differences between popular email APIs (Gmail, Office 365, Outlook.com, MS Exchange, Zoho Mail, iCloud, IMAP) to make it easy to develop email integrations.
The Aurinko Email API provides a REST interface that focuses on accessing and syncing email messages in a uniform manner.
Access data for email messages, such as email content, sender and recipient information, subject lines, dates, and more.
Search email inboxes for specific content.
Update the unread and flagged status of email messages.
Manage and download file attachments.
Create drafts and send emails.
Incremental synchronization.
Aurinko account setup
First, create your account in the Aurinko portal, then follow the guide to get your developer API keys. To test with Google Workspace accounts review this article: Adding Aurinko to Google Workspace allowlist.
Email API Endpoints
Email messages
Email messages are the core building block for most email applications. They contain several pieces of information, such as when a message was sent, the sender's address, to whom it was sent, and the message body. They can also contain file attachments, calendar event invitations, and more.
Synchronization
Email sync methods allow developers to implement incremental synchronization of email messages in a uniform manner across different email providers. Aurinko supports requesting updated as well as deleted messages.
Draft messages
Draft messages methods allow developers to create new drafts, read existing drafts, and send drafts.
Email tracking
Email tracking methods allow developers to access and manage open and reply/bounce tracking data.\
Email sync quickstart
Start a new sync
A new sync needs to be provisioned by calling the "sync start" method /messages/sync
. The sync covers all email folders (i.e. Inbox, Sent Mail, and sub folders). daysWithin
limits the initial scan to emails received in the past daysWithin
days.
The Aurinko platform will initialize all necessary internal resources and let you know when it's ready to serve data. The response should look like this:
If the response shows ready: false
call the "sync start" method again. Once the sync is ready you will get delta tokens syncUpdatedToken
, syncDeletedToken
and can start loading updated and deleted email messages.
Initial full sync
Initial requests /messages/sync/updated
and /messages/sync/deleted
are equivalent to a full sync in the specified timeMin
,NOW
range, plus loading all updated messages (deleted messages) since the sync start.
Response:
Continue loading pages using provided 'nextPageToken' until you find another 'nextDeltaToken'.
Incremental sync
A new deltaToken (nextDeltaToken in a response) is provided for loading email messages that have been modified/deleted since the last sync-updated/sync-deleted request. In cases where a large number of messages have changed since the last incremental sync request, you may find a nextPageToken
instead of the nextDeltaToken
in the response. Continue loading pages using the provided nextPageToken
until you find another n
extDeltaToken
.
Other examples
Email messages
To get a list of messages from, to, or cc'ing an email address, make a request to the /email/messages
endpoint.
To get an email message by id make a request to the /email/messages/{id}
endpoint.
To send a new email with tracking make a request to the /email/messages
endpoint.
Last updated