Update a user

put

/swm/rs/v1/sites/{siteId}/users/{userId}

Update a specific user's profile information.

User being updated must be the same as the API user.

All Request JSON parameters are optional, but at least one is required.

Request

Supported Media Types
  • application/json
Path Parameters
siteId
Type: string
Required: true
The ID of the site resource
userId
Type: string
Required: true
The ID of the user resource
Body Parameter
{
"emailAddress":"string", - New email address for the user (optional)
"firstName":"string", - New first name for the user (optional)
"lastName":"string", - New last name for the user (optional)
"mediaId":"string", - The mediaId obtained from the User Media API (optional)
"notifyCommentFlag":"number", - 0 (no) or 1 (yes), default 0 (optional)
"notifyNewMemberFlag":"number" - 0 (no) or 1 (yes), default 0 (optional)
}
Root Schema : /paths/~1swm~1rs~1v1~1sites~1{siteId}~1users~1{userId}/put/parameters/0/schema
Type: string

Response

Supported Media Types
  • application/json; charset=UTF-8
200 Response
user resource updated
403 Response
user resource action forbidden
404 Response
user resource not found

Examples

Sample Request:

       {
        "firstName":"John",
        "lastName":"Doe",
        "notifyCommentFlag":"1",
        "notifyMemberFlag":"1"
       }    

Sample Response:

       {"response":{"code":"200.1","developerMessage":"user resource updated" },
        "userId":"nNGCePPATZMzzpCm"
       }    

Possible Error Codes:

       {
          "code":"404.0","developerMessage":"user resource not found"
       }