# Wingmarked > Wingmarked reviews outgoing email after the sender presses send and before it is delivered. For an AI agent's mail it is an approval layer: each message is checked, then sent from the sender's own Microsoft 365 mailbox or held for a named person to approve. Reviewed against the code on October 21, 2026. Web page: https://wingmarked.com/agents. ## Give your AI agents authority with boundaries, and a record. An agent that sends email acts on your firm's behalf, so five things should be distinct: who the agent is, what it was permitted to do, what each message was checked against, who approved the consequential ones, and the evidence of what actually went out. Wingmarked is that layer for agent email. Each message is checked against the thread, the attachments and what your firm already promised; it then goes out from the sender's own Microsoft 365 mailbox, or waits for a named person. Nothing is delivered until the check passes, and the wrong email is stopped before it is sent. ## What Wingmarked does for agent mail - **The gate.** Every message your agent sends through Wingmarked is checked before delivery: rules, your firm's policy, and an AI review that reads up to three earlier messages on the thread and the text of PDF and Word attachments. The message then goes as written, gets a minimal exact fix, is held for a person, or is blocked. - **No new commitment.** Agent mail sends on its own only when the check passes it, it makes no new commitment to the recipient, and its category is switched on. A new commitment is a date, an amount, an approval, a waiver, a denial or a term the firm has not already given that person. Anything else holds for the person who owns that kind of decision. - **Never delegable.** Some mail always waits for a person: fair housing, accommodation and assistance-animal requests, deposit deductions and itemizations, eviction, move-out and non-renewal notices, legal notices, and anything with legal exposure of medium or higher. It is judged by the message's own words as well as the category your agent sends, so a wrong label never lets one through. The list is code, not a setting. - **Fail closed.** If the automatic checks cannot run (a timeout, an AI outage, or only the rules ran), agent mail holds for a person with the sentence "Automatic checks could not run, so this waits for a person." Mail a person wrote follows the firm's own setting. Agent mail never goes out unchecked. - **Caps.** Each agent key has a daily send cap (200 by default) and a cap per recipient (5 a day by default). Mail over a cap is held, not refused, so nothing is lost and nothing loops. The key's owner hears about it once that day. - **The pause button.** One tap on the agent page pauses a key. A paused key's mail holds for a person, and resuming the key does not release that mail on its own. Pause and resume are on the audit log. - **The ledger.** The agent page keeps a ledger of what went out for each person and what waits on them, by category. Each decision owner gets one email a day listing both, skipped when both are empty. Every message is marked as agent-sent in the record and in the audit log, which the database will not let anyone change. - **Shadow first.** Before your agent sends anything, check_draft in shadow mode records what Wingmarked would have done with each draft and later matches it to what a person actually sent on the same thread. Nothing is sent, held or announced. Two weeks of that gives you a measured number in place of a guess. ## Quickstart 1. **Sign in as your Microsoft 365 admin.** Open /start and continue with Microsoft 365. That creates your firm's Wingmarked with a 30-day trial of the Wingman plan, which includes the API and MCP, and runs the free 90-day audit, read only. Nothing about your mail changes. 2. **Make an agent key.** Make a key at /admin/api, then mark it as an agent key at /admin/agent so the agent rules above apply to it. Send it as Authorization: Bearer followed by the key. 3. **Check drafts in shadow.** Call check_draft with mode shadow on every draft your agent writes. The sender's address must be in one of your Microsoft 365 domains. The agent page shows what Wingmarked would have sent and what it would have held, and why. 4. **Send through the gate.** When the shadow numbers say so, send with send_through_wingmarked or POST /v1/messages. Sending needs the mail flow that /setup creates in your Microsoft 365, because delivery goes back through your own tenant, which signs the message with DKIM. Poll the status URL to see whether it went or is held. ### curl: check a draft in shadow ```bash curl -s https://wingmarked.com/v1/check \ -H "Authorization: Bearer $WINGMARKED_KEY" \ -H "Content-Type: application/json" \ -d '{ "mode": "shadow", "category": "maintenance", "from": "Dana Lee ", "to": ["marcus@client.example"], "subject": "RE: Water heater", "text": "Hi Marcus,\n\nThe plumber will be there Tuesday between 10 and 12." }' # {"ok":true,"mode":"shadow","id":"...","recorded":true} ``` ### curl: preview the verdict ```bash curl -s https://wingmarked.com/v1/check \ -H "Authorization: Bearer $WINGMARKED_KEY" \ -H "Content-Type: application/json" \ -d '{ "from": "dana@yourfirm.example", "to": ["marcus@client.example"], "subject": "RE: Deposit", "text": "Hi Marcus,\n\nWe will return $2,400 of your deposit by Friday." }' # {"ok":true,"verdict":"...","explanation":"...","findings":[...],"edits":[...],"timedOut":false,"wouldSend":...} ``` ### curl: send through the gate ```bash curl -s https://wingmarked.com/v1/messages \ -H "Authorization: Bearer $WINGMARKED_KEY" \ -H "Content-Type: application/json" \ -d '{ "category": "maintenance", "from": "dana@yourfirm.example", "to": ["marcus@client.example"], "subject": "RE: Water heater", "text": "Hi Marcus,\n\nThe plumber will be there Tuesday between 10 and 12." }' # 202 {"ok":true,"id":"...","status":"received","statusUrl":"https://wingmarked.com/v1/messages/..."} curl -s "https://wingmarked.com/v1/messages/$ID" -H "Authorization: Bearer $WINGMARKED_KEY" # {"status":"released",...} once it went, or {"status":"held_sender","explanation":"...",...} while it waits ``` ### TypeScript ```ts const WM = "https://wingmarked.com"; const headers = { Authorization: `Bearer ${process.env.WINGMARKED_KEY}`, "Content-Type": "application/json", }; const draft = { category: "maintenance", from: "Dana Lee ", to: ["marcus@client.example"], subject: "RE: Water heater", text: "Hi Marcus,\n\nThe plumber will be there Tuesday between 10 and 12.", }; // Shadow: Wingmarked records what it would have done. Nothing is sent. await fetch(`${WM}/v1/check`, { method: "POST", headers, body: JSON.stringify({ ...draft, mode: "shadow" }), }); // Send: checked, then delivered from the sender's mailbox or held for a person. const res = await fetch(`${WM}/v1/messages`, { method: "POST", headers, body: JSON.stringify(draft) }); const { id, statusUrl } = await res.json(); const status = await (await fetch(statusUrl, { headers })).json(); console.log(id, status.status, status.explanation); ``` ### Python ```python import os import requests WM = "https://wingmarked.com" headers = {"Authorization": f"Bearer {os.environ['WINGMARKED_KEY']}"} draft = { "category": "maintenance", "from": "Dana Lee ", "to": ["marcus@client.example"], "subject": "RE: Water heater", "text": "Hi Marcus,\n\nThe plumber will be there Tuesday between 10 and 12.", } # shadow: Wingmarked records what it would have done. nothing is sent. requests.post(f"{WM}/v1/check", json={**draft, "mode": "shadow"}, headers=headers, timeout=30) # send: checked, then delivered from the sender's mailbox or held for a person. sent = requests.post(f"{WM}/v1/messages", json=draft, headers=headers, timeout=30).json() status = requests.get(sent["statusUrl"], headers=headers, timeout=30).json() print(sent["id"], status["status"], status.get("explanation")) ``` ## The MCP endpoint POST /v1/mcp is an MCP server over Streamable HTTP: JSON-RPC 2.0, one request per POST, JSON responses, protocol version 2025-06-18. It takes the same bearer key as the REST endpoints and offers the three tools below. A tool's own refusal, such as a sender outside your domains, comes back as a tool result the model can read and act on. - **check_draft**: The verdict Wingmarked would reach on a draft (pass, autofix, hold_sender, hold_reviewer or block), the findings with one plain sentence each, and the exact find-and-replace edits it would make. Nothing is stored. With mode shadow it records what it would have done and answers with the record's id only. - **send_through_wingmarked**: Sends a message through the gate. Returns an id and a status URL to poll. Nothing is delivered until the check passes. - **recall**: What the firm has already told a person, from its own sent mail: dates, amounts, terms and deadlines, each with the sentence it came from and the date. Read it before writing to someone. - **Reviewers.** A reviewer tool's integration key gets one tool on the same endpoint, act_on_hold. A reviewer who wants to work their own queue from Claude connects a separate server, /mcp/reviewer, which signs them in with OAuth instead of a key. ```bash claude mcp add --transport http wingmarked https://wingmarked.com/v1/mcp --header "Authorization: Bearer wm_live_..." ``` ## With any sending provider - **Check, then send with what you have.** check_draft sends nothing, so it can sit in front of whatever sends your agent's mail today: Microsoft Graph, an SMTP server or a transactional email API. Call it with the draft. Send when the verdict is pass, or autofix after you apply the returned edits. Otherwise give the draft to a person. Treat timedOut as a reason to wait for a person, the way the gate does. - **Who stops the mail.** With your own provider, Wingmarked answers and your code decides. The no-new-commitment rule, the never-delegable list, the caps, the pause button, fail closed and the ledger are enforced only on mail sent through Wingmarked. A preview answers with the gate's verdict alone; shadow mode is where the agent rules are measured. - **The sender's domain.** The sender's address must be in one of the domains of the Microsoft 365 tenant your Wingmarked is connected to, for a check as for a send. A draft from any other domain is refused. ## Works with - **Microsoft 365.** The hairpin: your tenant's transport rule sends outgoing mail to the Wingmarked relay, and the checked message goes back to your tenant, which signs it with DKIM and delivers it from the sender's own mailbox. - **The API and MCP gate.** POST /v1/check, POST /v1/messages and POST /v1/mcp, from any language or agent framework that can make an HTTPS request with a bearer key. - **Claude.** Add the MCP server to Claude Code with one command. A reviewer can work their own queue from claude.ai, the desktop app or Claude Code. ## Pricing The 90-day audit is free: your Microsoft 365 admin signs in, and Wingmarked reads the last 90 days of sent mail, read only, and shows every email it would have stopped. A new firm gets a 30-day trial of Wingman, which includes the API and MCP. After the trial, Shadow is free forever and holds nothing, and the API is not part of it. Gate is $12 per seat per month. Wingman, with the API and MCP, is $29 per seat per month. Senders are seats, with a minimum of 5; reviewers are free. Mail never stops for non-payment. ## Not built yet - **Microsoft 365 first.** Sign-up without us is for Microsoft 365. A firm on Google Workspace starts by writing to us. - **A person grants access once.** An agent cannot sign up on its own. A Microsoft 365 admin consents once, and an admin makes the key. - **Categories are yours.** Wingmarked does not sort mail into categories on its own. A message without one is general, and agent mail sends on its own only in a category an admin has switched on. - **No request rate limit yet.** Beyond the send caps on agent keys, the API has no rate limit yet. Use one key per agent so the record says which one sent what. ## Security How Wingmarked handles your mail: what is stored and for how long, the Microsoft permissions, who processes your data, and the audit log. https://wingmarked.com/security --- # API and MCP Agents send mail through the same gate as everyone else. A message submitted here is stored, checked, and then passed, fixed, held or blocked exactly like one sent from Outlook or Gmail; it leaves the tenant from the sender's own mailbox through the hairpin. Nothing is delivered until the check passes. ## Keys An admin makes a key at `/admin/api` (one per integration; shown once; `api_key.created` and `api_key.revoked` in the audit log). Send it as `Authorization: Bearer wm_live_…`. A revoked key gets 401. ## REST **`POST /v1/messages`** → `202 {ok, id, messageId, status: "received", duplicate, statusUrl}` ```json { "from": "Dana Lee ", "to": ["Marcus "], "cc": [], "bcc": ["review@yourfirm.wingmarked.com"], "subject": "Keys for Saturday", "text": "Hi Marcus, ...", "html": "

