POST /auth/admin-force-set-password
Force set password for user (SuperAdmin only)
Allows SuperAdmin users to set a password for any user without requiring their old password
Authentication Required
Authorization: Bearer {token}
header string This header is required to access this endpoint
Request Body
{ "email": "string", "newPassword": "string"}{ "email": "user@example.com", "newPassword": "newSecurePassword456"}{ "email": "string", "newPassword": "string"}Try it out
Loading...
Output:
Responses
Description
Password set successfully
{ "message": "Password changed successfully for user@example.com"}Description
Bad request - invalid input or password requirements not met
{ "error": "string", "status": 0, "message": "string"}Description
Unauthorized - not authenticated
{ "error": "string", "status": 0, "message": "string"}Description
Forbidden - user does not have SuperAdmin role
{ "error": "string", "status": 0, "message": "string"}Description
Not found - user with specified email does not exist
{ "error": "string", "status": 0, "message": "string"}Description
Internal server error
{ "error": "string", "status": 0, "message": "string"}References
#/components/schemas/Error
type: objectproperties: error: type: string description: Error message status: type: integer description: HTTP status code message: type: string description: Detailed error messagedescription: Error response objectrequired: - error|export interface Error { /** Error message */ error: string; /** HTTP status code */ status?: number; /** Detailed error message */ message?: string;}Route Source Code
Check out the source code for this route entrypoint here: /auth/admin-force-set-password/route.ts
Or the swagger.yaml spec this documentation was generated from:
/auth/admin-force-set-password/swagger.yaml