Reset credentials by user

Hi I couldn’t find an endpoint to reset the credentials of a user (not by admin)

I want something like this, but this endpoints seems not working nowadays, can you bring me some specific alternative?

curl -X PUT \
  http://localhost:8080/auth/realms/{realm-name}/account/credentials/password \
  -H 'Authorization: Bearer {access-token}' \
  -H 'Content-Type: application/json' \
  -d '{
      "type": "password",
      "value": "{new-password}",
      "temporary": false,
      "currentPassword": "{old-password}"
  }'