An API is an acronym for application programming interface.
What is being thought of in this case is more specifically a web API.
APIs do exist that do not require web interaction.
A web API allows one computer application to talk to another
Since two computer servers are exchaging information, some form of HTTP or HTTPS is performing the conversation.
For this reason, knowledge of HTTP request methods and status codes is required to understand web APIs.