Hi Marcus, ...

", "attachments": [{ "filename": "lease.pdf", "contentType": "application/pdf", "content": "" }], "inReplyTo": "<...>", "references": ["<...>"], "messageId": "" } ``` - `from` must be an address in the tenant's domains (403 otherwise). `to` and `subject` and `text` are required; at most 100 recipients; attachments up to 25 MB each. - A `bcc` of `review@.wingmarked.com` or a reviewer alias routes the message to that reviewer first, as it does from Outlook. - The same `messageId` twice is acknowledged with `200` and `duplicate: true`, never stored twice. - `409 loop` when the bytes already carry a Wingmarked id; `503 retry` when storage is unavailable (nothing was accepted). **From an agent key**: an admin marks a key as an agent on `/admin/agent`. Its messages may carry `category` and `context.facts` (the same shapes as `POST /v1/check`); the facts are sealed with the tenant key and deleted with the body. Agent mail is checked like anyone's and then decided by the agent rule: it sends on its own only when the check passes it, it makes no new commitment to the recipient, its category is switched on, and nothing in it must always wait for a person (fair housing, an accommodation or assistance-animal request, a deposit deduction or itemization, an eviction, move-out or non-renewal notice, a legal notice, legal exposure of medium or higher; judged by its words as well as its category). Otherwise it holds for the category's decision owner (else the sender), who approves it from Held. It fails closed: a timeout, an AI outage or a rules-only check holds it whatever `fail_mode` says. A paused key, or one over its daily cap (default 200) or its per-recipient cap (default 5 a day), still gets `202`; the mail holds and the key's owner hears once that day. Nothing an agent sends is ever refused for being paused or over a cap, so nothing is lost. **`GET /v1/messages/{id}`** → `{ok, id, messageId, status, subject, receivedAt, releasedAt, verdict, tier, explanation, findings, suggestions, hold, verifyUrl}`. `status` follows the hold state machine (`received`, `checking`, `pass`, `autofix`, `held_sender`, `held_reviewer`, `in_review`, `releasing`, `released`, `delivered`, `blocked`, `closed_unsent`, …). `hold` carries the hold's id, kind, state and resolution; the sender decides from `/held`, a reviewer from `/review`. **`GET /v1/contacts/{address}`** → `{ok, contact: {id, address, name, role, firstSeenAt, lastSeenAt, messageCount}, commitments: [{id, kind, text, state, dueAt, amount, quote, sentAt, subject}], notes: [{id, body, author, at}], open, heldNow}`: what the company has told this person, from its own sent mail, each line with the sentence it came from and the date and subject of the message. Private notes are never included; a Private-tier message's commitments were never read unless the sender opted in. `404` for an address the company has never written to. **`POST /v1/check`** → the verdict Wingmarked would reach on a draft, without storing or sending it: `{ok, verdict, tier, explanation, findings, suggestions, edits, droppedEdits, route, reviewer, timedOut, wouldSend}`. `edits` are exact find-and-replace pairs against `text`; apply them yourself or send the draft and let the gate apply them. `suggestions` are lines memory thinks the sender may want to add (`text`, `reason`, `citation` with the quote and id of the open commitment or note it rests on, optional `insert_after` anchor); they never change the verdict. A finding of type `promise_conflict` means the draft contradicts something the company already told this recipient; its `evidence` is the sentence that was promised. `POST /v1/check` also takes three fields for the agent lane: - `mode`: `"preview"` (the default, everything above) or `"shadow"`. Any other value is a `400`. - `category`: your own word for the kind of mail (`maintenance`, `leasing`, `rent_reminder`, `deposit_deduction`, …), lowercased with spaces and hyphens as underscores; `general` when absent. - `context.facts`: up to 50 facts of record behind the draft, each `{key, value, source, as_of}` (`value` a string, number or boolean; `as_of` `YYYY-MM-DD` or ISO 8601). Stored sealed with the tenant key, deleted with message bodies at the tenant's retention, never put in memory, never logged or exported. In shadow, Wingmarked runs the full check and the commitment extraction on the draft, records what it would have done for `/admin/agent`, and answers only `{ok: true, mode: "shadow", id, recorded: true}`. Nothing is sent, held or announced, and the verdict is not returned, so the team's own sends are what get measured. Within 48 hours the draft is matched to what a person sent through Wingmarked on the same thread (send `inReplyTo` and `references` exactly as on the message being answered) to the same first recipient. Call it on every draft, before it goes into Outlook: ```json POST /v1/check { "mode": "shadow", "category": "maintenance", "from": "Dana Lee ", "to": ["Marcus "], "subject": "RE: Water heater", "text": "Hi Marcus,\n\nThe plumber will be at 412 Elm Street on Tuesday between 10 and 12.", "inReplyTo": "", "references": [""], "context": { "facts": [ { "key": "rent_status", "value": "current", "source": "Property system", "as_of": "2026-10-17" }, { "key": "owner_repair_limit", "value": 1000, "source": "Owner agreement", "as_of": "2026-10-01" } ] } } ``` ## MCP `POST /v1/mcp` is an MCP server over Streamable HTTP (JSON-RPC 2.0, one request per POST, JSON responses; notifications get `202`; no server-initiated stream, so `GET` is `405`). Protocol version `2025-06-18`. Same bearer key. Tools: - **`send_through_wingmarked`**: the body of `POST /v1/messages`, with `category` and `context.facts` from an agent key; returns the id and status URL as `structuredContent`. - **`check_draft`**: the body of `POST /v1/check`, including `mode`, `category` and `context`; returns the verdict, findings and edits as `structuredContent` and a short text summary, or in shadow only `{mode: "shadow", id, recorded: true}`. - **`recall`**: the company's memory of a person, the same record the wingman reads before a message goes out. With `address`, the whole cited record (as `GET /v1/contacts/{address}`); with `question` naming the person, an answer from that record with a citation for every claim, or "I don't have that." Call it before writing to someone. A tool's own refusal (a sender outside the domain, a missing field) comes back as a result with `isError: true` so the model can read it and try again. Claude Code: ``` claude mcp add --transport http wingmarked https://wingmarked.com/v1/mcp --header "Authorization: Bearer wm_live_…" ``` ## Reviewer tools A legal AI tool can act as a reviewer. An admin adds it at `/admin/integrations` (a name and an https endpoint on the allowlist; it starts off), links a reviewer to it at `/admin/reviewers`, and makes its key there. The tool, or a small bridge the firm runs, does two things: receive the signed hold event, and call the actions API. ### The event `POST` to the endpoint, `Content-Type: application/json`, with these headers: - `Wingmarked-Signature: t={unix seconds},v1={hex}`: HMAC-SHA256 of `"{t}.{raw body}"` with the integration's signing secret (`whsec_…`, shown once when the tool is added or the secret is rotated). - `Wingmarked-Event`: `hold.created`, `hold.updated`, `hold.resolved`, or `integration.test` for the test button. - `Wingmarked-Delivery`: the delivery id. ```json { "id": "…", "idempotency_key": "…", "event": "hold.created", "created_at": "2026-10-17T15:04:05.000Z", "tenant": { "id": "…" }, "hold": { "id": "…", "authority": "final_edit", "state": "held_reviewer", "expires_at": "…" }, "message": { "message_id": "<…>", "from": "dana@yourfirm.example", "to": ["marcus@client.example"], "cc": [], "subject": "RE: Deposit", "date": "…", "in_reply_to": "<…>", "references": ["<…>"], "text": "Hi Marcus, …", "html": "

