There are basically ten guidelines that you can follow to make your API endpoints better:

  1. Use nouns.
  2. Use intuitive, clear names.
  3. Use lowercase letters.
  4. Avoid special characters.
  5. Use forward slash (/).
  6. Separate words with hyphens.
  7. Don’t use file extension.
  8. Use camelCase for parameters.
  9. Use API versioning.
  10. Consistency.

They do seem very simple to follow, but they are what can make your endpoints look better. So, let’s get started!

#javascript

10 Best Practices for Naming REST API Endpoints
1.50 GEEK