Request
| Basic information | |
|---|---|
| HTTP URL | https://oapi.dingtalk.io/role/update_role |
| HTTP Method | POST |
| Supported app types | appType-Internal app |
| Required permissions | permission-qyapi_manage_addresslist-Contacts data management permission |
Query parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | 6d1bxxxx | The app credential used to call this API. Obtain it through the API for getting the access_token of an internal app. |
Request body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| roleId | Number | Yes | 1560985325 | The ID of the role to update. You can obtain it by calling the Get role list API. Roles in the “Default” group cannot be modified, including: Person in charge, Supervisor, Super Admin, and Sub Admin. |
| roleName | String | Yes | Apparel manufacturing | The new role name. |
Request example
Response
Response body
| Name | Type | Example | Description |
|---|---|---|---|
| errcode | Number | 0 | The return code. |
| errmsg | String | ok | The description of the return code. |
Response body example
Error codes
If an error occurs when calling this API, refer to the Global error codes document to find a solution based on the error message.| Error code (errcode) | Error message (errmsg) | Solution |
|---|---|---|
| 660000 | The parameter is empty | Complete the missing parameters. |
| 33011 | Invalid roleId | Check whether roleId is correct. |
| -1 | The system is busy | Try again later. |