M
Mailbase
useSendDocsPricingBlogComparisonsSign in
Home/Docs/API

Mailbase REST API

A workspace-scoped API for transactional email, audience sync, campaign visibility, and operational checks. Tokens are generated in Settings → Developer API.

Authentication

Every request uses a bearer token. Tokens are shown once, stored hashed by Mailbase, and can be revoked from the workspace settings screen.

Authorization: Bearer mb_live_...
ScopeAllows
email:sendSend transactional email through the workspace sender setup.
campaigns:readList campaigns and delivery stats.
audiences:readList audiences and contact counts.
audiences:writeCreate audiences and import contacts.
analytics:readReserved for analytics endpoints.

Health Check

Use this endpoint to verify a token and identify the workspace it belongs to.

curl https://mailbase.french-web.com/api/v1/me \
  -H "Authorization: Bearer mb_live_..."
{
  "workspace": { "id": "...", "name": "Acme", "slug": "acme" },
  "scopes": ["email:send", "campaigns:read"]
}

Send Transactional Email

Sends through the workspace's configured useSend connection and default sender. Mailbase records the send for quota, analytics, and future webhook matching.

curl https://mailbase.french-web.com/api/v1/send \
  -H "Authorization: Bearer mb_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "to": "customer@example.com",
    "subject": "Your invoice is ready",
    "html": "<p>Your invoice is ready.</p>",
    "text": "Your invoice is ready."
  }'
FieldTypeRequiredNotes
tostring or string[]YesRecipient email address or batch list.
subjectstringYesEmail subject.
htmlstringOne of html/textHTML body.
textstringOne of html/textPlain-text body.
senderIduuidNoOptional configured sender; default sender is used otherwise.
tagsobjectNoForwarded to useSend when supported.

Campaigns

List campaigns in the token's workspace.

curl https://mailbase.french-web.com/api/v1/campaigns \
  -H "Authorization: Bearer mb_live_..."

Audiences

List audiences or create a new static audience with contacts.

curl https://mailbase.french-web.com/api/v1/audiences \
  -H "Authorization: Bearer mb_live_..."
curl https://mailbase.french-web.com/api/v1/audiences \
  -H "Authorization: Bearer mb_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Launch list",
    "contacts": [
      { "email": "marie@example.com", "firstName": "Marie" }
    ]
  }'

Error Format

Errors return JSON with a stable error string.

{
  "error": "Missing scope: email:send"
}
© 2026 Mailbase · french-web
PricingBlogComparisonsAlternativesuseSend IntegrationResourcesDocsTermsPrivacy