Reset My Password
Reset the current user's own password.
POST /api/auth/reset-my-password
Reset the authenticated user's password by providing the current password and a new one.
Auth: Required — any authenticated user, with the x-tenant-id header of one of their tenants
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer <access_token> |
x-tenant-id | Yes | Tenant UUID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
currentPassword | string | Yes | Current password for verification |
newPassword | string | Yes | New password (minimum 8 characters), different from the current one |
Example
curl -X POST https://api.reten.ai/api/auth/reset-my-password \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>" \
-H "Content-Type: application/json" \
-d '{
"currentPassword": "OldPass123!",
"newPassword": "NewSecurePass456!"
}'const response = await fetch("https://api.reten.ai/api/auth/reset-my-password", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"x-tenant-id": "<tenant-id>",
"Content-Type": "application/json",
},
body: JSON.stringify({
currentPassword: "OldPass123!",
newPassword: "NewSecurePass456!",
}),
});import requests
response = requests.post(
"https://api.reten.ai/api/auth/reset-my-password",
headers={
"Authorization": "Bearer <token>",
"x-tenant-id": "<tenant-id>",
},
json={
"currentPassword": "OldPass123!",
"newPassword": "NewSecurePass456!",
},
)Response 201 Created
{
"message": "Password updated successfully"
}Error Responses
| Status | Description |
|---|---|
400 | Validation error — a field is missing or newPassword is shorter than 8 characters |
400 | Current password is incorrect |
400 | New password must be different from current password |
400 | x-tenant-id header missing — Missing required header: x-tenant-id |
401 | Missing or invalid authentication token |
403 | The user does not belong to the tenant — User does not have access to the requested tenant |