Skip to main content
DELETE
/
users
/
:id
curl --location --request DELETE 'https://api.maytravel.com/users/1' \
  --header 'Content-Type: application/json'
{
  "mssg": "User number 1 deleted successfully"
}

Request

id
integer
required
The unique identifier of the user to delete
curl --location --request DELETE 'https://api.maytravel.com/users/1' \
  --header 'Content-Type: application/json'

Response

mssg
string
Success message confirming the user deletion
{
  "mssg": "User number 1 deleted successfully"
}

Error Responses

error
string
Error message describing what went wrong

Status Codes

  • 200 - Success: User successfully deleted
  • 500 - Server Error: Internal server error occurred

Notes

  • This operation permanently deletes the user from the database
  • The endpoint returns a success message even if the user ID does not exist
  • Consider implementing soft deletes or archiving for production systems
  • Be cautious when deleting users as this may affect related data (trips, interests, etc.)

Build docs developers (and LLMs) love