Your project's mail, on your board.
One token per project. Password resets, receipts, and replies go out through a line you already own, show up in that line's Sent, and answers land on the board like any other mail. Built for side projects: a few hundred a day, not a marketing blast.
Get a token
In Switchboard, open Settings → Projects, pick the line, and press New token. The token is shown once. It can only send from that line, its Gmail "send as" aliases, and plus-addresses of them (you+app@gmail.com).
Send
curl https://api-production-c02e3.up.railway.app/v1/send \
-H "Authorization: Bearer sw_…" \
-H "content-type: application/json" \
-d '{
"to": "dana@example.com",
"subject": "Reset your SunnySky password",
"text": "Here is your link: https://sunnysky.app/reset/9f2a",
"html": "<p>Here is your <a href=\"https://sunnysky.app/reset/9f2a\">reset link</a>.</p>",
"from": "hello@sunnysky.app",
"replyTo": "you+sunnysky@gmail.com"
}'
// Node / Bun / Deno / edge functions
const r = await fetch('https://api-production-c02e3.up.railway.app/v1/send', {
method: 'POST',
headers: { authorization: `Bearer ${process.env.SWITCHBOARD_TOKEN}`, 'content-type': 'application/json' },
body: JSON.stringify({ to, subject: 'Your receipt', text, from: 'hello@sunnysky.app' }),
});
const { id, remaining } = await r.json();
| field | what it is |
|---|---|
| to | Required. One address or several, comma-separated. cc works the same way. |
| subject | Required, up to 500 characters. |
| text, html | One or both. With only html, a plain-text part is derived from it. 200 KB together. |
| from | Optional. The line's address (default), one of its verified Gmail "send as" aliases, or a plus-address of either. |
| replyTo | Optional. One of the same addresses. Use a plus-address to keep a project's replies together. |
| inReplyTo, threadId | Optional. Keep a message in an existing conversation. |
| idempotency_key | Optional, up to 64 characters. The same key on the same token within 24 hours returns the first send instead of a second copy, so a retry after a lost response is safe. Keys are this endpoint's own: the same key on /v1/approvals is a different record. A retry that arrives while the first attempt is still going out is a 429 — ask again in a moment. |
The response is { id, threadId, from, remaining: { token, line } }. Errors are JSON with an error string: 400 for a bad field, 401 for a missing or revoked token, 429 when a cap is reached, 409 when the line needs reconnecting in Switchboard.
Read replies
GET https://api-production-c02e3.up.railway.app/v1/inbox?to=you%2Bsunnysky%40gmail.com&since=2026-09-01T00:00:00Z&max=20 GET https://api-production-c02e3.up.railway.app/v1/messages/<id>
/v1/inbox lists mail addressed to one of the line's addresses, newest first, with sender, subject, date, and a snippet. Add unread=1 for only what's new. /v1/messages/:id returns the readable text of one message plus its messageId and inReplyTo headers, so a project or an agent can answer in the same thread with inReplyTo.
GET /v1/me says where the token stands: { line, token, cap, hold, paused, today, lineToday, lineCap, waiting, asking } — which line it is on, its name, its daily cap, and what it and the whole line have sent today. Mail is held for approval when either hold or paused is true; paused covers both the token's own switch and a pause on the whole line. waiting and asking are how many held messages and open requests it has, so today's remaining sends are cap - today - waiting.
Agents: held for approval
Make the token with kind Agent and every send is held instead of dispatched. The response is { held: true, id, status: "pending" }. The message appears under Approvals on the board and on the phone, with the agent's name, the recipient, and the text. On the board you can change the recipients, the subject, or the words before approving; the phone approves or discards it as written. Poll GET /v1/sends/:id for pending, sent, or discarded. Settings → Projects carries two switches per token, and neither is a revocation: approve holds that token's mail for you, and pause beside it holds everything the token does without taking the secret away. There is a pause for the whole line too, above its tokens. With every switch off a trusted agent sends straight out. Revoking the token stops it altogether.
Agents: ask before acting
Mail is not the only thing worth a second pair of eyes. POST /v1/approvals puts any decision in front of you — a deploy, a refund, a deletion — in the same Approvals queue, and the agent waits for your answer.
curl https://api-production-c02e3.up.railway.app/v1/approvals \
-H "Authorization: Bearer sw_…" \
-H "content-type: application/json" \
-d '{
"action": "deploy",
"summary": "Ship 3 commits to production",
"detail": { "branch": "main", "commits": "3", "tests": "412 passing" },
"risk": "high",
"idempotency_key": "deploy-9f2a"
}'
→ 200 { "id": "7c1e…", "status": "pending", "expiresAt": 1789050000000 }
| field | what it is |
|---|---|
| action | Required. A short slug for what you want to do: deploy, refund, delete_records. Lower-case letters, digits, - and _, up to 40 characters. |
| summary | Required. The one line the human reads, up to 200 characters. |
| detail | Optional evidence, shown in the reading pane: a string up to 4,000 characters, or up to 20 key/value pairs (keys 40 characters, values 500). |
| risk | Optional. low, normal (the default), or high. It travels with the request so you can see what kind of answer is wanted. |
| idempotency_key | Optional, up to 64 characters. The same key on the same token within 24 hours returns the same request, so a retry does not ask twice. |
| expires_in | Optional. Seconds an unanswered request stays open: 86,400 (a day) by default, 60 at the least, 604,800 (a week) at the most. |
It appears under Approvals beside the held mail, with the agent's name, the action, the summary, and the evidence, and a push arrives if you have them on. You approve or deny it, with a note if you want to say why.
Poll GET /v1/approvals/:id for the outcome:
→ 200 { "id": "7c1e…", "kind": "ask", "status": "approved", "action": "deploy",
"summary": "Ship 3 commits to production", "risk": "high",
"note": "after the release notes go out",
"createdAt": 1788963600000, "answeredAt": 1788964020000 }
The status is pending, approved, denied, or expired, and note carries whatever the person typed. The same route reads a held send, so one loop follows both kinds; GET /v1/sends/:id keeps its own shape for anything already written against it. An id belonging to another token is a 404.
Fifty requests may wait from one token at a time; the fifty-first is a 429 until some are answered. Requests are not sends, so they never spend the daily send cap.
MCP server
One config block gives Claude Code, Claude Desktop, or any MCP client the whole loop: whoami, check_inbox, read_message, send, reply, wait_for_reply, send_status, ask_permission, check_permission.
{
"mcpServers": {
"switchboard": {
"command": "node",
"args": ["/path/to/switchboard/packages/mcp/index.js"],
"env": { "SWITCHBOARD_TOKEN": "sw_…" }
}
}
}
The server lives at packages/mcp in the repository (run npm install there once). It is not on npm: the name is undecided, so the config above runs the file where it sits. It talks to the same API with the same token, so the approval rules above apply: an Agent token's send returns held: true, wait_for_reply polls the agent's address until an answer lands, and ask_permission raises a request that is not mail — blocking until you answer when it is called with wait, and handing back an id for check_permission otherwise.
Limits, stated plainly
- 200 sends per token per day by default, and 450 per line across all its tokens. Gmail's own ceiling is 500 a day on a free account and 2,000 on Google Workspace; the board stays under it so your normal mail keeps flowing.
- Reputation is Gmail's. That's the point: no DNS, no warm-up, no deliverability guesswork. It also means Gmail's rules apply. Transactional and personal mail only; marketing blasts belong on a marketing service.
- 200 KB of body,
textandhtmlcounted together. A bigger message is a413rather than a truncated one; put the rest behind a link. - Thirty reads a minute per token on
/v1/inboxand/v1/messages/:id. Past that the answer is a429withretryAfterSec. Each inbox call spends a real slice of the line's Gmail budget, so a loop that polls flat out parks your own mail behind it: look every fifteen seconds, and back off when told to. - Fifty waiting at a time per token: fifty held messages, and fifty approval requests, counted separately. A held message reserves one of the day's sends the moment it is queued, and gives it back only if you discard it — so fifty waiting messages are fifty sends already spoken for. A request is not a send and never touches the cap. The board is a queue a person reads, not a spool.
- Everything is on the board. Sent mail is in the line's Sent, replies arrive like any other message, and Settings shows a meter of today's sends and the last few, per token.
hello@sunnysky.app without a second mailbox? Put a custom domain on the board in about ten minutes.