Skip to content

PutUserPassword

Walter Lara edited this page Jul 3, 2024 · 6 revisions

Put User Password

Allows to put (reset) the User password.

Request

URL: /v1/users/password

Method: PUT

Path Parameters: None

Query Parameters: None

Headers:

Content-Type: application/json

g-recaptcha-platform: {Web|Android|iOS}

g-recaptcha-token: {reCAPTCHA Token for "password_reset" action}

Content:

Field Type Description Requirement Type
email string Valid email address. Required
newPassword string Plaintext password. Required
confirmPassword string Plaintext password confirmation. Required
authCode string 2FA Code. Required

Content example:

{
    "email": "[email protected]",
    "newPassword": "abc@123",
    "confirmPassword": "abc@123",
    "authCode": "123456"
}

✅ Success Response

Code: 204 NO CONTENT

Headers: None

❌ Error Responses

1. Bad Request

Code: 400 BAD REQUEST

Condition: If a mandatory content field is missing.

Headers:

Content-Type: application/json

Content example:

{
    "code": 400,
    "description": "Bad Request",
    "cause": "Missing email"
}

2. Forbidden

Code: 403 FORBIDDEN

Condition: If 2FA failed because authCode is invalid.

Headers:

Content-Type: application/json

Content example:

{
    "code": 403,
    "description": "Forbidden",
    "cause": "2FA failed"
}

3. Unprocessable Enity

Code: 422 UNPROCESSABLE ENTITY

Condition: If a content field is malformed or invalid.

Headers:

Content-Type: application/json

Content example:

{
    "code": 422,
    "description": "Unprocessable Entity",
    "cause": "Invalid email: john.doe!gmail.com"
}

See Also

Post User (Add New User)

Patch User (Update User)

Get User

Get Users

Get User Count

Delete User

Clone this wiki locally