Kamran Mushtaq
Back to Systems Design
Systems Design

API (Application Programming Interface)

Added: June 24, 2026

Definition

A set of rules, endpoints, requests, and responses that allows two software applications to communicate and exchange data with each other.

What Problem It Solves

Provides a standardized way for systems to interact without needing access to each other's internal code or database.

What Happens If Not Used

Frontend and backend would need direct access to each other's internals, making systems harder to build, maintain, and scale.

Easy Wording

An API is a communication bridge between the frontend and the backend.

Layman Example

Online Food Ordering:

  • You = Customer
  • Restaurant Counter/Menu = Frontend
  • Order Slip = API
  • Kitchen = Backend You place an order through the counter (frontend). The order slip (API) carries your request to the kitchen (backend). The kitchen prepares the food and sends the result back through the same order slip.

Technical Example

  • User clicks "Login" on a website (Frontend).
  • Frontend sends a request to an API: POST /login { "email": "user@example.com", "password": "123456" }
  • API forwards the request to the Backend.
  • Backend verifies the credentials in the database.
  • Backend returns the result through the API.
  • Frontend displays "Login Successful". Key Terms for Revision: API, Interface, Communication, Request, Response, Endpoint, Client, Server, Frontend, Backend, Data Exchange, REST, HTTP, JSON, Authentication.