Manage Fastmail mail, mailbox, identity, contact, and calendar workflows through JMAP API calls with safe batching and token hygiene.
On first use, read setup.md for account integration preferences, activation rules, and credential handling.
User needs to automate Fastmail through API calls: mailbox management, message search, draft/send flows, identity settings, contact operations, or calendar events. Agent handles capability discovery, safe request construction, and high-impact confirmation.
Memory lives in ~/fastmail-api/. See memory-template.md for structure.
~/fastmail-api/
├── memory.md # Account context, IDs, and operating preferences
├── request-log.md # High-impact API actions and outcomes
└── snapshots/ # Optional payload backups before bulk writes
Use these files when you need details beyond core operating rules.
| Topic | File |
|---|---|
| Setup flow | setup.md |
| Memory template | memory-template.md |
| Session and method call patterns | jmap-patterns.md |
| Mailbox and message workflows | mail-workflows.md |
| Contacts and calendar operations | calendar-contacts.md |
| Error handling and recovery | troubleshooting.md |
curljqFASTMAIL_API_TOKENFASTMAIL_API_BASE (defaults to https://api.fastmail.com/jmap/api)Never commit bearer tokens to repository files, shell history, or shared logs.
~/fastmail-api/memory.md for account ID, preferred defaults, and workflow context~/fastmail-api/request-log.md for high-impact action history~/fastmail-api/snapshots/ for payload backups before bulk updatesapiUrl, primaryAccounts, and capability support.curl -sS https://api.fastmail.com/jmap/session \
-H "Authorization: Bearer $FASTMAIL_API_TOKEN" | jq
using capabilities and account-specific IDs in each method call set.clientCallId values so retries can be traced safely.curl -sS "${FASTMAIL_API_BASE:-https://api.fastmail.com/jmap/api}" \
-H "Authorization: Bearer $FASTMAIL_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"using": ["urn:ietf:params:jmap:mail", "urn:ietf:params:jmap:core"],
"methodCalls": [
["Mailbox/get", {"accountId": "u123", "ids": null}, "c1"]
]
}' | jq
Email/query plus Email/get windows over full mailbox dumps.~/fastmail-api/snapshots/.notCreated, notUpdated, and method-level errors after every write.Mailbox/get, Email/get, Contact/get, CalendarEvent/get) to confirm final state.Before bulk updates, deletes, send flows, or identity changes:
using causes method failures that look like auth issues.notUpdated hides partial failure.Only the official Fastmail JMAP endpoints below are used by this skill.
| Endpoint | Data Sent | Purpose |
|---|---|---|
https://api.fastmail.com/jmap/session | Bearer token in Authorization header | Discover API URLs, capabilities, and account IDs |
https://api.fastmail.com/jmap/api | JMAP method payloads for mail, mailbox, identity, contacts, and calendar operations | Execute read and write workflows |
No other data is sent externally.
Data that leaves your machine:
Data that stays local:
~/fastmail-api/memory.md~/fastmail-api/request-log.md~/fastmail-api/snapshots/This skill does NOT:
By using this skill, mailbox and calendar operation data is sent to Fastmail infrastructure. Only install if you trust Fastmail with this operational data.
Install with clawhub install <slug> if user confirms:
api - Build robust HTTP request and response workflows for complex APIsoauth - Handle token lifecycle and secure delegated authorization flowsmail - Plan high-quality email workflows, tone, and delivery structurewebhook - Orchestrate event-driven integrations that react to API-side changesclawhub star fastmail-apiclawhub syncZIP package — ready to use