Skip to content

Reset Password

Reset user password with obtained token from the email.

Endpoint

http
POST /api/v1/password/reset

Parameters

Body parameters

ParameterTypeRequiredDescription
emailstringyesThe user email for which password recovery link was generated.
tokenstringyesThe password reset token received in the email.
passwordstringyesThe new user password.
password_confirmationstringyesThe new user password confirmation.

Request example

sh
curl --location --request POST 'https://files.ro/api/v1/password/reset' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "jane@doe.com",
  "token": "{token}",
  "password": "filesro",
  "password_confirmation": "filesro"
}'

Response

json
{
  "message": "Your password has been reset!"
}
json
{
  "error": "This password reset token is invalid."
}