Skip to main content
curl --request POST \
  --url https://api.usedatabrain.com/api/v2/admin-account/jwt \
  --header 'Content-Type: application/json' \
  --data '{"email":"admin@company.com","password":"SecureP@ss1"}'
{
  "data": {
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }
}
POST
https://api.usedatabrain.com
/
api
/
v2
/
admin-account
/
jwt
curl --request POST \
  --url https://api.usedatabrain.com/api/v2/admin-account/jwt \
  --header 'Content-Type: application/json' \
  --data '{"email":"admin@company.com","password":"SecureP@ss1"}'
{
  "data": {
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
  }
}
Sign in with an existing admin email and password to receive a JWT access token. Use this token in the Authorization header when calling admin-only endpoints such as Create Service Token, Rotate Service Token, and Reset Admin Password.
Self-Hosted Only: This endpoint is available only on self-hosted Databrain instances.

Headers

Content-Type
string
required
Must be application/json when sending a JSON body.
Content-Type: application/json

Request Body

email
string
required
Admin user’s email address. Must be a valid email with at least two domain segments.
password
string
required
Admin user’s password.

Response

On success, the API returns 200 with a JSON object:
data
object
Wrapper object for the response payload.
data.accessToken
string
JWT access token. Use as Authorization: Bearer <accessToken> for admin and service-token APIs.
On error, the API returns a JSON object with error.code and error.message and an appropriate HTTP status (400 or 500).

Examples

HTTP Status Code Summary

Status CodeDescription
200OK – Access token returned in data.accessToken
400Bad Request – Invalid credentials or validation error
500Internal Server Error – Server error or self-hosted-only error

Possible Errors

CodeMessageHTTP Status
USER_NOT_FOUNDNo User found with the given email400
Invalid credentialsInvalid credentials (when password is incorrect or login fails)400
SELFHOSTED_APP_ERRORThis feature is only available for self-hosted instances500
INTERNAL SERVER ERRORConnection Failure500