POST
/
users
/
profile
/
edit
Edit user profile
curl --request POST \
  --url https://localhost:5000/users/profile/edit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "username": "<string>",
  "bio": "<string>",
  "gender": "<string>",
  "image": "<string>"
}
'
{
  "success": true,
  "message": "Profile updated successfully",
  "user": {
    "name": "<string>",
    "username": "<string>",
    "email": "jsmith@example.com",
    "_id": "<string>",
    "image": "<string>",
    "bio": "<string>",
    "gender": "<string>",
    "emailVerified": true,
    "followers": [
      "<string>"
    ],
    "following": [
      "<string>"
    ],
    "bookmarks": [
      "<string>"
    ],
    "blocked_users": [
      "<string>"
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
username
string
bio
string
gender
string
image
string

Image URL

Response

Profile updated successfully

success
boolean
Example:

true

message
string
Example:

"Profile updated successfully"

user
object