v1

latestOpenAPI 3.0.3raw.githubusercontent.com2024-10-2916802.4 MB
📸 Social Media

Update user profile

The API endpoint allows users to update their social media profiles.

By accessing this endpoint, users can make changes to their profile information such as name, bio, contact details, dob, basic details or any other relevant fields.

NOTE: To update avatar or cover image we have separate endpoints.

Update avatar: Apps > Authentication > Update avatar

Update cover image: Apps > Social Media > Update cover image

patch/social-media/profile

Request body

biostring
countryCodestring
dobstring
firstNamestring
lastNamestring
locationstring
phoneNumberstring

Example request

{
  "bio": "This is my bio text",
  "countryCode": "+91",
  "dob": "2023-06-20T17:25:24.365Z",
  "firstName": "John",
  "lastName": "Doe",
  "location": "Mumbai, India",
  "phoneNumber": "8273827837"
}

Response

Update user profile

messagestring
statusCodenumber
successboolean

Example response

{
  "data": [
    {
      "__v": 0,
      "_id": "6491e1315420697399d92653",
      "account": {
        "_id": "6491e1045420697399d92643",
        "avatar": {
          "_id": "6491e1045420697399d92642",
          "localPath": "",
          "url": "https://via.placeholder.com/200x200.png"
        },
        "email": "user.email@domain.com",
        "isEmailVerified": false,
        "loginType": "EMAIL_PASSWORD",
        "role": "ADMIN",
        "username": "doejohn"
      },
      "bio": "This is my bio text",
      "countryCode": "+91",
      "coverImage": {
        "_id": "6491e500e7459f659f3fe8a8",
        "localPath": "public/images/bottle.jpg-168728294397895743007.jpg",
        "url": "http://localhost:8080/images/bottle.jpg-168728294397895743007.jpg"
      },
      "createdAt": "2023-06-20T17:26:09.021Z",
      "dob": "2023-06-20T17:25:24.365Z",
      "firstName": "John",
      "lastName": "Doe",
      "location": "Mumbai, India",
      "owner": "6491e1045420697399d92643",
      "phoneNumber": "8273827837",
      "updatedAt": "2023-06-20T17:42:44.641Z"
    }
  ],
  "message": "User profile updated successfully",
  "statusCode": 200,
  "success": true
}