Set a subaccount role
Set the role for another local subaccount the caller can manage.
POST /api/open/v1/account/setSubAccountRole
Requires the “Sub-account Manage” permission.
Send the Idempotency-Key header with 1 to 128 visible ASCII characters.
Request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| uid | String | Yes | Subaccount UID, up to 127 characters. See listSubAccounts. |
| roleId | Integer | Yes | Role ID. See listAssignableRoles. |
Response fields
| Fields in data | Type | Description |
|---|---|---|
| uid | String | Subaccount UID. |
| roleId | Integer | Role ID. |
Request example
{
"uid": "sample-user-1042",
"roleId": 8
}
Response example
{
"requestId": "c07d02b2-f2f3-5682-92e8-aebe90072327",
"code": "OK",
"msg": "Request succeeded.",
"data": {
"uid": "sample-user-1042",
"roleId": 8
}
}