Mailbase
FeaturesPricingDocsBlogComparisonsChangelog
Sign inStart free
Home/Docs/API tokens
Developer APIUpdated 2026-05-25

API Tokens And Scopes

Create, scope, rotate, and verify Mailbase API tokens for workspace-safe backend integrations.

Canonical: /docs/api-tokens
On this page
Create A TokenVerify The TokenScopesRotation And Revocation

Create A Token

  • Open Settings, then Developer API.
  • Choose a token name, select only the scopes your integration needs, and optionally set an expiry date.
  • Save the raw token immediately. Mailbase stores a hash and will not show the raw value again.
  • Put the token in a backend secret manager. Never ship it to browser code or mobile clients.

Verify The Token

Call /api/v1/me from staging or CI to confirm the token is valid, still unexpired, and bound to the intended workspace.

curl https://mailbase.example.com/api/v1/me \
  -H "Authorization: Bearer mb_live_..."

Scopes

Every external API request is checked against the token scopes and the token's workspace. A token cannot cross into another workspace.

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.
contacts:readRead contact profiles and suppression status.
contacts:writeCreate, update, suppress, or resubscribe contacts.
events:readRead delivery, engagement, and reply events.
templates:readRead email templates.
templates:writeCreate and update email templates.
webhooks:writeCreate and manage outgoing webhook endpoints.
analytics:readRead analytics endpoints as they are added.

Rotation And Revocation

  • Create a replacement token before removing the old token from your production secret store.
  • Deploy the new secret, verify /api/v1/me, then revoke the old token in Settings.
  • Use expiry dates for temporary automations, tests, and vendor handoffs.
  • Rate-limit headers are returned on API responses so backend jobs can back off safely.

Related Docs

OperationsUpdated 2026-05-25
Cron setup
Configure the recurring Mailbase cron endpoints that enqueue scheduled campaigns, process durable send-job batches, and run due workflow steps.
ComplianceUpdated 2026-05-25
Unsubscribe compliance
How Mailbase signs unsubscribe links, enforces suppression states, adds List-Unsubscribe headers, and keeps marketing sends compliant.
DeliverabilityUpdated 2026-05-25
Sender domains
Connect sender domains, understand hosted versus BYO useSend sending, and keep SPF, DKIM, and DMARC status visible in Mailbase.
MCPUpdated 2026-05-25
MCP OAuth
Connect Claude, Cursor, Codex, or another MCP client to Mailbase with OAuth-scoped workspace access.
Mailbase
Product
FeaturesPricinguseSend integrationChangelog
Learn
BlogDocsAPI referenceResources
Compare
ComparisonsAlternatives
Guides
Transactional email servicesSelf-hosted useSend stackSelf-hosted email marketingSPF, DKIM & DMARCEmail deliverability
Legal
TermsPrivacy
© 2026 Mailbase · french-webEmail workflow for builders.