API Naming Conventions

So you’ve figured out what API endpoints you need and what HTTP methods you’re going to use, but you’ve now started building your API and you’re unsure how to name your models and controllers… Are the controllers singular? plural?  what about the models? Well, this post should help clear it up.


In a RESTful API, the routes should always be plural.

So for an endpoint listing all of the notes the route would be:


The endpoint listing a singular note would be accessed via:



The controllers in your application should use the same naming convention as your routes. So the controller for the Notes endpoints would be:



Your models interact with a single instance/object of (in this case) a note. So your model should be singular.


Database Tables

The tables in your database should be plural, as these contain multiple instances of that object. So in this case, the table would be called:


About the Author

Posted by



Add a Response

Your name, email address, and comment are required. We will not publish your email.

The following HTML tags can be used in the comment field: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>