English
Batch Set User Roles (Overwrite)
About 134 wordsLess than 1 minute
2026-01-19
Description
Batch set user roles (overwrite existing roles)
Request Specification
Method: POST + application/json
Endpoint: https://${Cloud Domain}/cgi/crm/v2/special/roleAdd?thirdTraceId=${Random String}Headers: Refer to Common Parameters
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | Map | Yes | Dataset |
| majorRole | String | No | Primary role code |
| roleCodes | List | Yes | Role codes |
| userIds | List | Yes | User list |
Request Example
{
"data": {
"userIds": [
"FSUID_XXXXXXXXXXXXXXXXX"
],
"roleCodes": [
"22222"
],
"majorRole": "xxxx"
}
}Response Parameters
| Parameter | Type | Description |
|---|---|---|
| traceId | string | Unique request ID |
| errorDescription | string | Error description |
| errorMessage | string | Error message |
| errorCode | Int | Error codes |
Response Example
{
"traceId": "E-O.827xxxxxx",
"errorDescription": "success",
"errorMessage": "OK",
"errorCode": 0
}Notes
- Do not use the
messagefield in the response for logical judgments, aserrorMessagemay change.
