I have created an endpoint that searches for a particular user based on their email address if one is provided as a query parameter on a GET request: ...person/search?email=. I would like to extend this endpoint so that it can also optionally accept an SMS number, something like ...person/search?sms=. However, I do not want people to be able to search using both - only ?email= or ?sms=.
Am I going about this the wrong way? Should I set up an entirely different endpoint to search by SMS number?
 
    