Skip to Content
HomeLink Hub
Users & Profile

Update phone number and avatar

PUT
/api/v1/user/profile

Access: Bearer token required.

Sets the user's phone and/or avatar. Only these two fields are read; anything else in the body is ignored, and a field that is omitted is left unchanged. There is no request validation on this route, and it does not accept a file upload: avatar is stored exactly as sent, so upload the image elsewhere first and send its URL. Use PUT /user/personal-info for names, email, bio, business name and gender.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Request Body

application/json
  1. body
phone?string

Phone number. Stored trimmed; the format is not validated here.

avatar?string

URL of the profile picture. Stored as sent.

Response Body

Profile updated

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X PUT 'http://localhost:4000/api/v1/user/profile' \  -H 'Content-Type: application/json' \  -d '{  "phone": "+2348031234567",  "avatar": "https://cdn.example.com/avatars/adaeze-okonkwo.jpg"}'
Example Response
{  "status": 200,  "success": true,  "message": "Profile updated successfully.",  "data": {    "id": "665f1c2e9b1d4a0012ab34cd",    "firstName": "Adaeze",    "lastName": "Okonkwo",    "phone": "+2348031234567",    "avatar": "https://cdn.example.com/avatars/adaeze-okonkwo.jpg"  }}