Self-Hosted APIs
Create Admin JWT (Self-Hosted)
Sign in as an admin and receive a JWT access token for self-hosted Databrain. Use this token for service token and admin APIs. Self-hosted only.
POST
Sign in with an existing admin email and password to receive a JWT access token. Use this token in theDocumentation Index
Fetch the complete documentation index at: https://docs.usedatabrain.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header when calling admin-only endpoints such as Create Service Token, Rotate Service Token, and Reset Admin Password.
Headers
Must be
application/json when sending a JSON body.Request Body
Admin user’s email address. Must be a valid email with at least two domain segments.
Admin user’s password.
Response
On success, the API returns 200 with a JSON object:Wrapper object for the response payload.
JWT access token. Use as
Authorization: Bearer <accessToken> for admin and service-token APIs.error.code and error.message and an appropriate HTTP status (400 or 500).
Examples
HTTP Status Code Summary
| Status Code | Description |
|---|---|
200 | OK – Access token returned in data.accessToken |
400 | Bad Request – Invalid credentials or validation error |
500 | Internal Server Error – Server error or self-hosted-only error |
Possible Errors
| Code | Message | HTTP Status |
|---|---|---|
USER_NOT_FOUND | No User found with the given email | 400 |
Invalid credentials | Invalid credentials (when password is incorrect or login fails) | 400 |
SELFHOSTED_APP_ERROR | This feature is only available for self-hosted instances | 500 |
INTERNAL SERVER ERROR | Connection Failure | 500 |
Related
- Create Admin Account – Create the first admin account
- Create Service Token – Create a service token (requires this JWT)
- Reset Admin Password – Change admin password (requires this JWT)

