---
title: "Change current user's password with old password verification."
method: PATCH
path: "/api/v1/user/me/change-password"
---

# Change current user's password with old password verification.

`PATCH /api/v1/user/me/change-password`

**Authentication**: JWT token required
**Access**: Secure password change requiring current password verification
**Security**: Validates old password before allowing change

**Request Schema**:
```json
{
  "old_password": "currentPassword123",
  "new_password": "newSecurePassword456"
}
```

**Request Fields**:
- `old_password`: Current password for verification (required)
- `new_password`: New password to set (required)

**Response Schema**:
```json
{
  "data": {
    "id": "user-123",
    "email": "user@example.com",
    "name": "John Doe",
    "role": "USER",
    "created_at": "2025-01-15T10:30:00Z",
    "updated_at": "2025-01-15T12:30:00Z",
    "password_last_changed": "2025-01-15T12:30:00Z"
  }
}
```

**Security Features**:
- Verifies current password before allowing change
- Enforces password strength requirements
- Updates password change timestamp
- Invalidates existing sessions (optional security measure)
- Logs password change event for audit

**Password Requirements**:
- Minimum length (typically 8+ characters)
- Must include mix of letters, numbers, and special characters
- Cannot be same as current password
- Cannot be common or easily guessable passwords

**Use Cases**:
- Regular password rotation for security
- Password change after suspected compromise
- Compliance with security policies
- User-initiated security enhancement

**Error Responses**:
- `400 Bad Request`: Missing required fields
- `401 Unauthorized`: JWT token required or incorrect old password
- `422 Unprocessable Entity`: New password doesn't meet requirements
- `500 Internal Server Error`: Password change failed

## Request body

- object

## Response `200`

Success

- object

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/trends/apis/trends-earth-api.md) · [All operations](https://skmtc.dev/trends/apis/trends-earth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trends/trends-earth-api/revisions/6bdbc0b84666/schema)
