AI
Reply classification settings, the opt-out review queue, the drafting endpoint and limits.
AI features
Two optional features: classifying replies to the mail you send, and drafting email text for a person to edit. Reply classification is off until your workspace turns it on, and drafting runs only when someone asks for a draft. The text a feature needs goes to Gatewae, Workwae's AI gateway, which forwards it to a language model provider that does not train on it.
| Feature | Sent |
|---|---|
| Reply classification | The reply's subject, the first 2,000 characters of its own text, and whether it carries standard auto-reply headers. An out-of-office reply is read once more, with the date it was sent, for its return date. |
| Drafting | The instructions, the draft so far and, when answering a message, that message's sender, subject and the start of its own text. |
Reply classification
Turn on aiReplyClassification with PATCH /v1/settings. New inbound mail in the inbox or junk that answers a message you sent through Workwae, matched by thread or by its In-Reply-To and References headers, is classified about a second after it is indexed. Mail more than seven days old when indexed is not classified. Turning the setting off drops queued replies unread.
Each result is stored as the message's classification and sent as message.classified:
kind:opt_out,auto_reply,bounceorhuman_reply, withoptOutProbability.autoReplyCategory, on auto-replies only: out of office, left the company, address changed, ticket acknowledgment, challenge-response, or other.returnDatefor out-of-office replies, left empty when the date is not real, falls before the day the reply was sent, or is more than a year after it.alternateContacts: up to five addresses a left-the-company or address-changed reply names, read from its text.outboxId: the send the reply answers.
Opt-outs and the review queue
optOutHandling decides what a detected opt-out from the send's own recipient does (probability 0.9 or more): off ignores it, review (the default) holds it in the review queue, and suppress suppresses it at once. Replies saying the person left or changed address always wait for review unless the setting is off. Unsubscribe links always suppress, whatever the setting.
The Suppression lists guide covers each mode in detail.
Drafting
POST /v1/ai/draft writes an email body from instructions (up to 2,000 characters) in text or markdown, and returns { text }. Optional context names the message being answered (accountId with replyToMessageId) and the draft so far (currentDraft). Nothing is sent or saved. It needs an API key with the write scope and the AI module in the tenant's plan (plan_module_unavailable otherwise).
Limits and errors
| Limit or reason | Meaning |
|---|---|
| Daily classification cap | Each workspace has a daily cap on classified replies; past it, replies wait for the next UTC day. |
rate_limited | Drafts have a per-minute limit per workspace; past it, 429 with Retry-After. |
ai_refused | The model declines the instructions. |
ai_unavailable | The AI gateway fails or does not answer in time. |
If the gateway fails, classification retries a reply later, backing off to an hour, for up to seven days. Every answered call counts toward aiCalls in your daily usage (GET /v1/usage).
Every route is in the AI reference.