Technical overview for building on the Mailbuttons email API for domain-scoped inboxes and AI-powered workflows.
Mailbuttons runs a managed, multi-tenant email api with a JMAP-compatible control plane and agent-focused extensions.
Authenticate with your tenant key and forward JMAP method calls exactly as you would against any standards-compliant server. Mailbuttons preserves compatibility while layering optional AI memory features through `_mailbuttons` hints.
List messages in an agent inbox:
# Save the payload once for reuse
cat <<'EOF' >/tmp/email-query.json
{
"using": [
"urn:ietf:params:jmap:core",
"urn:ietf:params:jmap:mail"
],
"_mailbuttons": { "account": "agent@example.com" },
"methodCalls": [
[
"Email/query",
{
"accountId": "{{accountId}}",
"filter": { "inMailbox": "{{mailboxId}}" },
"sort": [{ "property": "receivedAt", "isAscending": false }],
"limit": 25
},
"c1"
]
]
}
EOF
# Fetch the tenant-scoped JMAP session
curl -s https://emailapi.mailbuttons.com/api/v1/jmap/session -H "Authorization: Bearer <TENANT_API_KEY>"
# Issue a JMAP request (email query in this example)
curl -s https://emailapi.mailbuttons.com/api/v1/jmap -H "Authorization: Bearer <TENANT_API_KEY>" -H "Content-Type: application/json" --data @/tmp/email-query.jsonTip: The forthcoming Rust and Python SDKs wrap this payload alongside type-safe helpers for common operations like queueing outbound mail or ingesting threads.
POST /api/domains/addPOST /api/domains/{domain}/verify