A

API

Development 4 min read Entry 2 of 78
Definition

An API is a set of rules that lets two pieces of software talk to each other without either one needing to know how the other is built.

In plain English

Think of a restaurant. You don’t walk into the kitchen and start cooking. You read a menu, tell the waiter what you want, and food arrives. The menu is the API: a fixed list of things you’re allowed to ask for, written in a format the kitchen understands.

When your WordPress site pulls posts from another site, sends an order to a payment provider, or asks an AI model to write a product description, it’s ordering from a menu. It never sees the kitchen.

Why it matters

Almost everything interesting on a modern website happens through an API. Your contact form hands the message to a mail service. Your shop hands the payment to Stripe or Mollie. Your AI plugin hands the prompt to a model and gets text back.

Once you understand APIs, ‘connect this to that’ stops being magic and becomes a task you can plan, price and debug.

How it works

  1. A request goes outYour site sends a message to a URL called an endpoint, usually carrying a key that proves who you are.
  2. The other service does the workIt checks the key, runs whatever it does internally, and never shows you the inside.
  3. A response comes backAlmost always JSON, a compact block of labelled data your site can read.
  4. Your site does something with itStores it, displays it, or triggers the next step in a workflow.

Keep your keys out of the browser

The most common API mistake is putting a secret key somewhere visitors can see it. Keys belong in server-side settings or environment variables, never in a page template, a JavaScript file, or a public repository.