Edit a Colleague
Edit the information of a colleague.
Request URL
PUT {base_url}/user/openapi/user/v1/colleagues/{colleaguesId}
Request parameters
- Headers
-
Parameter Required Description User-Agent Yes Provide information about the user agent, such as the type of web browser, operating system, software version, etc., so as to help Yeastar Partner Portal to identify the user or the application that is making the request. Example:
User-Agent: OpenAPI.Authorization Yes Pass the access token in the header, so as to authenticate the API request. Format: Bearer {access_token}.
- Path parameter
-
Parameter Required Type Description colleaguesId Yes String The unique ID of the colleague.
Note: You can obtain colleague ID using the Query Colleague List interface. - Body parameters
-
Parameter Required Type Description resourceIds Yes Array The IDs of the permissions to be assigned to the colleague. Note: You can query permission IDs using the Query User Permission interface.firstName No String First name. Note: EitherfirstNameorlastNameis required.lastName No String Last name. Note: EitherfirstNameorlastNameis required.remark No String Remark. userStatus No String Account status. Valid value:UnActiveFrozen
password No String Account password. isRmUser No Integer Whether to assign the RM role to the colleague, allowing the colleague to manage PBXs associated with the account in Yeastar Central Management. Valid value:0: No1: Yes
Response parameters
| Parameter | Type | Description |
|---|---|---|
| code | String | The response message of the API request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| result | String | The result of the operation. |
| status | Integer | The HTTP status code of the API request. |
Example
Request example
Edit the password for a colleague.
PUT /user/openapi/user/v1/colleagues/3525087957434159104 HTTP/1.1 Host: openapi.partner.yeastar.com Content-Type: application/json User-Agent: OpenAPI Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsicmVzMSJdLCJYLU1TLVVTRVIiOiJ7XCJleHByXCI6XCIwXCIsXCJ0eXBlXCI6XCJwYXJ0bmVyXCIsXCJ1Y0lkXCI6XCIzMDc2OTE1NDU0NDY4NzY3NzQ0XCIsXCJ1c2VyQ29kZVwiOlwiUGFydG5lclwiLFwidXNlcklkXCI6XCIzMDc2OTE1NDU0NDg5NzM5MjY0XCIsXCJ1c2VybmFtZVwiOlwicGFydG5lcmV4YW1wbGVAb3V0bG9vay5jb21cIn0iLCJ1c2VyX25hbWUiOiJwYXJ0bmVyZXhhbXBsZUBvdXRsb29rLmNvbSIsInNjb3BlIjpbImFsbCJdLCJleHAiOjE3Mzk3MTc5MjYsInRva2VuX3R5cGUiOiJvcGVuYXBpIiwianRpIjoidmlzMkh0QkxaUStNQmxPbS9UdThWR1pyNFljPSIsImF1dGhvcml0aWVzIjpbIjc5Il0sImNsaWVudF9pZCI6IjE0NDI5NjM2ODBiMjM0YjA0YmRjZDVjMTZmODcyOWQ2In0.RPRoTJRkXCB4krDSwGRpUFyCfUVv2LHjIiBICA1pCiY { "colleaguesId":3525087957434159104, "password":"Abc22zb786523", "firstName":"Demo", "resourceIds": [ "8", "10", "18", "19", "20", "405", "22", "407", "409", "29", "30", "31", "32", "33", "34", "291", "292", "293", "295", "297", "43", "44", "45", "315", "316", "318", "319", "320", "321", "328", "329", "330", "331", "205", "334", "207", "210", "214", "215", "216", "344", "217", "218", "219", "220", "221", "222", "226", "227", "483", "484", "229", "365", "366", "367", "369", "373", "374", "383" ] }
Response example
{
"code": "success",
"detailMessage": "",
"requestId": "c200d82539e116caefb648a0f2c6747b",
"result": null,
"status": 200
}