Skip to main content
View as Markdown

Send and receive your first threaded email quickly

Prerequisites​

  • Email ownership verified through OTP or OAuth at getmail.bot
  • An integration API key with read/write permissions; browser sign-in credentials expire within 24 hours
  • A recipient address you control
  • An active inbox on an enabled, verified sending domain, with its returned id and address

Export MAILBOT_API_KEY in your shell, then list your inboxes:

curl https://getmail.bot/v1/inboxes \
-H "Authorization: Bearer $MAILBOT_API_KEY"

Use an active inbox from the response. If you need a new one, create it:

curl -X POST https://getmail.bot/v1/inboxes \
-H "Authorization: Bearer $MAILBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username":"quickstart"}'

Export INBOX_ID with the returned data.id so both shell and SDK examples can read it. Save data.address as the inbox address; shared-domain addresses include an account suffix and should not be guessed.

A provisioned inbox does not mean outbound sending is enabled. Sending is gated separately, at send time:

  • Shared sandbox sending may be paused during a security migration.
  • Use your account's verified email as the recipient below. Broader recipients require reviewed approval or account trust.
  • Start without attachments, which remain blocked pending an approved scanning workflow.
  • For the first 7 days after signup an account is held to a lower ceiling: 50 outbound per rolling 24 hours on the shared domain, 10 on your own domain. See Rate Limits.

If a request is rejected, read its error code before retrying. See Getting Started to create an inbox with an explicit verified domain, and Security & Trust.

Send your first email​

Pick the interface that fits your stack. All three options call the same underlying endpoint.

curl -X POST https://getmail.bot/v1/inboxes/$INBOX_ID/messages \
-H "Authorization: Bearer $MAILBOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": ["your@email.com"],
"subject": "Hello from mailbot!",
"body_text": "This is your first email sent through mailbot. Reply to this email and the reply joins the same thread.",
idempotency_key="quickstart-first-send-001",
}'

The SDK versions above are prereleases. Node.js is pinned because the registry's default tag points to an older version. Python needs the explicit base_url to avoid its older default host. See Node.js SDK and Python SDK.

A successful send response records acceptance, not final delivery. Check the message state before treating it as delivered or retrying a timed-out send.

If the send is refused​

A refused send returns an HTTP status and a stable error.code, and nothing leaves mailbot. The three you are most likely to meet on a first send:

CodeStatusFix
OWNERSHIP_VERIFICATION_REQUIRED403Sign in at getmail.bot with the email code or an OAuth provider, then retry
recipient_unproven403Until the account is trusted, the only recipient allowed is your own account address
domain_unverified or DOMAIN_NOT_VERIFIED403, 400The inbox domain needs a verified domain record on your account

Send Authorization lists every check in the order it runs, and Errors is the full code reference.

Receive a reply​

Reply to the email from your personal inbox. mailbot automatically threads the reply using Message-ID and In-Reply-To headers (RFC 5322). No parsing or manual matching required.

View the thread​

Read the thread back with the API. The dashboard has a read-only Inboxes page where you can look at incoming plain text for each address, but it cannot reply, send, delete or download attachments. Every message operation runs through the API, an SDK or the MCP server.

curl "https://getmail.bot/v1/inboxes/$INBOX_ID/threads" \
-H "Authorization: Bearer $MAILBOT_API_KEY"

Select the returned thread, then retrieve its messages:

curl "https://getmail.bot/v1/inboxes/$INBOX_ID/threads/$THREAD_ID" \
-H "Authorization: Bearer $MAILBOT_API_KEY"

Set THREAD_ID to the thread ID from the list response. See Thread Management.

Next: Connect your webhook​

Now that you can send and receive threaded emails, connect a webhook to get real-time notifications when events happen. See the webhook guide for setup instructions and payload reference.