Self-Hosted APIs
Create Admin Account (Self-Hosted)
Create the first admin account for your self-hosted Databrain instance. Returns an access token for the new admin. Self-hosted only.
POST
Create the initial admin user and company for a self-hosted deployment. On success, the API returns an access token that can be used for subsequent admin operations (e.g. creating a service token, managing Data Apps). Only one company can exist on a self-hosted instance; if an account already exists, sign in via Create Admin JWT instead.Documentation Index
Fetch the complete documentation index at: https://docs.usedatabrain.com/llms.txt
Use this file to discover all available pages before exploring further.
Headers
Must be
application/json when sending a JSON body.Request Body
Admin user’s first name. Must be between 3 and 30 characters.
Admin user’s email address. Must be a valid email with at least two domain segments (e.g.
user@example.com). Some common consumer email domains may be blocked (e.g. gmail, yahoo, outlook).Password for the admin account. Must meet:
- Minimum 8 characters
- At least 1 uppercase letter
- At least 1 lowercase letter
- At least 1 digit
- At least 1 special character
- No spaces
Name of the company/organization to create for this admin.
Response
On success, the API returns 200 with a JSON object:Wrapper object for the response payload.
JWT access token for the newly created admin. Use this in the
Authorization: Bearer <accessToken> header for admin APIs (e.g. Create Service Token, Reset Admin Password).error.code and error.message and an appropriate HTTP status (400 or 500).
Examples
HTTP Status Code Summary
| Status Code | Description |
|---|---|
200 | OK – Admin account created; data.accessToken returned |
400 | Bad Request – Validation error (invalid email, weak password, missing fields) or company already exists |
500 | Internal Server Error – Server error or self-hosted-only error |
Possible Errors
| Code | Message | HTTP Status |
|---|---|---|
INVALID REQUEST BODY | Joi validation message (e.g. "firstName" is required, "password" should contain at least 1 uppercase character) | 400 |
INVALID_REQUEST | Your company account is already created, please sign in | 400 |
SELFHOSTED_APP_ERROR | This feature is only available for self-hosted instances | 500 |
INTERNAL_SERVER_ERROR | INTERNAL_SERVER_ERROR | 500 |
Related
- Create Admin JWT – Sign in and get an access token for an existing admin
- Create Service Token – Create a service token using the admin access token
- Reset Admin Password – Change password for the authenticated admin

