Outbound email — the tenant's own SMTP server (branded delivery).
Read an email channel's history-sync intent and progress
The mailbox HISTORY SYNC is the opt-in backfill of mail older than the live poller's 7-day window. This returns the channel's intent (`config.piping.history_sync`) merged with the runtime state the import job writes (`config.history_sync`) — one record, so the panel polls one endpoint while a run is in flight. A channel that has never synced reads as `status: idle` with zeroed counters, never null. A personal mailbox is readable only by its owner.
Start or resume an email channel's history sync
START the one-shot import (optionally moving `since` and any effect switch): the state is parked as `queued` and the job dispatched. `resume: true` continues a `paused` or `failed` run from its cursor, keeping its counters and its `total`. `resume: false` or absent starts a FRESH run — counters, cursor and `total` reset; the run first counts the window exactly (`phase: counting`), then imports (`phase: importing`). Mail already stored is never fetched again: it is probed, skipped and counted in `skipped`. A `paused` run may be resumed or fresh-started (discarding the pause). A run already `queued`/`running` is a 409. Authorisation: see `MailHistorySync.can_manage`. Gmail transport only — any other transport is refused with 422.
Stop an email channel's history sync for good
STOP: a `queued`, `running`, `paused` or `failed` run becomes `cancelled` and its cursor and page offset are CLEARED, so it cannot be resumed (use pause for that). The counters stay, for the final numbers. The worker sees the stop at the next page boundary. A run that already ended (`idle`, `completed`, `cancelled`) is returned unchanged. Authorisation: see `MailHistorySync.can_manage`.
Pause an email channel's history sync
PAUSE: a `queued`/`running` run becomes `paused`. The cursor, page offset and counters are kept, so `POST /history-sync {resume: true}` continues from the same message. The worker stops at the next page boundary. Authorisation: see `MailHistorySync.can_manage`.
The signed-in member's waiting mail (the Scheduled view)
Mail the member has scheduled and that has not left yet, plus any that FAILED to leave (access lost, provider refused three times) so it can be fixed or dropped. The few-second undo-window sends are not listed — they belong to the undo bar, not the folder. Own mail only; nobody sees a colleague's waiting mail. Ordered by send time.
Send a mail — after the undo window, or at a chosen time
EVERY mail Send goes through here. Without `send_at` the mail waits `UNDO_SECONDS` (5) and then leaves — the client shows 'Geri al' for that window and cancels with `DELETE`. With `send_at` it waits until then ('Şu saatte gönder'). A `send_at` carrying an offset (`Z`, `+03:00`) is that instant; a bare wall-clock time (`2026-10-06T09:00`) is read in the WORKSPACE timezone. It must be at least a minute ahead and at most a year.
The 'Şu saatte gönder' quick choices
Computed in the WORKSPACE timezone so 'tomorrow morning' is the workspace's morning: `later_today` (three hours on, on the hour — offered only while that is still today and no later than 20:00), `tomorrow_morning` (08:00) and `monday_morning` (08:00, unless tomorrow already is Monday). Instants are UTC; each preset also comes as the workspace's wall clock (`local`), with `today` and `now` on that clock, so a client builds a custom time (sent back as a bare wall-clock `send_at`) without timezone arithmetic of its own.
Change a waiting mail's time or words
Only while it is still `pending`. A new `send_at` follows the same rules as on create; giving one turns an undo-window send into a scheduled one. Own mail only — a colleague's reads as 404.
Cancel a waiting mail ('Geri al')
A `pending` or `failed` mail becomes `cancelled` and never leaves; its draft goes back to the drafts list and is returned as `draft`, so the composer can reopen on it at once. Once the mail has started to leave this is a 422. Own mail only.
Get the tenant SMTP settings (channel manager only)
The tenant's outbound SMTP configuration. The password is write-only (only `password_set` is reported).
Update the tenant SMTP settings (channel manager only)
Partial update of the tenant SMTP settings.
Send a test email through the tenant SMTP (channel manager only)
Sends a small probe email to verify the SMTP credentials. Defaults to the requesting admin's email.
Get the offline-email-notification settings (channel manager only)
When to email agents/contacts + the editable, multilingual templates. Admin only.
Update the offline-email-notification settings (channel manager only)
Partial update of the toggles + localized templates. Admin only.
Send a sample notification email (channel manager only)
Renders the agent or contact notification template with sample data and sends it to an address, to preview the template + SMTP end to end.
Get the email-piping (IMAP) settings (channel manager only)
The tenant's IMAP configuration for turning incoming emails into conversations. The password is write-only.
Update the email-piping (IMAP) settings (channel manager only)
Partial update of the IMAP settings + routing rules.
Test the IMAP connection (channel manager only)
Connect + authenticate to verify the IMAP credentials.
Fetch the mailbox now (channel manager only)
Queue an immediate mailbox fetch for the current tenant.