Update user status¶
Enable or disable the specified user’s workspace membership. When disabled, the user can no longer access the current workspace.
POST https://moi.matrixorigin.cn/newmoi/user/update_status
Preparation before calling¶
First select the user and confirm the membership to enable or disable.
Prepare a personal access token and target workspace ID with the required permissions for the target workspace.
Request parameters¶
curl -X POST "https://moi.matrixorigin.cn/newmoi/user/update_status" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"id": "user-001"
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
User ID. |
|
string |
Yes |
Status action. It must be |
Successful response¶
On success, the user has been enabled or disabled and data is null.
{
"code": "OK",
"msg": "OK",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
null |
Always |
Error response¶
{
"code": "INVALID_ARGUMENT",
"msg": "请求参数无效",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
Error code. |
|
string |
Error message. |
|
null |
— |
Last updated on