Get My Profile
Returns the authenticated user’s own profile.
Authentication
Requires a valid access token (any role).
Example request
curl https://mind-be.staging.miva.university/v1/users/me \
-H "Authorization: Bearer <access_token>"
Response
{
"success": true,
"data": {
"id": "6650a1b2c3d4e5f6a7b8c9d0",
"email": "student@example.com",
"first_name": "Jane",
"last_name": "Smith",
"middle_name": null,
"display_name": "Jane Smith",
"role_id": "6650a0b1c2d3e4f5a6b7c8d9",
"role_name": "Student",
"status": "ACTIVE",
"title": null,
"department": null,
"unlimited_sessions": false,
"last_activity_at": "2025-06-01T12:00:00Z",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": null
},
"message": null
}
Update My Profile
Update the authenticated user’s own profile. Only send the fields you want to change.
Authentication
Requires a valid access token (any role).
Request body
First name. Max 255 characters.
Last name. Max 255 characters.
Job title. Max 100 characters.
Department name. Max 255 characters.
Example request
curl -X PATCH https://mind-be.staging.miva.university/v1/users/me \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Jane",
"last_name": "Smith-Jones",
"department": "Computer Science"
}'
Response
Returns the full updated user profile (same shape as Get My Profile).
Change Password
POST /v1/users/me/change-password
Change the authenticated user’s password. Requires the current password for verification.
Authentication
Requires a valid access token (any role).
Request body
The user’s current password.
New password. Min 8 characters, max 100.
Example request
curl -X POST https://mind-be.staging.miva.university/v1/users/me/change-password \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"current_password": "oldpassword",
"new_password": "newstrongpassword123"
}'
Response
{
"success": true,
"data": null,
"message": "Password changed successfully"
}
Error responses
| Status | Code | Condition |
|---|
401 | AUTHENTICATION_ERROR | Current password is incorrect |
422 | VALIDATION_ERROR | New password doesn’t meet requirements |