Authentication
The Nimbuz API uses JWT bearer tokens. Log in with the same credentials you use for the portal, then send the token on every request:
Code
-
Log in
Call
POST /user/v1/user/login. Individual accounts useorgName: "nimbuz". Business accounts use their organization name, which is the sub-domain they sign in on.Response -
Send the token
-
Re-login when it expires
There is no refresh token. When any call returns
401, log in again and retry the request.
Try it in the playground
Every endpoint in the API Reference has a Test button. Paste your token into the Bearer auth field once, and the playground sends it on every request.
Two-factor authentication
If 2FA is enabled, login returns a challenge instead of a token:
Code
Before expiresIn seconds have passed, send the 6-digit code from your authenticator app:
Code
The response contains data.token, the same as a normal login.
CI pipelines
Use a dedicated Nimbuz user without 2FA that is a member of only the projects the pipeline deploys to. Keep its credentials in your CI secret store.
Your account ID
Billing endpoints need an account_id. It's stored in the token, in the properties.nimbuzAccountId claim:
Login errors
| Status | Code | What to do |
|---|---|---|
400 | EMAIL_NOT_VERIFIED | Verify your e-mail from the sign-up message. |
400 | INVALID_ORGANIZATION | Check orgName. |
403 | ACCOUNT_SUSPENDED / ACCOUNT_INACTIVE | Contact support. |
429 | MFA_TOO_MANY_ATTEMPTS | Start a new login. |

