API Documentation
REST API reference, MCP Server integration, and examples for bot email automation.
Quick Start
Get a bot email address in one API call. Username is optional — omit it for a random address.
Random address
Custom username
Save the apiKey — you'll need it for all inbox operations.
Create Account
Creates a new bot email account. No authentication required.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
username | string | No | Lowercase letters, digits, hyphens, underscores. Omit for a random 7-digit prefix. |
Response
Errors
| Status | Reason |
|---|---|
| 409 | Username already taken |
| 400 | Invalid username characters |
Get Inbox
Returns all emails in the inbox, newest first.
Authentication
Example
Response
Get Email
Fetches the full content of a single email by ID, including HTML body and attachments.
Response fields
| Field | Description |
|---|---|
id | Unique email identifier |
from | Sender address |
to | Recipient (your bot) |
subject | Subject line |
timestamp | ISO 8601 timestamp |
bodyText | Plain text body |
bodyHtml | HTML body |
attachments | Array of attachment objects with downloadUrl |
Delete Email
Delete single email
Permanently deletes a specific email and its attachments.
Clear entire inbox
Deletes all emails in the inbox. Irreversible.
Both require Authorization: Bearer {api-key}.
Webhooks
Register a URL to receive a POST request whenever an email arrives in your inbox.
Request body
| Parameter | Required | Description |
|---|---|---|
botEmail | Yes | Your bot's email address |
webhookUrl | Yes | HTTPS endpoint to POST to |
apiKey | Yes | Your API key |
Example
MCP Server
Integrate with Claude Desktop and other Model Context Protocol clients. The MCP server lets Claude create and manage bot email accounts through conversation.
Installation
Claude Desktop config
Edit your config file — macOS: ~/Library/Application Support/Claude/claude_desktop_config.json | Windows: %APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after saving.
Available tools
| Tool | Description |
|---|---|
create_bot_email | Create a new bot email account |
get_emails | List all emails in an inbox |
get_email_by_id | Fetch a specific email by ID |
delete_email | Delete a specific email |
register_webhook | Register a push notification URL |
OpenClaw Skill
Native integration for OpenClaw agents. Install in one command and manage bot emails through conversation.
Install
Usage
Features
- Zero dependencies — pure implementation, no external packages
- Complete API coverage — all BotEmail.ai endpoints
- Automatic triggering — OpenClaw knows when to use it
- Code extraction — built-in verification code parsing
- Webhook support — push notifications for incoming emails
Examples
Create account and check inbox
Extract verification code from latest email
Common use cases
- Testing signup flows — verify email verification works in your app
- CI/CD automation — end-to-end email testing in pipelines
- 2FA code retrieval — automatically extract one-time codes
- Monitoring — watch for specific emails or alerts
- Data collection — aggregate emails from multiple sources
Error Codes
| Status | Error | Resolution |
|---|---|---|
| 400 | Bad Request | Invalid username — use lowercase letters, digits, hyphens, underscores only |
| 401 | Unauthorized | Missing or malformed Authorization header |
| 403 | Forbidden | API key doesn't match the email account |
| 404 | Not Found | Email or account doesn't exist |
| 409 | Conflict | Username already taken — choose a different one |
| 429 | Too Many Requests | Rate limit exceeded — back off and retry |
| 500 | Server Error | Contact [email protected] |
Rate Limits
| Tier | Requests / day | Accounts | Retention |
|---|---|---|---|
| Free | 1,000 | 1 | 6 months |
Need higher limits or multiple accounts? Email [email protected].
Security
Each bot email has a unique API key that acts as both authentication and authorization. Keep it secret.
Important: Anyone with a bot's API key can read and delete all its emails. Treat it like a password.
Lost your API key?
Contact [email protected] to verify ownership and get a new key issued.
Webhook security
Always use HTTPS for webhook endpoints. Validate incoming webhook payloads using your webhook signing key.
Dashboard JSON
View your inbox or a specific email as raw JSON by appending ?json=true to any dashboard URL.
Full inbox
Single email
You can also click the RAW JSON button in the dashboard UI.
Support
- Email: [email protected]
- GitHub Issues: Report a bug
- MCP Server: GitHub Repository