Skip to content

Change Password

Change user password.

Endpoint

http
POST /api/v1/user/password

Parameters

Body parameters

ParameterTypeRequiredDescription
currentstringyesThe current user password.
passwordstringyesThe new user password.
password_confirmationstringyesThe new user password confirmation.

Request example

sh
curl --location --request POST 'https://files.ro/api/v1/user/password' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data-raw '{
  "current": "filesro",
  "password": "filesro",
  "password_confirmation": "filesro"
}'

Response

json
{
  "type": "success",
  "message": "The password was successfully changed."
}
json
{
  "type": "error",
  "message": "You are not authorized"
}
json
{
  "message": "The given data was invalid.",
  "errors": {
    "field": [
      "The field is required."
    ]
  }
}