A big wave crashing over a secure lighthouse - security lookout concept

API Security: 6 Important Best Practices

4 minute read
Kaya Ismail avatar
Gartner predicted that application security spending would reach $3.2 billion in 2020, a 6% increase from 2019 and with it comes the need for API security.

APIs play an essential role in the modern enterprise, and their value will continue to grow as new applications, and IoT devices are created. APIs make integrations and connecting ecosystems much easier for developers, which has added benefits for enterprises and their customers. 

However, APIs are also susceptible to hackers who can exploit them for malicious gain. Cybersecurity is critical for businesses today, and Gartner predicted that application security spending would reach $3.2 billion in 2020, a 6% increase from 2019. API security is not to be overlooked, so we spoke to API experts to understand why API security is important and how businesses can keep their applications secure. 

What is API Security (And Why Should It Be a Priority)?

APIs expose an organization’s services and digital assets in a controlled manner. Matthew Gardiner, Principal Security Strategist at London-based cybersecurity firm Mimecast, explains that “API security is providing security controls to an organization’s, generally public-facing service APIs.

Only the correct individual or organization must receive access to the data exposed by an API. The integrity of that data must be maintained as it is moving between the API service provider and consumer. 

APIs provide a way for hackers to access data because “developers are not natively trained to think about security. The advent of newer efficiency-focused development tools do not take a systemic view and cause developers to become that much more silo focused,” says Sashank Purighalla, Founder and CEO of cloud engineering and cybersecurity company, BOS Frameworks

Purighalla points out that system-focused hackers “are intentionally looking for those gaps that exist in-between systems. And it is in-between places that vulnerabilities exist.”

So how can companies maintain the security of their APIs?

Gardiner believes organizations should, “use a layered security approach that includes security controls such as authentication, authorization, encryption, denial-of-service protection, and ongoing monitoring.” This layered approach combines several methods to protect your APIs. While each individual approach within this multi-layered approach covers a specific focus area, the unified effect increases the chances of stopping API breaches. Here are some API security best practices that can be combined to create such an approach. 

Related Article: Are Headless CMS Less Susceptible to DDoS Attacks?

Standard API Security Best Practices

Identify Vulnerabilities

Knowing the areas in your API lifecycle that are insecure is the first step to securing them. Map out your entire lifecycle and be aware of where your API components exist. Understanding how everything fits together will enable you to pinpoint weaknesses where your API can be exploited. Scanning for incorrect code and testing your routines can also help to identify where issues may occur. 

Use Tokens

Access tokens allow an application to access your API. Once the authentication and authorization process is completed, an access token is provided. Tokens enable you to create trusted identities and assign tokens to those identities to control access to the API. 

Learning Opportunities

Data Encryption

Encrypting data using Transport Layer Security (TLS) and requiring a signature can help guarantee that only authorized users access data.

API Gateways

API gateways act as a single point of entry for all API calls and enable you to authenticate API traffic. They also provide an avenue for teams to more easily implement other security best practices. 

CTO and co-founder of San Francisco, California-based Kong Inc. Marco Palladino notes that “an essential line of defense is to ensure that all communications between the API gateway and clients are sent over HTTPS, even if authentication is not required.”

Enterprises should also continually monitor their APIs to remove those not in use or that don’t include new security measures. 

Throttling and Rate Limits

When an API is receiving too many calls, it could indicate that the API is being attacked or there is an error in the code. By placing limits on how often an API can be called and throttling connections, you can protect it from traffic spikes and DDoS attacks. 

Authentication and Authorization

Many APIs are easily discoverable, and that is music to the ears of hackers. To control the number of API requests and who receives access you should “gate your API documentation behind authorization credentials,” recommends Purighalla. 

Purighalla also suggests avoiding making APIs too user-friendly. Hackers frequently impersonate users and use descriptive error messages to peek under the hood. At times, saying that an account wasn’t found instead of pointing out, there was an incorrect password can prevent a hacker from gaining too much useful information.

About CMSWire

For nearly two decades CMSWire, produced by Simpler Media Group, has been the world's leading community of customer experience professionals.


Today the CMSWire community consists of over 5 million influential customer experience, digital experience and customer service leaders, the majority of whom are based in North America and employed by medium to large organizations. Our sister community, Reworked gathers the world's leading employee experience and digital workplace professionals.

Join the Community

Get the CMSWire Mobile App

Download App Store
Download google play