Skip to main content
Every request to the Betterumami API (except the tracking endpoints POST /api/send and POST /api/batch) must prove who you are before the server will return any data. On Betterumami Cloud, the only supported method is an API key passed as a Bearer token in the Authorization header — it’s long-lived, revocable, and works seamlessly in automated scripts and CI pipelines. On self-hosted instances, you can also exchange a username and password for a short-lived session token if you prefer. Both methods use the same Authorization: Bearer <token> header shape, so you can switch between them without changing any downstream code.
API keys are the preferred authentication method for any programmatic integration. They don’t expire on their own, can be scoped per integration, and can be revoked individually without affecting other keys or your main account credentials.

Create an API key

  1. Log in to your Betterumami dashboard and click your profile icon in the side navigation.
  2. Select Settings, then navigate to the API keys tab.
  3. Click Create key, give it a descriptive label, and click Save.
  4. Copy the key value immediately — it is shown only once and cannot be retrieved later.
If you lose an API key, you must delete it and create a new one. There is no way to view the secret again after the creation dialog is closed.

Use an API key

Pass your key in the Authorization header on every request:

Manage keys programmatically

You can also create, list, and delete API keys through the API itself:
On Betterumami Cloud, API keys are the only supported authentication method. The username/password endpoints below are available on self-hosted instances only.

Username and password (self-hosted only)

If you’re running a self-hosted instance, you can authenticate by exchanging your credentials for a temporary JWT session token. This token must be included in the Authorization header on every subsequent request, just like an API key.

POST /api/auth/login

Send a POST request with your credentials in the JSON body. The endpoint returns a token you use for all further requests.
string
required
The username of the account you want to authenticate as.
string
required
The password for the account.
Response A successful login returns a 200 OK with the session token and a summary of the authenticated user:
Extract the token value and attach it to every subsequent request:
Session tokens issued by /api/auth/login can expire. If your integration runs for extended periods, either refresh the token by logging in again or switch to an API key, which has no expiry.

POST /api/auth/verify

Before making a batch of API calls, you can check whether a previously issued token is still valid. Send a POST to /api/auth/verify with the same Authorization: Bearer <token> header — no request body is needed.
A valid token returns 200 OK with the current user’s profile:
If the token has expired or is invalid, the API returns 401 Unauthorized. Re-authenticate via /api/auth/login to obtain a fresh token.

Choosing the right method

Even on self-hosted instances, API keys are the recommended approach for any long-running automation. Reserve username/password auth for quick manual testing or interactive workflows where short-lived tokens are acceptable.