REST API for bots, scripts, and automations. Authenticate with your personal token via x-api-token header.
# Bash variables export TOKEN="your-api-token" export BASE="https://mail.bibnk.cloud" H="-H \"x-api-token: $TOKEN\"" J="-H \"content-type: application/json\""
/api/whoamiCheck authenticated user info
curl $H "$BASE/api/whoami" | jq
/api/statusServer status — domain, SMTP, message count, domains list
curl $H "$BASE/api/status" | jq
/api/messagesList inbox. Filter: ?user=alias&limit=20
curl $H "$BASE/api/messages?user=hello&limit=10" | jq
/api/messages/:idFull email detail — body, headers, attachments
curl $H "$BASE/api/messages/123" | jq
/api/latestLong-poll for new mail (OTP catcher). Waits up to N seconds for a new message.
curl $H "$BASE/api/latest?user=hello&wait=30" | jq # With since_id (only newer than ID) curl $H "$BASE/api/latest?user=hello&since_id=5&wait=30" | jq
/api/aliasesList your claimed aliases
curl $H "$BASE/api/aliases" | jq
/api/aliasesCreate alias — random or custom, specify domain
# Random
curl -X POST $H $J "$BASE/api/aliases" \
-d '{"kind":"random","domain":"bibnk.cloud"}' | jq
# Custom
curl -X POST $H $J "$BASE/api/aliases" \
-d '{"kind":"custom","local":"hello","domain":"bibnk.cloud"}' | jq
/api/messages/:idDelete a message by ID
curl -X DELETE $H "$BASE/api/messages/123" | jq
/api/domainsList all domains super_admin
curl $H "$BASE/api/domains" | jq
/api/domainsAdd domain super_admin
curl -X POST $H $J "$BASE/api/domains" \
-d '{"domain":"alt.example","mode":"public"}' | jq
/api/usersCreate user admin+
curl -X POST $H $J "$BASE/api/users" \
-d '{"username":"alice","role":"user"}' | jq
/api/regen-tokenRegenerate API token (old one dies immediately)
curl -X POST $H "$BASE/api/regen-token" | jq
*@bibnk.cloud on port 25.swaks --to test@bibnk.cloud --server 43.134.130.236 --port 25