Connecting
Learn/L2 · How the Web Works

What is an API?

An API is the menu of things you're allowed to ask another system to do.

Difficulty 2/5

Mental model

requestresponseYour appAPIOther system

Plain English

An API (Application Programming Interface) is a contract. Another system says 'here are the exact things you can ask me to do, here is how to ask, here is what you'll get back'. Your code calls those endpoints to get data or trigger actions.

Analogy

An API is a drive-thru menu. You can only order what's on the board, in the way the board describes.

Jessica's wedding portal

Sending an email through the Resend API — your backend calls a specific URL with a payload, Resend sends the email.

Agentify CRM

The WhatsApp Cloud API — your backend posts a message to a URL and WhatsApp delivers it.

HógaPy real estate

The Google Maps API returns coordinates for a property address.

Go deeper

A menu of things another system lets you ask for.

Common mistakes

  • Putting the API key in the frontend.
  • Ignoring the error response and assuming success.
  • Hitting the API too often and getting rate-limited.

AI-agent trap

Agents will invent endpoint URLs and field names. Always paste the real API docs into the prompt.
Quick check
Where should an API key live?

Summary

APIs are usually HTTP endpoints (URLs). You send a request with a method (GET/POST), headers (including an API key), and a body. You get back a status and a body.

Confidence: