Updated on 2025-10-16 GMT+08:00

Disabling a User

Function

This API is used to disable a user.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v1/csms/users/{user_id}/disable

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

user_id

Yes

String

User ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

It can be obtained by calling the IAM API. The token is the value of X-Subject-Token in the response header.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

user_id

String

User ID.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error details.

Example Requests

Disable a user based on the imported user ID.

/api/v1/tenant/users/{user_id}/disable

Example Responses

None

Status Codes

Status Code

Description

200

Request succeeded.

400

Request failed.

Error Codes

See Error Codes.