Update a user's phone number
Profile Management
Update Phone Number
Admin-only endpoint to update the phone number stored in a user’s personal information.
PUT
Update a user's phone number
Admin-only endpoint to update the phone number stored in a user’s personal information.
Request
Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token |
| Content-Type | string | Yes | application/json |
Request Body
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
| payload | object | Yes | Update payload |
| payload.userId | string | Yes | User ID to update |
| payload.phone | string | Yes | New phone number |
Response
200 OK - Successfully updated phone number
400 Bad Request
401 Unauthorized
404 Not Found
500 Internal Server Error
Example
Notes
- This is an admin-only endpoint - requires administrative privileges
- Phone numbers should be in E.164 format (e.g., +1-555-555-5555)
- The user ID must be a valid MongoDB ObjectId
- Phone numbers should be validated for proper format
- Only administrators can update other users’ phone numbers