更新企业成员状态
PATCH
/enterprise/v1/sub-accounts/{subAccountId}/statusstatus 必填:active 或 suspended。停用会级联禁用成员的活动 Key;重新启用会恢复本次停用所禁用的 Key。
身份验证
MANAGEMENT / PROVISIONING Key;tenant:members:write
Authorization: Bearer <CONTROL_KEY>
路径中的 subAccountId 必须属于当前企业;hash 是 Key 元数据标识,不能传明文密钥。
审批与重试
启用审批的企业需传 Idempotency-Key,可能返回 HTTP 409 / APPROVAL_REQUIRED,data.operation.executed=false;此时尚未执行,不应当作成功。未启用审批时直接执行;不要假设任意 POST 都支持幂等重试。
路径参数
subAccountIdstringrequired10-digit public member ID / 10 位成员编号
请求体
statusstringrequiredactive | suspended
字段使用 camelCase。必填项及可选字段见上文。
JSON
1{
2 "status": "suspended"
3}响应
HTTP 200; code: 200. 以下为示例值,字段使用 camelCase。
codeinteger200
dataobject | nulldata.subAccountIdstringdata.usernamestringdata.displayNamestringdata.statusstringdata.parentAccountIdstringdata.createdAtstringdata.lastLoginAtstring | nulldata.modelRestrictionstringdata.modelCountnumber错误处理
检查 HTTP 状态和 code,失败时读取 serviceCode、msg、traceId。无效凭证无法读取数据;缺少 scope 返回 API_KEY_SCOPE_DENIED。跨企业资源不可访问。不要把 202 接受或审批待处理当作业务完成。
此页面对您有帮助吗?