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 (recommended)
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
- Log in to your Betterumami dashboard and click your profile icon in the side navigation.
- Select Settings, then navigate to the API keys tab.
- Click Create key, give it a descriptive label, and click Save.
- Copy the key value immediately — it is shown only once and cannot be retrieved later.
Use an API key
Pass your key in theAuthorization 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 theAuthorization header on every subsequent request, just like an API key.
POST /api/auth/login
Send aPOST 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.
200 OK with the session token and a summary of the authenticated user:
token value and attach it to every subsequent request:
POST /api/auth/verify
Before making a batch of API calls, you can check whether a previously issued token is still valid. Send aPOST to /api/auth/verify with the same Authorization: Bearer <token> header — no request body is needed.
200 OK with the current user’s profile:
401 Unauthorized. Re-authenticate via /api/auth/login to obtain a fresh token.