Build better APIs by establishing API Design Guidelines

Prashant Agrawal
2 min readMay 7, 2019

--

Photo by Mia Baker on Unsplash

In one of my previous article, I talked about how developers can design better APIs using concepts and processes which are used to design beautiful User Experiences. One important point that I touched in that article was how building a design guideline can help you and your organization build quality, consistent and easy to use APIs.

Most of the organizations already use Design Systems to build UI for their products, but I think it is equally important that we start doing this for APIs as well. As your organizations will scale and will have several services exposing APIs, enforcing consistency will become hard and it might harm the User Experience that developers have with your APIs.

I understand that building your own API Design Guidelines might seem like a daunting and resource consuming task and that’s why to give you a bit of headstart I have published an API Design Guideline template on Postman. You can just import it and start referring it or modify it according to your need.

Importing API Design Guideline template

Some of the things that this guideline covers are:

  • How to name your API URLs
  • Which HTTP methods to use and when
  • Using the right status codes
  • How to support Pagination, Searching, Filtering and Sorting in your APIs
  • API Versioning
  • How to handle errors and return a response that helps developers debug the issue.

I hope you would find this useful in designing your next set of APIs. If there is anything more you would want to see as part of this API Design Guideline, please let me know.

--

--