Updates a user's password reset flag for account security management

PUT /api/users/{username}/reset-password-flag

Overview

Sets or clears the flag that forces a staff (back-office) user to choose a new password at their next sign-in. Returns 204 No Content with no body. It does not change the password itself and does not notify the user — pair it with Updates the password for a specific user account when you are issuing a temporary password, and tell the user out of band.

The usual sequence for handing an account back to its owner is: set a temporary password, then set this flag to true. On ObjectId-role tenants a successful password change clears the flag automatically, so setting it before you set the password would undo your own work — set the password first.

Setting the flag to false is the way out of a reset loop, where a user is asked to change their password every time they sign in because the flag was never cleared.

The flag is written to the same place isPasswordResetFlagSet on Updates the details and settings for a specific administrative user writes to, and reads back through isPasswordResetFlagSet on the user-retrieval endpoints. This endpoint is the narrower of the two: it touches only the flag, where the update endpoint replaces the whole account record.

Endpoint

PUT {base_url}/api/users/{username}/reset-password-flag

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Path parameters

NameTypeRequiredDescription
usernamestringYesThe sign-in name of the account whose flag is being changed, as returned in [].username by Retrieves all administrative users configured in the system. Matched exactly. The account must have a legacy system-user record as well as its main user account, or the call fails with 404 even though the user is otherwise usable.

Request body

FieldTypeRequiredDescription
resetPasswordFlagbooleanNotrue forces the user to set a new password the next time they sign in; false clears that requirement. Because the field is a non-nullable boolean, omitting it or sending null is not "leave as is" — it reads as false and clears any pending forced reset. Always send the value you want explicitly. Read the current setting from isPasswordResetFlagSet on Retrieves detailed information for a specific administrative user.

Sample request

cURL
curl -X PUT '{base_url}/api/users/{username}/reset-password-flag' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "resetPasswordFlag": true
}'

Errors

StatusMeaningWhen
404Not foundNo account exists with that username, or the account has no legacy system-user record, which is what holds the flag: The user with the username: {username} could not be found. On ObjectId-role tenants the account must be fully set up, and the message is The user with username: {username} could not be found.
500Internal server errorAny other unexpected server-side failure — for example the tenant's authentication configuration being missing or invalid, or the change failing to save completely. Returned with no body.

This page as markdown · All pages · llms.txt