# Disable users **POST /_security/user/{username}/_disable** **All methods and paths for this operation:**
PUT /_security/user/{username}/_disable
POST /_security/user/{username}/_disable
Disable users in the native realm. By default, when you create users, they are enabled. You can use this API to revoke a user's access to Elasticsearch. ## Required authorization * Cluster privileges: `manage_security` ## Servers - http://api.example.com: http://api.example.com () ## Authentication methods - Api key auth - Basic auth - Bearer auth ## Parameters ### Path parameters - **username** (string) An identifier for the user. ### Query parameters - **refresh** (string) If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes. ## Responses ### 200 #### Body: application/json (object) object [Powered by Bump.sh](https://bump.sh)