Skip to main content
curl --request POST \
  --url https://api.usedatabrain.com/api/v2/service-token/reset-password \
  --header 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"currentPassword":"OldP@ss1","password":"NewSecureP@ss2"}'
{
  "data": {
    "success": true
  }
}
POST
https://api.usedatabrain.com
/
api
/
v2
/
service-token
/
reset-password
curl --request POST \
  --url https://api.usedatabrain.com/api/v2/service-token/reset-password \
  --header 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"currentPassword":"OldP@ss1","password":"NewSecureP@ss2"}'
{
  "data": {
    "success": true
  }
}
Change the password for the admin user identified by the current authentication token. Requires the current password and the new password. The new password should meet the same complexity rules as sign-up (see Create Admin Account).
Self-Hosted Only: This endpoint is available only on self-hosted Databrain instances.
Authentication Requirement: This endpoint requires an authenticated admin user. Use the Bearer token from Create Admin JWT.

Authentication

Use a valid admin JWT in the Authorization header. Obtain one via Create Admin JWT.

Headers

Authorization
string
required
Bearer token for the admin whose password is being changed.
Authorization: Bearer <access_token>
Content-Type
string
required
Must be application/json when sending a JSON body.
Content-Type: application/json

Request Body

currentPassword
string
required
The admin’s current password.
password
string
required
The new password. Should meet the same requirements as sign-up: minimum 8 characters, at least one uppercase, one lowercase, one digit, one special character, no spaces.

Response

On success, the API returns 200 with a JSON object:
data
object
Wrapper object for the response payload.
data.success
boolean
true when the password was changed successfully.
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 – Password changed successfully; data.success is true
400Bad Request – Wrong current password or validation error on new password
500Internal Server Error – Server error or self-hosted-only error

Possible Errors

CodeMessageHTTP Status
RESET_PASSWORD_ERRORError message from password change (e.g. “The current password is not correct!“)400
SELFHOSTED_APP_ERRORThis feature is only available for self-hosted instances500
INTERNAL_SERVER_ERRORInternal server error or GraphQL error message500