Skip to content
getgeolens.com

Reset User Password

POST
/admin/users/{user_id}/reset-password/
curl --request POST \
--url https://example.com/admin/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reset-password/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "password": "example" }'

Set a user’s password (admin only).

The manage_users permission authorizes this recovery path, so no current password is required. The submitted password is stored only as a hash and is omitted from audit details, logs, and the response.

Returns 422 when the target signs in through an identity provider and has no local password, or 404 when the user does not exist.

Resetting your own password is permitted and ends every session the account holds, including the one making this request, because the reset revokes the account’s credentials.

user_id
required
User Id
string format: uuid
Media type application/json
AdminPasswordReset

Request body for POST /admin/users/{user_id}/reset-password/.

Single-purpose for the same reason as SamlToLocalConversion above: the generic UserUpdate schema has no password field, so an admin-set password lands as its own audited action (‘user.password_reset’) rather than disappearing into ‘user.update’.

object
password
required
Password

Replacement password for the account (policy: min 12 chars, 3+ character classes, at most 72 bytes UTF-8). The user can change this after their next login.

string
>= 8 characters <= 256 characters
Example generated
{
"password": "example"
}

Successful Response

Media type application/json
UserResponse
object
id
required
Id
string format: uuid
username
required
Username
string
email
required
Any of:
string
is_active
required
Is Active
boolean
status
required
Status

Account status: active, pending, suspended, or deactivated.

string
Allowed values: active pending suspended deactivated
last_login_at
required
Any of:
string format: date-time
created_at
required
Created At
string format: date-time
roles
required
Roles

Assigned role names, e.g. [‘admin’, ‘editor’]

Array<string>
can_reset_password
required
Can Reset Password

Whether an administrator can set a local password for this account. True for local accounts even when an identity provider is also linked.

boolean
quota_usage
Any of:
UserQuotaUsage

Per-user quota usage: current consumption vs configured caps.

object
bytes_used
required
Bytes Used
integer
dataset_count
required
Dataset Count
integer
storage_cap
required
Storage Cap
integer
count_cap
required
Count Cap
integer
Example
{
"status": "active"
}

Bad request — invalid query parameters or payload

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Unauthorized — missing or invalid credentials

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Forbidden — caller lacks access to this resource

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Not found

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Validation error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Too many requests — retry after the advertised interval

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
Retry-After
integer

Seconds until the request may be retried

Internal server error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Service unavailable — the database could not serve the request

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}