Developers

Use the API for mailboxes you own.

Base URL https://api.mailbelo.com. The interactive reference is at api.mailbelo.com/docs. Keys are created in the dashboard.

01GET

Authenticate

/v1/mailboxes

Create a key in the dashboard on Pro or Business. The full key is shown once. Every response includes request_id. The API sends X-RateLimit-Limit: 120.

NameTypeRequiredDescription
AuthorizationheaderYesBearer token for the key.

Request

curl https://api.mailbelo.com/v1/mailboxes \
  -H "Authorization: Bearer $MAILBELO_KEY"

Response

{
  "mailboxes": [],
  "next_cursor": null,
  "request_id": "…"
}
02POST

Create a mailbox

/v1/mailboxes

The password is in this response only. Send Idempotency-Key so a retry returns the first response. Reusing that key with a different body returns 409.

NameTypeRequiredDescription
local_partstringYesThe part before @.
display_namestringNoName shown on the mailbox.
domainstringNoA domain you have verified. Omit it to use mailbelo.com.
Idempotency-KeyheaderNoSame key on a retry returns the first response.

Request

curl -X POST https://api.mailbelo.com/v1/mailboxes \
  -H "Authorization: Bearer $MAILBELO_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"local_part":"ada","display_name":"Ada"}'

Response

{
  "mailbox": {
    "id": "…",
    "address": "[email protected]",
    "display_name": "Ada",
    "disabled": false,
    "quota_bytes": 1073741824,
    "password": "shown-once",
    "created_at": "2026-10-07T00:00:00+00:00"
  },
  "request_id": "…"
}
03GET

List mailboxes

/v1/mailboxes

Pass the returned next_cursor back as cursor. A null cursor means you are done.

NameTypeRequiredDescription
limitintegerNoBetween 1 and 100.
cursorstringNonext_cursor from the previous page.

Request

curl "https://api.mailbelo.com/v1/mailboxes?limit=20&cursor=$CURSOR" \
  -H "Authorization: Bearer $MAILBELO_KEY"

Response

{
  "mailboxes": [{ "id": "…", "address": "[email protected]", "display_name": "Ada", "disabled": false }],
  "next_cursor": null,
  "request_id": "…"
}
04POST

Send a message

/v1/mailboxes/{address}/messages

The address must belong to the key’s organization. Send can take the same Idempotency-Key header as create.

NameTypeRequiredDescription
addresspathYesMailbox that belongs to this key.
tostring[]YesRecipients.
subjectstringYesSubject line.
textstringYesPlain-text body.
htmlstringNoHTML body.

Request

curl -X POST https://api.mailbelo.com/v1/mailboxes/[email protected]/messages \
  -H "Authorization: Bearer $MAILBELO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to":["[email protected]"],"subject":"Hello","text":"From MailBelo."}'

Response

{ "ok": true, "request_id": "…" }
05GET

Read messages

/v1/mailboxes/{address}/messages

The list returns the inbox. GET /v1/mailboxes/{address}/messages/{id} returns one message, including text when the mail server has it.

NameTypeRequiredDescription
addresspathYesMailbox address.
limitintegerNoPage size for the list.
idpathNoMessage id for the single-message path.

Request

curl "https://api.mailbelo.com/v1/mailboxes/[email protected]/messages?limit=20" \
  -H "Authorization: Bearer $MAILBELO_KEY"

Response

{
  "messages": [{
    "id": "…",
    "subject": "Hello",
    "from": "[email protected]",
    "preview": "From MailBelo.",
    "received_at": "2026-10-07T12:00:00Z",
    "unread": true
  }],
  "request_id": "…"
}
06POST

Message actions

/v1/mailboxes/{address}/messages/{id}/act

Mark read/unread, star/unstar, or move to trash/archive/spam/inbox. Body: {"action":"read"|"trash"|…}.

NameTypeRequiredDescription
addresspathYesMailbox address.
idpathYesMessage id.
actionstringYesread, unread, star, unstar, trash, archive, spam, or inbox.

Request

curl -X POST https://api.mailbelo.com/v1/mailboxes/[email protected]/messages/MSG_ID/act \
  -H "Authorization: Bearer $MAILBELO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"read"}'

Response

{ "ok": true, "request_id": "…" }
07DELETE

Delete a mailbox

/v1/mailboxes/{address}

A mailbox this key does not own returns 404.

NameTypeRequiredDescription
addresspathYesMailbox address.

Request

curl -X DELETE https://api.mailbelo.com/v1/mailboxes/[email protected] \
  -H "Authorization: Bearer $MAILBELO_KEY"

Response

{ "ok": true, "request_id": "…" }
08POST

Domains

/v1/domains

Publish the verification TXT from the response, then POST /v1/domains/{name}/verify. GET /v1/domains lists domains other than mailbelo.com.

NameTypeRequiredDescription
namestringYesDomain to add.

Request

curl -X POST https://api.mailbelo.com/v1/domains \
  -H "Authorization: Bearer $MAILBELO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"example.com"}'

Response

{
  "domain": { "name": "example.com", "verification_txt": "mailbelo-verification=…" },
  "request_id": "…"
}
09

Errors

Failures use one JSON object with code, message, and request_id. GET /v1/errors lists the codes. GET /v1/openapi.txt lists the paths. Clients retry 429 and 5xx responses.

  • 401Missing or revoked key.
  • 404Mailbox not found.
  • 409Idempotency-Key reused with a different body.
  • 429Too many requests.

Error

{
  "error": {
    "code": "not_found",
    "message": "Mailbox not found",
    "request_id": "…"
  }
}

Webhooks

MailBelo-Signature: <hex HMAC-SHA256>
of the raw JSON body, signed with
the secret from endpoint creation.
10

Python and TypeScript

The clients in packages/sdk-python and packages/sdk-ts call the same endpoints.

Python

from mailbelo import MailBelo
client = MailBelo("mb_live_…")
created = client.create_mailbox("ada", idempotency_key="once")
client.send_message(created["mailbox"]["address"], ["[email protected]"], "Hello", "From MailBelo.")
print(client.messages("[email protected]"))
client.message_act("[email protected]", "MSG_ID", "read")
client.delete_mailbox("[email protected]")
domain = client.create_domain("example.com")
client.verify_domain("example.com")

TypeScript

import { MailBelo } from "@mailbelo/sdk";
const client = new MailBelo("mb_live_…");
const created = await client.createMailbox("ada");
await client.sendMessage(created.mailbox.address, ["[email protected]"], "Hello", "From MailBelo.");
await client.messages("[email protected]");
await client.messageAct("[email protected]", "MSG_ID", "read");
await client.deleteMailbox("[email protected]");
await client.createDomain("example.com");
await client.verifyDomain("example.com");