# Bulk delete roles **DELETE /_security/role** The role management APIs are generally the preferred way to manage roles, rather than using file-based role management. The bulk delete roles API cannot delete roles that are defined in roles files. ## 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 ### 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. ### Body: application/json (object) - **names** (array[string]) An array of role names to delete ## Responses ### 200 #### Body: application/json (object) - **deleted** (array[string]) Array of deleted roles - **not_found** (array[string]) Array of roles that could not be found - **errors** (object) Present if any deletes resulted in errors [Powered by Bump.sh](https://bump.sh)