Skip to content

Update Profile

  • Endpoint Path: /api/fresns/v1/user/profile
  • Method: PATCH
  • Request: application/json

Headers Optional Parameter

KeyPublic Mode (Required)Private Mode (Required)
X-Fresns-Aidrequiredrequired
X-Fresns-Aid-Tokenrequiredrequired
X-Fresns-Uidrequiredrequired
X-Fresns-Uid-Tokenrequiredrequired

Body Params

KeyTypeRequiredDescription
usernameStringoptionalUsername
nicknameStringoptionalUser nickname
avatarFidStringoptionalAvatar image file FID
avatarUrlStringoptionalAvatar image URL
bannerFidStringoptionalBackground banner image file FID
bannerUrlStringoptionalBackground banner image URL
genderNumberoptionalGender: 1.Null 2.Female / 3.Male / 4.Custom
genderCustomStringoptionalGender Custom
genderPronounNumberoptionalPreferred Pronoun: 1.She / 2.He / 3.They
birthdayDisplayTypeNumberoptionalBirthday: 1.Y-m-d / 2.Y / 3.m-d / 4.Hidden
bioStringoptionalBio
locationStringoptionalLocation
moreInfoObjectoptionalmore info
archivesArrayoptionalExtended information

Request Description

  • Null to not modify.
  • Leaving both avatarFid and avatarUrl empty means not changing them, choose one when passing parameters.
  • Leaving both bannerFid and bannerUrl empty means not changing them, choose one when passing parameters.
  • If using fid for avatar and background banner images, first use the file upload interface, then pass the obtained fid as a parameter.
  • Example of extended information:
json
[
    {
        "code": "code",
        "value": "value", // Multiple selection values are stored in array format and passed as a string in the format ["value", "value"]
        "isPrivate": false, // Private or not (public display or not)
        "fskey": null // client fskey
    }
]

Return

json
{
    "code": 0,
    "message": "ok",
    "data": null
}

Released under the Apache-2.0 License