Hi Marcus, …

" }, "thread": [{ "from": "marcus@client.example", "date": "…", "subject": "Deposit", "text": "…" }], "findings": [{ "type": "number_mismatch", "severity": "high", "explanation": "…", "evidence": "…" }], "attachments": [{ "filename": "statement.pdf", "content_type": "application/pdf", "size": 48213, "url": "https://wingmarked.com/i/a/…", "expires_at": "…" }] } ``` - `thread` holds up to three earlier messages on the thread. Attachment links each fetch one file and expire after 15 minutes. - Never in an event: reviewer comments, tracked changes, or any reviewer's identity. - The test event has the same shape with `hold`, `message` null and the lists empty. Nothing is sent, test or hold, while the tool is off. - Answer with any 2xx. Anything else, a timeout or a redirect (never followed) is retried with backoff for 24 hours, then the delivery stops and shows on `/admin/integrations`, where an admin can try it again. - The same `idempotency_key` can arrive more than once; act on it once. ### Verifying the signature Refuse a body whose timestamp is more than five minutes from your clock, and compare in constant time. Verify against the raw bytes, before parsing. Node: ```js import { createHmac, timingSafeEqual } from "node:crypto"; export function verify(secret, rawBody, header, now = Math.floor(Date.now() / 1000)) { const m = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header ?? ""); if (!m || Math.abs(now - Number(m[1])) > 300) return false; const want = Buffer.from(createHmac("sha256", secret).update(`${m[1]}.${rawBody}`).digest("hex")); const got = Buffer.from(m[2]); return want.length === got.length && timingSafeEqual(want, got); } ``` Python: ```python import hashlib, hmac, re, time def verify(secret: str, raw_body: bytes, header: str, now: int | None = None) -> bool: m = re.fullmatch(r"t=(\d+),v1=([0-9a-f]{64})", header or "") if not m or abs((now or int(time.time())) - int(m[1])) > 300: return False want = hmac.new(secret.encode(), m[1].encode() + b"." + raw_body, hashlib.sha256).hexdigest() return hmac.compare_digest(want, m[2]) ``` Rotating the secret on `/admin/integrations` signs every later event with the new one at once; the old one stops verifying. ### Acting on a hold **`POST /v1/holds/{hold.id}/actions`** with `Authorization: Bearer wm_rev_…` (the integration's key, not an API key): ```json { "action": "approve", "edits": [{ "find": "$4,500", "replace": "$4,050", "reason": "Match the statement in the thread." }], "comment": "The carpet charge is in the move-out photos.", "reviewer": { "display_name": "Dana Ruiz", "title": "Partner, Ruiz & Hale LLP", "is_counsel": false }, "idempotency_key": "your-unique-id" } ``` → `200 {ok, hold: {id, state}, applied_edits, dropped_edits: [{find, replace, reason}], duplicate}` - `action` is `approve` (sends it from the sender's mailbox), `return` (back to the sender, who confirms) or `reject` (closed unsent). - `edits` are exact find-and-replace pairs against the original text, checked like Wingmarked's own: the text occurs once, the replacement is at most three times as long, a changed figure needs a `number_mismatch` finding with evidence in an attachment or the thread, and nothing in the signature or the quoted history. Edits that fail are dropped, listed in `dropped_edits`, and the rest apply. - `reviewer` is the person who stands behind the call. On approve the mail is countersigned with their name and title ("Countersigned by Dana Ruiz, Partner, Ruiz & Hale LLP."), or carries nothing when `is_counsel` is true or the grant says Private. The tool is never named to the recipient. - `comment` is stored as a private comment for the sender; it never leaves. - The same `idempotency_key` returns the first response with `duplicate: true` and does nothing again; the same key on a different hold is `409`. - `401`: a missing or revoked key, or the tool is off. `404`: a hold not routed to this tool's reviewer in this tenant. `403`: approve on a hold whose grant is `return_to_sender`. `409`: the hold is no longer waiting for a reviewer. Every action is an audit row with the integration's id. ### MCP `POST /v1/mcp` with the integration key offers one tool, **`act_on_hold`**: the body above plus `hold_id`. It runs the same checks as the REST endpoint and answers with the same object as `structuredContent`; a refusal comes back with `isError: true` and its HTTP status. ``` claude mcp add --transport http wingmarked-review https://wingmarked.com/v1/mcp --header "Authorization: Bearer wm_rev_…" ``` ## Connect to Claude (reviewers) A reviewer, not a tool, can work their own queue from Claude (claude.ai, the desktop app, Claude Code) through a second MCP server at `https://wingmarked.com/mcp/reviewer`. No key: the server is behind OAuth 2.1 with PKCE and dynamic client registration, so Claude registers itself, sends the reviewer to sign in on the site the usual way, and gets a one-hour token bound to that reviewer in that tenant (refresh tokens rotate; revoke on `/account`). Discovery at `/.well-known/oauth-authorization-server` and `/.well-known/oauth-protected-resource/mcp/reviewer`; `/oauth/register`, `/oauth/authorize`, `/oauth/token`, `/oauth/revoke`. API keys and integration keys are refused on this path. Tools, all scoped to the signed-in reviewer's own queue: **`list_holds`** (no bodies), **`get_hold`** (text, thread, findings, attachments as 15-minute links, authority, tier), **`act_on_hold`** (`approve` | `return` | `reject`, `edits` as find-and-replace checked exactly as the actions API checks them, a private `comment`, `reason` for reject, `idempotency_key`), **`add_comment`**. Approve on a `return_to_sender` hold, or on a hold with a never-overridable finding, is a 403 result. Every call is an audit row naming the client. Claude Code: ``` claude mcp add --transport http wingmarked-reviewer https://wingmarked.com/mcp/reviewer ``` ## What the API cannot do - It cannot deliver without the check, bypass a hold, or release on a reviewer's behalf. - It cannot read or export mail; that is the admin console's job, with the Private tier's rules. - There is no rate limit beyond the key yet; one key per integration keeps the audit trail honest.