Endpoint
Authentication
Description
Permanently deletes a medical specialty from the system. This is a hard delete operation that removes the record from the database.Path Parameters
Unique identifier of the specialty to delete
Response
Returns a success message confirming the deletion.Response Fields
Confirmation message indicating successful deletion
Example Request
Example Response
Error Responses
401 Unauthorized
Missing or invalid authentication token
403 Forbidden
User does not have admin role
404 Not Found
Specialty with the specified ID does not exist
409 Conflict
Cannot delete specialty because doctors are assigned to it
500 Internal Server Error
Server error while deleting specialty
Foreign Key Constraint
Cannot delete specialty with assigned doctorsIf any doctors are currently assigned to this specialty, the deletion will fail with a 409 Conflict error. You must either:
- Reassign all doctors to different specialties using the Update Doctor endpoint
- Deactivate the doctors using the Delete Doctor endpoint