Subscribe to the API Design blog or our podcast for more tips from industry experts.
What is API strategy? We’re in the stage of the API evolution where organizations are beginning to understand the importance of APIs, beyond just their architectural outputs. And an effective API design strategy plays a vital role in allowing API consumers to easily take advantage of the exposed services and integrate them into various use cases, ensuring the API realizes its full value.
Design is what communicates how developers will use your API. If the design is off, your API will be of poor quality and difficult to consume, leading to lower adoption rates.
So, getting the design right is critical.
On our podcast we recently interviewed Matthew Reinbold, who has worked at several Fortune 500 companies over years and who is the author of Net API Notes newsletter. You can watch that episode here, or check out some of the below Matthew shared five important considerations for achieving a great API design and optimizing the consumer experience. Let's get into some API strategy best practices!
Five Important Considerations for Great API Design
1. Understand your consumers’ needs
“It begins with finding out who’s going to use the API, sitting down with that person and listening to what they say and what they need.” - Matthew Reinbold.
Designing a great API strategy should begin with understanding your consumers’ needs. You could be putting the cart before the horse if you start building an API without considering the wishes of the potential end-users.
For example, if you’re struggling with whether to use GraphQL or REST for designing an API, you should ask your API consumers about their preferred architectural style.
Always go with style that best reflects your customers’ needs and preferences because they are the ones ultimately going to utilize your API. Even at the design stage, the customer is still the king.
2. We’re All Human
“If somebody does not mind that human side, the technology side will eventually have problems.” - Matthew Reinbold.
Having empathy for the end-user, whether it’s an internal or public-facing API, is vital for your API strategy’s well-being. Incorporating human elements in API design is important for the success of your API program. Without enough care and consideration for the consumer, the API could hit a dead end.
APIs are supposed to be an abstraction of complexity. If there is no empathy, however, APIs are no longer celebrated as capable of removing the complexity in developing software. Without compassionate design, it’s difficult to see through the lens and remove the barriers that can make an API complicated otherwise.
If you do not care about the person on the other side of the value chain, or if the API remains just an automated output in which it’s somebody else’s problem to comprehend and make sense of, consumers will have a poor experience trying to understand its bits and bobs.
3. Practice incremental improvement
As I always say, “it’s important to understand enough about how your business works to know how to justify what makes sense to do first.” Building an excellent API program is a journey, not a destination. As you enhance your offerings or receive feedback from consumers, you should make improvements to your API design.
When making improvements, start small and incrementally introduce new changes—instead of burning the whole ship and starting all over again.
You also need to understand the dynamics of your organization before suggesting any API changes; otherwise, your proposals may not see the light of day. How are decisions made? How does power flow within your organization? How can your initiatives make everyone successful in that system?
4. Enforce useable documentation
“It’s important to clearly communicate the documentation expectations and when things deviate from expectations.” - Matthew Reinbold.
An API is only as good as its provided documentation. You could mess your entire API design strategy if developers have to guess how to use your API.
If you provide comprehensive, accurate, and easy-to-digest documentation, developers will get started consuming your API within a few minutes. You should aim for consistent terminology, proper naming, and uniformity throughout the documentation. API versions should also be properly documented. In case of any changes in how the API operates, those should also be communicated well. It’s important to document APIs using a simple language devoid of jargon or uncommon abbreviations. Sticking to universally accepted naming conventions will make your documentation easier to understand than using complicated, domain-based terminologies.
5. Implement effective governance
“So, there is no chiseling into stone. There is no solving everything for everyone, because that is a constantly moving target,” - Matthew Reinbold.
Establishing an effective governance structure can lay the foundations for the success of your API design framework. Without a well-thought-out governance plan, your API could lose focus, and managing it could be difficult.
When creating an API governance structure, you should start by identifying the pains you’re trying to solve. How will it increase the adoption of the API? How will it enhance communication and relationships in your team?
You also need to opt for a decentralized, community-driven API governance style. Instead of providing stone-inscribed rules and regulations for everyone to follow, allow your team to provide their input on how the API program should be managed.
It’s important to go for small, uncontroversial concepts when implementing a governance plan. If you introduce ideas that are not universally accepted or strange to your team, you could be building your governance strategy on sinking sand.
Great Design = Saving Money, Saving Time, & Promoting Creativity
Publishing an API without taking into consideration the above elements of a great design is a recipe for disaster.
When it comes to designing APIs, optimizing for the user experience is key. A good API should be gentle to beginners and empowering to experienced developers. Following these best practices can help you in designing and releasing excellent APIs.
It was a real joy interviewing Matthew, and I can’t wait for you all to see the rest of our episodes! If you have a question for us, submit it here. For more tips and tricks about API design and development, and API strategy and practice, subscribe to our podcast.