Every inbox, calendar and contact book, behind one API
Workwae connects your customers' Gmail, Microsoft 365 and IMAP accounts, keeps them in sync, and lets you read, write and send through one typed API.
Sync, search and send from any mailbox
An index of every mailbox and message, kept in step with the provider, with every write sent back to the provider.
- Sync and search. Mailboxes, labels and messages, searched in full text or through the provider's own search.
- Outbox. Sends are queued, retried and reported, with scheduling and undo.
- Templates, tracking and bounces. Mail merge, opt-in open and click tracking, and bounces matched to the send.
import { createClient } from "@workwae/sdk";
const workwae = createClient({
apiKey: process.env.WORKWAE_API_KEY,
});
// Full text over the index, or the provider's own search
const { items, source } = await workwae.search.messages({
accountId,
q: '"renewal quote" OR invoice',
});
// Queued, retried and reported through webhooks
const send = await workwae.outbox.create({
accountId,
to: [{ name: "Priya Shah", address: "priya@example.com" }],
subject: "Your renewal quote",
html: "<p>The quote is attached.</p>",
tracking: { opens: true, clicks: true },
reference: "deal_1042",
});
// Until send.undoUntil, this takes it back
await workwae.outbox.cancel({ accountId, outboxId: send.id });import os
from workwae import Workwae
workwae = Workwae(api_key=os.environ["WORKWAE_API_KEY"])
# Full text over the index, or the provider's own search
found = workwae.search.messages(
account_id=account_id,
q='"renewal quote" OR invoice',
)
# Queued, retried and reported through webhooks
send = workwae.outbox.create(
account_id=account_id,
to=[{"name": "Priya Shah", "address": "priya@example.com"}],
subject="Your renewal quote",
html="<p>The quote is attached.</p>",
tracking={"opens": True, "clicks": True},
reference="deal_1042",
)
# Until send.undo_until, this takes it back
workwae.outbox.cancel(account_id=account_id, outbox_id=send.id)
Every calendar, with recurring series done right
Calendar sync runs next to mail, and each recurring series is stored once with its occurrences and exceptions.
- Every calendar, in a rolling window from 90 days back to a year ahead.
- Full writes. Events, series and RSVPs, written back to the provider.
- Free/busy and suggestions. Busy blocks and free slots in working hours.
const { items } = await workwae.calendars.list({ accountId });
const primary = items.find((calendar) => calendar.isPrimary)!;
const timeZone = "America/Chicago";
// Common free slots for everyone, in working hours
const { suggestions } = await workwae.availability.find({
accountId,
attendees: ["priya@example.com", "sam@example.com"],
start: "2026-11-02T00:00:00Z",
end: "2026-11-07T00:00:00Z",
durationMinutes: 45,
timeZone,
workingHours: { start: "09:00", end: "17:00" },
});
// A weekly series with a Teams or Meet link
await workwae.calendarEvents.create({
accountId,
calendarId: primary.id,
subject: "Pipeline review",
start: { dateTime: "2026-11-03T10:00:00", timeZone },
end: { dateTime: "2026-11-03T10:45:00", timeZone },
attendees: [{ address: "priya@example.com" }],
recurrence: ["RRULE:FREQ=WEEKLY;BYDAY=TU;COUNT=12"],
onlineMeeting: true,
});
// Answer an invitation
await workwae.calendarEvents.respond({
accountId,
eventId,
response: "accepted",
});from datetime import datetime, timezone
calendars = workwae.calendars.list(account_id=account_id)
primary = next(c for c in calendars.items if c.is_primary)
time_zone = "America/Chicago"
# Common free slots for everyone, in working hours
free = workwae.availability.find(
account_id=account_id,
attendees=["priya@example.com", "sam@example.com"],
start=datetime(2026, 11, 2, tzinfo=timezone.utc),
end=datetime(2026, 11, 7, tzinfo=timezone.utc),
duration_minutes=45,
time_zone=time_zone,
working_hours={"start": "09:00", "end": "17:00"},
)
# A weekly series with a Teams or Meet link
workwae.calendar_events.create(
account_id=account_id,
calendar_id=primary.id,
subject="Pipeline review",
start={"date_time": datetime(2026, 11, 3, 10, 0), "time_zone": time_zone},
end={"date_time": datetime(2026, 11, 3, 10, 45), "time_zone": time_zone},
attendees=[{"address": "priya@example.com"}],
recurrence=["RRULE:FREQ=WEEKLY;BYDAY=TU;COUNT=12"],
online_meeting=True,
)
# Answer an invitation
workwae.calendar_events.respond(
account_id=account_id,
event_id=event_id,
response="accepted",
)
Bookable time, without a double booking
A scheduling link stores the rules; Workwae lists its open slots and books one by re-checking the calendars and claiming the slot before the event is created. You render the booking page.
- One host or all. Up to 20 accounts, booked together or round-robin by fewest recent bookings.
- The rules. Hours, buffers, minimum notice, a daily cap and how far ahead, with a Teams, Meet, Zoom or Webex link.
- Safe under load. Two requests for the same slot can't both book it, and every booking and cancellation is a webhook.
// The rules: round-robin over two accounts
const link = await workwae.schedulingLinks.create({
name: "Sales intro",
accountIds: [aliceAccountId, bobAccountId],
mode: "any",
durationMinutes: 30,
timeZone: "America/New_York",
bufferAfterMinutes: 10,
});
// For your booking page
const { items: slots } = await workwae.schedulingLinks.slots({
linkId: link.id,
});
// Re-checks the slot, claims it, creates the event
const booking = await workwae.bookings.create({
linkId: link.id,
start: slots[0]!.start,
invitee: { name: "Ada Lovelace", address: "ada@example.com" },
});
await workwae.bookings.cancel({ bookingId: booking.id });# The rules: round-robin over two accounts
link = workwae.scheduling_links.create(
name="Sales intro",
account_ids=[alice_account_id, bob_account_id],
mode="any",
duration_minutes=30,
time_zone="America/New_York",
buffer_after_minutes=10,
)
# For your booking page
slots = workwae.scheduling_links.slots(link_id=link.id)
# Re-checks the slot, claims it, creates the event
booking = workwae.bookings.create(
link_id=link.id,
start=slots.items[0].start,
invitee={"name": "Ada Lovelace", "address": "ada@example.com"},
)
workwae.bookings.cancel(booking_id=booking.id)
Address books from Google, Microsoft and CardDAV
Contacts sync like mail: a quiet first pass, then an event for every change. Microsoft 365 pushes changes; Google contacts are read daily, and your own writes are indexed at once.
- Sources. Google People, Microsoft 365 contact folders and CardDAV address books.
- Read, search and write back names, addresses, phones, notes and photos.
- Opt-in. Contacts stay off until you turn them on, for every account or for one.
import { paginate } from "@workwae/sdk";
// Every page, one contact at a time
const contacts = paginate(workwae.contacts.list, {
accountId,
q: "acme",
});
for await (const contact of contacts) {
console.log(contact.displayName, contact.emails);
}
await workwae.contacts.create({
accountId,
givenName: "Priya",
familyName: "Shah",
emails: [{ address: "priya@example.com", type: "work" }],
organization: "Acme",
jobTitle: "Head of Operations",
});from workwae import paginate
# Every page, one contact at a time
for contact in paginate(workwae.contacts.list, account_id=account_id, q="acme"):
print(contact.display_name, contact.emails)
workwae.contacts.create(
account_id=account_id,
given_name="Priya",
family_name="Shah",
emails=[{"address": "priya@example.com", "type": "work"}],
organization="Acme",
job_title="Head of Operations",
)
Zoom and Webex meetings, created with the event
Name a service when you create an event, and Workwae creates the meeting and writes its join link into the event.
- Hosted by the right person: the user's own Zoom or Webex grant, or your workspace's app.
- Series included. A changed subject, time or rule moves the meeting with it.
- Cleaned up. Deleting or cancelling the event deletes the meeting.
// Once: the user links their own Zoom account
const { url } = await workwae.meetingConnectSessions.create({
accountId,
service: "zoom",
redirectUri: "https://app.example.com/settings/meetings",
});
// Then any event can come with a Zoom meeting
const event = await workwae.calendarEvents.create({
accountId,
calendarId,
subject: "Intro call",
start: { dateTime: "2026-11-04T15:00:00", timeZone: "UTC" },
end: { dateTime: "2026-11-04T15:30:00", timeZone: "UTC" },
attendees: [{ address: "sam@example.com" }],
onlineMeetingService: "zoom",
});
event.onlineMeetingUrl; // the Zoom join linkfrom datetime import datetime
# Once: the user links their own Zoom account
session = workwae.meeting_connect_sessions.create(
account_id=account_id,
service="zoom",
redirect_uri="https://app.example.com/settings/meetings",
)
# Then any event can come with a Zoom meeting
event = workwae.calendar_events.create(
account_id=account_id,
calendar_id=calendar_id,
subject="Intro call",
start={"date_time": datetime(2026, 11, 4, 15, 0), "time_zone": "UTC"},
end={"date_time": datetime(2026, 11, 4, 15, 30), "time_zone": "UTC"},
attendees=[{"address": "sam@example.com"}],
online_meeting_service="zoom",
)
print(event.online_meeting_url) # the Zoom join link
Every change, pushed or pulled
Every change lands in one ordered feed, read with a cursor or received as signed webhooks.
- Signed per Standard Webhooks and verified by the SDKs'
parseWebhookparse_webhook. - Filters by event type, account and message criteria.
- Replay one event or a time range, with a delivery log per endpoint.
Explore webhooks and the change feed Read the webhooks guide
import { changes, parseWebhook } from "@workwae/sdk";
const { endpoint, secret } = await workwae.webhooks.create({
url: "https://app.example.com/hooks/workwae",
filters: {
eventTypes: [
"message.created",
"send.failed",
"calendar_event.updated",
],
},
});
// In your handler: checks the signature and the timestamp
const event = await parseWebhook(secret, request.headers, body);
if (event.known && event.type === "message.created") {
await enqueue(event.id, event.data.message.subject);
}
// Or pull the ordered feed and save the cursor
const feed = changes(workwae.changes.list, { cursor: saved });
for await (const change of feed) await handle(change);
await save(feed.cursor);
// Missed a day? Deliver it again
await workwae.webhooks.replay({
endpointId: endpoint.id,
since: new Date("2026-11-02T00:00:00Z"),
until: new Date("2026-11-03T00:00:00Z"),
});from datetime import datetime, timezone
from workwae import UnknownEvent, changes, parse_webhook
created = workwae.webhooks.create(
url="https://app.example.com/hooks/workwae",
filters={
"event_types": [
"message.created",
"send.failed",
"calendar_event.updated",
],
},
)
# In your handler: checks the signature and the timestamp
event = parse_webhook(created.secret, headers, body)
if not isinstance(event, UnknownEvent) and event.type == "message.created":
enqueue(event.id, event.data.message.subject)
# Or pull the ordered feed and save the cursor
feed = changes(workwae.changes.list, cursor=saved)
for change in feed:
handle(change)
save(feed.cursor)
# Missed a day? Deliver it again
workwae.webhooks.replay(
endpoint_id=created.endpoint.id,
since=datetime(2026, 11, 2, tzinfo=timezone.utc),
until=datetime(2026, 11, 3, tzinfo=timezone.utc),
)
Let users connect a mailbox in one step
A hosted page or your own interface, with the credential sealed before anything is stored.
- Hosted or headless. A page offering Google, Microsoft and IMAP, or your own buttons.
- Your OAuth apps or ours, per Microsoft cloud.
- IMAP and SMTP with servers discovered from the address alone.
Explore connect flows Connect flows guide IMAP and SMTP guide
// Hosted: one link to send the user to
const { url } = await workwae.connectSessions.create({
redirectUri: "https://app.example.com/mail/connected", // allowlisted first, under Settings
providers: ["google", "microsoft", "imap"],
externalRef: "user_42",
options: { calendarEnabled: true, contactsEnabled: true },
});
// Headless: your UI, any Microsoft cloud
const { authorizeUrl } = await workwae.oauthAuthorizations.create({
provider: "microsoft",
oauthAppId: gccHighApp.id, // your app registration for GCC High
redirectUri: "https://app.example.com/mail/connected",
});
// IMAP: find the servers from the address
const found = await workwae.autoconfig.lookup({
email: "ada@example.org",
});
const account = await workwae.imapAccounts.create({
email: "ada@example.org",
password: appPassword,
});# Hosted: one link to send the user to
hosted = workwae.connect_sessions.create(
redirect_uri="https://app.example.com/mail/connected", # allowlisted first, under Settings
providers=["google", "microsoft", "imap"],
external_ref="user_42",
options={"calendar_enabled": True, "contacts_enabled": True},
)
# Headless: your UI, any Microsoft cloud
auth = workwae.oauth_authorizations.create(
provider="microsoft",
oauth_app_id=gcc_high_app.id, # your app registration for GCC High
redirect_uri="https://app.example.com/mail/connected",
)
# IMAP: find the servers from the address
found = workwae.autoconfig.lookup(email="ada@example.org")
account = workwae.imap_accounts.create(
email="ada@example.org",
password=app_password,
)
A whole domain, without asking every user
An administrator authorizes Workwae once, and you add mailboxes by address.
- Google Workspace domain-wide delegation through a service account.
- Microsoft app-only access through admin consent, in any cloud.
- Directory listing, a permission test and shared mailboxes as accounts.
// Google Workspace: domain-wide delegation
const connection = await workwae.orgConnections.create({
kind: "google_delegation",
name: "Acme Workspace",
domain: "acme.com",
serviceAccountKey,
contactsEnabled: true,
});
// Add mailboxes by address, one result each
const { items } = await workwae.orgConnections.addAccounts({
connectionId: connection.id,
mailboxes: [
{ email: "support@acme.com" },
{ email: "sales@acme.com" },
],
});
// Microsoft: open a shared mailbox with a user's grant
await workwae.sharedMailboxes.create({
accountId,
email: "billing@contoso.com",
});# Google Workspace: domain-wide delegation
connection = workwae.org_connections.create(
kind="google_delegation",
name="Acme Workspace",
domain="acme.com",
service_account_key=service_account_key,
contacts_enabled=True,
)
# Add mailboxes by address, one result each
added = workwae.org_connections.add_accounts(
connection_id=connection.id,
mailboxes=[
{"email": "support@acme.com"},
{"email": "sales@acme.com"},
],
)
# Microsoft: open a shared mailbox with a user's grant
workwae.shared_mailboxes.create(
account_id=account_id,
email="billing@contoso.com",
)
Understand replies, and draft the next one
Optional features, off until you turn them on, that never use your data to train models.
- Reply classification. Replies to your sends sorted into opt-out, auto-reply, delivery failure or human reply.
- Opt-outs handled by your setting: suppressed, or held for review.
- Drafting. An email body from instructions, for a person to edit.
// A reply to one of your sends, classified
if (event.known && event.type === "message.classified") {
const { classification } = event.data;
if (classification.autoReplyCategory === "out_of_office") {
await followUpOn(classification.returnDate);
}
}
// Draft an answer for a person to edit
const { text } = await workwae.ai.draft({
instructions: "Thank them and offer Tuesday afternoon",
context: { accountId, replyToMessageId: messageId },
format: "text",
});# A reply to one of your sends, classified
if not isinstance(event, UnknownEvent) and event.type == "message.classified":
classification = event.data.classification
if classification.auto_reply_category == "out_of_office":
follow_up_on(classification.return_date)
# Draft an answer for a person to edit
draft = workwae.ai.draft(
instructions="Thank them and offer Tuesday afternoon",
context={"account_id": account_id, "reply_to_message_id": message_id},
format="text",
)
What each provider supports
One API shape across every provider, with push where it exists and a backstop poll.
Provider support matrix
| Provider | Calendar | Contacts | Meetings | Push and polling | |
|---|---|---|---|---|---|
| Gmail and Google Workspace | Gmail API: labels, threads, drafts, send, provider search | Google Calendar: every calendar, series, RSVP, free/busy, scheduling links | Google People API | Google Meet, Zoom, Webex | Mail through Cloud Pub/Sub, calendars through watch channels; contacts polled daily |
| Microsoft 365 | Microsoft Graph, including shared mailboxes | Every calendar and calendar group, series, RSVP, free/busy, scheduling links | Every contact folder | Teams, Zoom, Webex | Graph change notifications for mail, calendar and contacts |
| Outlook.com (personal accounts) | Microsoft Graph, without shared mailboxes | Every calendar, series, RSVP, free/busy, scheduling links | Every contact folder | Zoom, Webex | Graph change notifications for mail, calendar and contacts |
| Microsoft 365 GCC High and DoD | Microsoft Graph in that cloud | Microsoft Graph in that cloud | Microsoft Graph in that cloud | Teams, Zoom, Webex | Graph change notifications where the cloud offers them |
| IMAP and SMTP | Any server, with a password or Google or Microsoft sign-in | Through CalDAV | Through CardDAV | Not applicable | IDLE on the inbox, NOTIFY where the server offers it |
| CalDAV and CardDAV | Not applicable | Any CalDAV server, scheduling links; invitations mailed when the server does not schedule | Any CardDAV server | Zoom, Webex, or any link | Polled, and refreshed after every write |
| Zoom | Not applicable | Not applicable | Not applicable | Meetings for events; user sign-in or Server-to-Server OAuth app | App removals handled as they happen |
| Webex | Not applicable | Not applicable | Not applicable | Meetings for events; user sign-in or Service App | Not applicable |
Provider notes
- Every account is also polled on a schedule, so a dropped notification only delays a change.
- Each Microsoft national cloud needs its own app registration; in 21Vianet, Graph has no message delta yet, so mail runs over IMAP and SMTP with Microsoft sign-in.
-
CalDAV and CardDAV servers are discovered for iCloud, Fastmail, Yahoo (calendar),
GMX, Zoho, mailbox.org and Posteo, and any server publishing
.well-knownor DNS SRV records. - Zoom and Webex on IMAP accounts signed in with a password need the user's own grant.
- Google accounts over IMAP need your own Google OAuth app; the Gmail API works with Workwae's.
Build on one API instead of five
Workwae is in early access. Tell us what you are building, and read the docs in the meantime.