Skip to content

What is an API and what is it for?

The contract two software systems use to exchange data and functions without knowing each other's code.

An API (Application Programming Interface) is the contract by which one software system exposes some of its functions or data to other programs, defining exactly which requests it accepts, which responses it returns and under what rules, without the party using it needing to know how the system works inside. It is the same principle as a wall power outlet: an appliance plugs in without knowing how the power plant that generates the current is built, as long as it matches the agreed plug shape and voltage. When accounting software asks a bank for an account balance, or an e-commerce site asks a courier for a shipment's tracking status, that exchange goes through an API: a request in a precise format, a response in an equally precise format, and neither side has to read the other's source code. It is the contract, not the implementation, that lets two systems written by different companies talk to each other.

See also: API gatewayThe single entry point for externally exposed APIs: authentication, rate limiting, versioning and CORS handled outside application code.

REST, the most common contract

The most common style for building a web API is REST (Representational State Transfer): every resource, a customer, an order, an invoice, has its own address, and operations on it use the standard methods of the HTTP protocol, whose current semantics are defined by RFC 9110: GET to read, POST to create, PUT to modify, DELETE to remove, with response codes (200, 404, 500) that communicate the outcome without having to parse the response body. Alternatives such as GraphQL and gRPC exist, but it is the style an SME almost always encounters when integrating a business system or a SaaS product. A REST API is described precisely by the OpenAPI Specification: a vendor that publishes one lets client code, tests and documentation be generated automatically, while one that does not forces you to discover the API's behavior by trial and error.

Webhooks versus polling

Whoever consumes an API has two ways to learn something happened. With polling, the calling system queries the API at regular intervals for anything new: simple to implement, but it wastes calls when there is nothing to report and adds a delay equal to the chosen interval. With a webhook, the API itself calls an address agreed in advance the moment the event happens, a payment confirmed, a shipment dispatched: nearly instant, but it needs a public endpoint that is always reachable and a plan for messages lost if that endpoint is offline when they arrive. The practical choice follows urgency: rare or urgent events go through a webhook, frequent reads of slowly changing data go through polling.

A concrete example

An SME sells online, and every e-commerce order has to reach the business system for invoicing and inventory. If the business system has documented REST APIs and a webhook on confirmed payment, the order arrives as soon as the customer pays and updated stock levels flow back to the site the same way. If it can only export and import CSV files, a script has to load them at fixed times: orders arrive late, a renamed column breaks the import without warning and errors are found by hand.

Why it matters for decision makers

When evaluating a new business system or SaaS product, beyond the price you need to ask whether it has public APIs and how well they are documented. Without public APIs, every future integration, with e-commerce, with a CRM, with a reporting dashboard, requires fragile workarounds instead of a direct connection, the ground an API gateway or an iPaaS works on. And there is a part that only shows up at the end of the contract: the same APIs that bring data into a system are often the only ones that let it back out the day you switch vendors, so the absence of public read APIs is a constraint on the exit strategy as much as on integration. The same principle, applied to AI agents, underpins more recent protocols such as MCP.

  • API gatewayThe single entry point for externally exposed APIs: authentication, rate limiting, versioning and CORS handled outside application code.
  • iPaaSA managed platform connecting applications and data through ready-made connectors, instead of one integration per pair of systems.
  • EDIThe automatic exchange of structured business documents between the systems of two different companies.
  • MCP (Model Context Protocol)MCP is an open protocol connecting AI applications to external data and tools, with standard messages to discover and use the capabilities a server exposes.
  • Software exit strategyThe document stating how you leave a software vendor: data, formats, timing, support and the cost of exit.

See it in the universe

If it reminds you of a system nobody dares touch anymore, that is what I put back in order.

See Software Rescue

Or write to me.