We should always try to keep the communication between the client and the server private.
Developers use APIs to build their services and transfer data. If an API is broken, exposed, or has major data breaches, it definitely will not be chosen by any developer.
Try to validate request parameters from the beginning. Implement validation checks and block every request that does not pass that specific validation. Include validations for input types, formats, and length. Accept only certain HTTP methods for specific endpoints and include timestamps for your request just so only the ones that are made in a certain timeframe will be accepted. This prevents some of the brute force attacks that will possibly hit your servers.
You can take your authentication security a step further by implementing the OAuth 2.0 authentication framework. With the help of third-party apps, you can create a more secure environment for your users.
Never expose delicate information, like usernames, passwords, API keys, etc., in URLs. If you really need to transfer this information by storing it in the URL, serialize how only the machine you need to communicate with will understand the received data.