[role="xpack"] [[security-api-delete-role-mapping]] === Delete role mappings API ++++ Delete role mappings ++++ Removes role mappings. [[security-api-delete-role-mapping-request]] ==== {api-request-title} `DELETE /_security/role_mapping/` [[security-api-delete-role-mapping-prereqs]] ==== {api-prereq-title} * To use this API, you must have at least the `manage_security` cluster privilege. [[security-api-delete-role-mapping-desc]] ==== {api-description-title} Role mappings define which roles are assigned to each user. For more information, see <>. The role mapping APIs are generally the preferred way to manage role mappings rather than using <>. The delete role mappings API cannot remove role mappings that are defined in role mapping files. [[security-api-delete-role-mapping-path-params]] ==== {api-path-parms-title} `name`:: (string) The distinct name that identifies the role mapping. The name is used solely as an identifier to facilitate interaction via the API; it does not affect the behavior of the mapping in any way. [[security-api-delete-role-mapping-example]] ==== {api-examples-title} The following example delete a role mapping: [source,console] -------------------------------------------------- DELETE /_security/role_mapping/mapping1 -------------------------------------------------- // TEST[setup:role_mapping] If the mapping is successfully deleted, the request returns `{"found": true}`. Otherwise, `found` is set to false. [source,console-result] -------------------------------------------------- { "found" : true } --------------------------------------------------