Delete User API
Introduced 1.0
Deletes the specified internal user.
Endpoints
DELETE /_plugins/_security/api/internalusers/{username}
Query parameters
The following table lists the available query parameters. All query parameters are optional.
| Parameter | Data type | Description |
|---|---|---|
wait_for_completion | Boolean | Whether to wait for the configuration write and reload to complete. When false, the API returns a task ID after validation. Default is true. |
Example request
DELETE _plugins/_security/api/internalusers/kirk
Example response
{
"status": "OK",
"message": "'kirk' deleted."
}
If you set wait_for_completion to false, a successful submission returns HTTP status 200, and the response contains a task ID instead of the completed result:
{
"task": "oTUltX4IQMOUUVeiohTt8A:1234"
}
Use the Get Task API to retrieve the task’s status and result. For more information, see Using wait_for_completion for configuration changes.