An API is a user interface for developers. Put the effort in to ensure it’s not just functional but pleasant to use.
Vinay Sahni has a rather lengthy, detailed, and well-rounded post on how to design a good RESTful API. It covers pretty much everything from URL structures and parameters, request methods, to error handling, documentation, and coding style.
You can also checkout http://jsonapi.org/ It is missing some stuff but it is pretty good.
Thanks Neophytos. It’s good indeed.