Software Development

API

Updated: September 5, 2026

An API (Application Programming Interface) is a set of rules and protocols that enable one software application to communicate with another. APIs define the methods, data formats, and conventions that applications use to request and exchange information — without needing to know how the other side is implemented internally.

In practice, an API is what allows a mobile app to fetch data from a server, a website to process a payment, or a script to interact with an external service. It acts as a contract between the caller and the provider: as long as both sides follow the agreed format, the implementation details can change independently.

How APIs Work

Most modern web APIs follow a request-response model over HTTP. A client (such as a browser or mobile app) sends a request to a specific URL — called an endpoint — including an HTTP method that describes the action. The server processes the request and returns a response, typically in JSON format.

A typical request might look like:

GET /api/articles/42 HTTP/1.1
Host: example.com

And the response:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 42,
  "title": "Introduction to APIs",
  "status": "published"
}

Common HTTP Methods

APIs use standard HTTP methods to indicate what operation the client wants:

Each method has specific semantics. Using them correctly makes APIs predictable and easier to integrate.

Common Response Status Codes

When a server responds to an API request, it includes a status code indicating the outcome:

Understanding these codes helps developers diagnose issues quickly when integrating with APIs.

How APIs Are Consumed

Developers interact with APIs through client libraries, SDKs, or direct HTTP requests. Most APIs require authentication — typically via API keys, OAuth tokens, or JWT (JSON Web Tokens) — to identify the caller and control access.

APIs are also the foundation of modern integrations: payment processing (Stripe), email delivery (SendGrid), cloud services (AWS, Azure), and data providers all expose APIs that applications depend on. The reliability, documentation quality, and versioning strategy of an API directly affect how well these integrations work in practice.