Swagger Petstore - OpenAPI 3.0
DELETE/user/{username}

Delete a user

Deletes an existing user account identified by username. Use username to select the account to remove, and perform this operation only when the authenticated user is permitted to delete that account.

1 parameter
usernamestringrequired
The username of the user to delete.

4 status codes
200Confirms that the specified user was deleted successfully.
400Returned when the supplied username is invalid.
404Returned when no user exists with the supplied username.
defaultUnexpected error

Error handling

A 400 is returned when username is invalid. A 404 is returned when no user exists with the supplied username, which must identify the account to delete.