Skip to content

Email Sending API

Send transactional emails with HTML or plain text content via the Bismuth Email Sending API. Supports CC/BCC recipients and file attachments (base64-encoded, max 25MB per file). Emails are delivered using Resend and charged at $0.01 USDC per call.

Free test endpoint: GET /send/test at https://x402-email-api-production.up.railway.app — returns fixture data, no real email sent, no wallet required. Paid endpoint: POST /send — $0.01 USDC on Base per call.

ParameterTypeRequiredDefaultDescription
tostringYesRecipient email address
subjectstringYesEmail subject (max 998 characters, RFC 5321)
bodystringYesEmail body — HTML or plain text (max 100 KB); HTML auto-detected
reply_tostringNoReply-to address for recipient responses
ccstring[]NoCC recipients — list of email addresses
bccstring[]NoBCC recipients — list of email addresses
attachmentsobject[]NoFile attachments (see Attachments section below)

Each attachment in the attachments array has the following fields:

FieldTypeRequiredDescription
filenamestringYesFilename including extension (e.g. report.pdf)
contentstringYesBase64-encoded file content (max 25MB decoded)
content_typestringNoMIME type — auto-derived from filename if omitted
Terminal window
# Free test (no wallet required — no real email sent)
curl https://x402-email-api-production.up.railway.app/send/test
# Paid call — basic email
curl -X POST https://x402-email-api-production.up.railway.app/send \
-H "Content-Type: application/json" \
-d '{"to": "[email protected]", "subject": "Hello from Bismuth", "body": "<h1>Hello</h1><p>Sent via Bismuth email API.</p>", "reply_to": "[email protected]"}'
# Paid call — email with CC, BCC, and attachment
curl -X POST https://x402-email-api-production.up.railway.app/send \
-H "Content-Type: application/json" \
-d '{
"subject": "Q1 Report",
"body": "<p>Please find the Q1 report attached.</p>",
"cc": ["[email protected]"],
"bcc": ["[email protected]"],
"attachments": [{"filename": "report.pdf", "content": "JVBERi0xLjQ..."}]
}'

“Send an email to [email protected] with the subject ‘Meeting Notes’, CC the team lead, and attach the PDF report.”

{
"tool": "x402_send_email",
"arguments": {
"subject": "Meeting Notes",
"body": "<h1>Meeting Notes</h1><p>Here are the notes from today's meeting.</p>",
"reply_to": "[email protected]",
"cc": ["[email protected]"],
"attachments": [
{
"filename": "notes.pdf",
"content": "JVBERi0xLjQ...",
"content_type": "application/pdf"
}
]
}
}

On success, the API returns:

{
"success": true,
"message_id": "re_abc123xyz"
}
FieldTypeDescription
successbooleantrue when the email was accepted for delivery
message_idstringResend message ID for delivery tracking
CodeMeaning
402Payment required — x402 handshake (handled automatically by MCP server)
422Invalid email address, subject too long, body exceeds 100 KB, invalid base64 attachment, or attachment exceeds 25MB
429Daily wallet limit (10/day), per-domain limit (5/day), or free test rate limit (100/hour per IP) exceeded
500Email provider authentication error
503Email provider quota exhausted or temporarily unavailable