A public REST API and a remote MCP server for sending email, managing domains and contacts, and running broadcasts — programmatically or from an AI agent.
Authenticate with a scoped API key from Settings → API Keys (hb_live_… / hb_test_…) as a Bearer token, or with an OAuth 2.1 access token (see below).
| Endpoint | Scope | Does |
|---|---|---|
| /api/v1/emails | emails:send | Send a single email, or send/manage a scheduled email (get status, cancel, reschedule). |
| /api/v1/emails/batch | emails:send | Send up to 100 emails in a single request. |
| /api/v1/domains | domains:read / domains:write | List sending domains, provision a new domain in a chosen region, verify DNS, and run a live SPF/DKIM/DMARC/MX audit. |
| /api/v1/contacts | contacts:read / contacts:write | List and add/update contacts (audience members), scoped to a brand. |
| /api/v1/broadcasts | broadcasts:send | Send a one-off broadcast to all active contacts of a brand — respects suppression lists and plan limits. |
| /api/v1/webhooks | domains:read / domains:write | List and register webhook endpoints for email and domain events. |
emails:sendemails:readdomains:readdomains:writeinbound:readcontacts:readcontacts:writebroadcasts:sendKeys are scoped to your organization and can be assigned any combination of the scopes above when you create them in Settings → API Keys.
Hanbai runs a remote MCP (Model Context Protocol) server so AI agents — Claude, Claude Desktop, or any MCP-compatible client — can send email, manage domains, and run broadcasts directly. Each tool call is forwarded to the REST API above with your bearer token, so the same scopes, rate limits, and audit trail apply.
Live connection metadata (including a copy-paste Claude Desktop config) is always up to date at GET /api/mcp/info.
send_emailsend_batch_emailget_email_statuscancel_emailreschedule_emailadd_domainverify_domainlist_domainsaudit_domainadd_contactlist_contactssend_broadcastFor MCP clients that support dynamic OAuth discovery instead of a pasted API key, Hanbai exposes standard OAuth 2.1 metadata with PKCE (S256) and dynamic client registration:
Authorization endpoint
/oauth/authorizeToken endpoint
/api/oauth/tokenDynamic client registration
/api/oauth/registerAuthorization server metadata
/.well-known/oauth-authorization-serverProtected resource metadata
/.well-known/oauth-protected-resourceRegister a webhook via /api/v1/webhooks to get notified of email and domain events instead of polling.
Create an API key from your dashboard settings and start sending in minutes.
Start Free Trial