Skip to main content

API keys

Your dashboard key is one secret for the customer API. Create it while signed in at SMTP & API setup, then send it as X-API-Key on every request. The dashboard grants the key the wildcard permission *, so it reaches every customer endpoint that accepts a key — except administrator work.
The secret is shown once when you create or regenerate it. Copy it into your secrets manager immediately — it cannot be shown again.

What the key can do

The main capability groups: Two boundaries always apply:
  • No administrator work. Every admin: action is rejected for a key, even with the * permission. Staff endpoints, investor tools and platform diagnostics are unreachable.
  • No session-only work. Sign-in, registration, password reset, email verification, changing the password, deleting the account, listing or revoking sessions, and creating, rotating or revoking another dashboard key require a signed-in browser session. A key cannot mint or manage another dashboard key. Disabling 2FA also needs the account password and a current authenticator code, so a key alone cannot turn it off.
A leaked dashboard key can send mail as your domain, delete domains and mailboxes, rotate mailbox credentials, change profile and notification settings, and cancel or activate a subscription. Keep it on a server, never in browser code, mobile apps or a repository, and revoke it immediately if it leaks.
The guides document the integration surface: sending, domains, mailboxes, relays, tracking, billing and support. Account settings are supported in the dashboard; most can also be called with the key, but they are not part of the integration reference.

Key types

The dashboard creates a general key. There is also a narrower sending key, created through the API or the domain actions in the dashboard, for a service that should only be able to send. Both are sent as X-API-Key and both start with wzbm_.

Scoped sending keys

A sending key is useful when a contractor, a microservice or a legacy script should send mail and nothing else. Create one with your dashboard key:
scope is general (default) or domain. A domain key requires domainId of a verified sending domain. Domain-specific keys require an active or trialing Business or Enterprise subscription for creation, regeneration and authentication. Purchased credits alone do not unlock them. Use the secret as x-api-key; it only authorizes message sending and attachment upload, not account, domain, mailbox, tracking or key management. In Domains, use the domain row actions to create or reset its send-only key. Copy the secret immediately and configure a separate SDK client for each domain. Reset invalidates the old secret. A matching content.from selects an active hosted mailbox or connected Gmail mailbox. Otherwise the first eligible mailbox is selected; domain keys restrict selection to that exact domain. If no mailbox is available in scope, the platform sender is used. Explicit display names are retained. Reply-To defaults to the effective sender unless content.replyTo is supplied. A domain key never selects a mailbox on another domain. expiresAt is optional. The response wraps the key in data.apiKey; the one-time secret is that object’s apiKey field, alongside id, name, scope, domainId, keyPrefix and expiresAt:
Save the nested apiKey immediately. Listing keys never returns it.

Send with the domain-specific secret

Set WAZOBIA_DOMAIN_API_KEY to the one-time secret, not the domain ID or key prefix. Use an active mailbox on that exact domain for content.from:
The official TypeScript, Python, PHP and Laravel SDKs accept this secret through their normal client API-key option. Laravel reads WAZOBIA_API_KEY from config/wazobiamail.php. These clients send the header for you. Domain-scoped credentials cannot list domains or read tracking; keep those operations in a separate client with a dashboard key. Manage the keys with the same dashboard key: A sending key cannot call these endpoints (they return 401), and cannot read domains, mailboxes or tracking. Use the dashboard key for anything beyond sending.

Rotate and revoke

Regenerate or revoke a key from the same dashboard screen. Regenerating replaces the secret immediately; revoking stops it at once. Update your services with the new secret after a rotation. Revoked and expired keys return 401.

Creating keys requires a signed-in session

For security, a key cannot create another dashboard key. Sign in to the WazobiaMail dashboard and open SMTP & API setup. The API key panel there creates the key; the dashboard home also offers a Create API key prompt the first time you sign in. Your services never hold your password. A dashboard key can create sending keys, because those are limited to sending and cannot be used to widen access. See Authentication for the credential model and Sending email for the sender, reply and bounce rules.