Skip to main content
PATCH
/
auth
/
resetpassword
Reset password
curl --request PATCH \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/auth/resetpassword \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "jsmith@example.com",
  "new_password": "<string>"
}'
{
  "message": "Password Reset Successful"
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Code Examples

const response = await fetch('https://server26-dot-royalti-project.uc.r.appspot.com/auth/resetpassword', {
  method: 'PATCH',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "email": "sample-email",
    "new_password": "sample-new_password"
  })
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Query Parameters

code
string

The verification code sent to the user's email

Body

application/json
email
string<email>
required

The email address of the user

new_password
string
required

The new password to be set

Response

Success - If Logged In

message
string