Endpoint
Authentication
Description
Creates a new medical specialty in the system. Specialties are used to categorize doctors and help patients find the right medical professional for their needs.Request Body
Name of the medical specialty. Must be unique.
Description of what the specialty covers or treats
Response
Returns the newly created specialty object.Response Fields
Unique identifier for the newly created specialty
Name of the specialty
Description of the specialty (null if not provided)
Example Request
Example Response
Error Responses
400 Bad Request
Missing required field
401 Unauthorized
Missing or invalid authentication token
403 Forbidden
User does not have admin role
409 Conflict
Specialty name already exists
500 Internal Server Error
Server error while creating specialty
Notes
- The specialty name must be unique across the system
- The description field is optional but recommended for better user understanding
- Once created, the specialty can be assigned to doctors