Update a User
Update the information of a specific user.
Request URL
PUT {base_url}/services/openapi/v1.0/user/user_update
Request parameter
Body parameters
Important: It is recommended to include all the
parameters in an update request, as parameters not included in the request might be
set to NULL or reset to default settings.
Parameter | Required | Type | Description |
---|---|---|---|
memberId | Yes | Long | User's member ID. Note: You can query
the user's member ID using the Query Multiple Users
interface. |
Yes | String | Email address. | |
firstName | Yes | String | First name |
lastName | No | String | Last name. |
groupIds | Yes | Array <Long> | The ID(s) of the group(s) that the user belongs to. Note:
|
roleName | Yes | String | User role name. Valid value:
|
preferredBuildingName | Yes | String | The name of the building where the user's workplace is located. |
preferredFloorName | No | String | The name of the floor where the user's workplace is located. |
phone | No | String | Mobile phone number. |
imageBase64 | No | String | The Base64 string of the user's face image. |
idCode | No | String | The identification code that can be used to identify the user. |
sendInviteEmail | No | Boolean | Whether to send an invitation email to the user. Valid value:
|
Response example
Parameter | Type | Description |
---|---|---|
data | Object <Details> | The detailed information. |
status | String | The result of the request.
|
requestId | String | The ID of the request, which can be used to quickly locate the request. |
- Details
-
Parameter Type Description memberId Integer User's member ID.
Example
Request example
Change the email address of a specific user:
- User's member ID:
54164
. - New email address:
leo-new-email@yeastar.com
.
Important: It is recommended to include all the
parameters in an update request, as parameters not included in the request might be
set to NULL or reset to default settings.
PUT /services/openapi/v1.0/user/user_update HTTP/1.1
Host: workplace.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJncmFudF90eXBlIjoiY2xpZW50X2NyZWRlbnRpYWxzIiwic2NvcGUiOlsiL29wZW5hcGkvIl0sImVudGVycHJpc2VfaWQiOjEwMDQzMywicmVnaW9uIjoiR0wiLCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJiZTc0ZGY0OS1hNjdmLTQ2NzMtYTkzMi1iMzY3YWY4NDM5ZjYiLCJjbGllbnRfaWQiOiI3OTU2OGFhMC0wYjBkLTQyZjYtOGRiNC03OWExNmQ3MzQ3MmEiLCJ0cyI6MTY5MDE4MTA0NCwiZXhwX2luIjo4NjQwMH0.jEj9xU4KGu4phUKaIX1WLX_aW6ycjcU-iJV1_9b73QU
Content-Type: application/json
{
"memberId": 54164,
"email": "leo-new-email@yeastar.com",
"firstName": "Leo",
"lastName":"Ball",
"groupIds": [
1000127
],
"roleName": "Administrator",
"preferredBuildingName": "Yeastar",
"preferredFloorName": "2F",
"phone": "1325698753",
"imageBase64": "data:image/png;base64,iVBORw0Kxxxxxxxxxx+ny1BosNNgvBhn1jkKM65fc8EIkWK0iZx6u4pHHi0widJ5f/h4uGkwkr0HHedD/PwCOHV4VyXitAAAAAABJRU5ErkJggg==",
"idCode": "XZXXtest6701",
"sendInviteEmail": true
}
Response exampleHTTP/1.1 200 OK
{
"data": {
"memberId": 54164
},
"status": "Success",
"requestId": "531c47596e916ba22a0f5ad76df24074"
}