-
Create a connect session
Your backend calls POST /v1/connect-sessions with an API key and gets a link that
works once, for 60 seconds to 24 hours (one hour by default). Headless OAuth does the same from
your own provider picker.
-
The user signs in at the provider
The hosted page offers Google, Microsoft 365 and an IMAP and SMTP form. For Google and
Microsoft, sign-in and consent happen at the provider, so Workwae never sees the password.
Workwae seals the credentials, creates the account and returns the user to your allowlisted
redirect URI with its id.
-
Workwae syncs the account
Each account is read from its provider by cursor: Gmail history ids, Microsoft Graph delta
queries, IMAP UIDs, CalDAV and CardDAV sync tokens. A provider push only wakes the sync, and
polling is the backstop. Failures back off from 30 seconds to 15 minutes; a revoked grant sets
reauth_required.
-
Every change becomes an event
A change, a send or an account lifecycle step becomes one event with a stable id. The log keeps
events for eventRetentionDays: 14 days by default, 7 to 30.
-
Signed webhooks push it
Matching events are POSTed to your HTTPS endpoint, signed with Standard Webhooks
(HMAC-SHA256). Answer 2xx within 10 seconds. A failed delivery retries after 5 seconds,
doubling up to an hour, and is given up after 3 days; an endpoint with 72 hours of failures is
disabled. The delivery log and replay recover missed events.
-
Or poll the change feed
GET /v1/changes returns the same events with the same ids, oldest first, 1 to 200
per page. Store nextCursor, which is never null; an empty page means you are
caught up.
-
Send through the outbox
POST /v1/accounts/{accountId}/outbox queues an entry and answers 201. The
account's provider (Gmail API, Microsoft Graph or SMTP) sends it in the background: queued,
sending, then sent, failed or cancelled, with an undo window of up to 60 seconds. The result
returns as send.sent, send.retrying or send.failed
through steps 4 to 6.
-
Offer bookable slots
A scheduling link lists open slots computed from its accounts' connected calendars, using your
hours, buffers and notice. Booking a slot creates the calendar event, with a meeting link if
you ask for one, and sends booking.created. See
bookings.
-
Two kinds of credential
Servers use an API key (wk_) with the scopes read, write, send and admin, which
can be limited to some accounts. Browsers get an account token (wat_) that your
backend mints with a write-scope key: it reaches one account's routes for 60 seconds to 24
hours, 15 minutes by default.