User Management – Admin Password Reset
Reset a user's password and send new credentials via email.
Authentication
Authorization: Bearer <YOUR_AUTH_TOKEN>
Endpoint
POSThttps://api.samvyo.com/api/user/adminPwdreset
Required Headers
Content-Type: application/json
Authorization: Bearer <YOUR_AUTH_TOKEN>
Request Body
{
"loginUrl": "https://yourapp.example.com/login",
"userId": "<USER_ID>"
}
Notes
- If
loginUrl
is not sent, the user will receive the default dashboard URLhttps://app.samvyo.com/login
in the email. - The user receives an email with the login link and new credentials.
Example Requests
JavaScript (fetch)
const res = await fetch('https://api.samvyo.com/api/user/adminPwdreset', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${authToken}`
},
body: JSON.stringify({
loginUrl: 'https://yourapp.example.com/login',
userId: '<USER_ID>'
})
});
const data = await res.json();
cURL
curl -X POST \
'https://api.samvyo.com/api/user/adminPwdreset' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_AUTH_TOKEN>' \
-d '{
"loginUrl": "https://yourapp.example.com/login",
"userId": "<USER_ID>"
}'
Success Response
{
"success": true,
"email": "user@example.com",
"password": "<AUTO_GENERATED_PASSWORD>"
}