# Endpoint (/academy/endpoint)



An [API](/academy/api) is the whole window. An **endpoint** is one labeled slot on it.

`GET /todos` is an endpoint. `POST /todos` is another, even if the path looks the same. The [HTTP method](/academy/http-methods) is part of the label. You do not talk to "the API" in the abstract. You pick one slot and you ask for that job.

**Path plus verb**

In the app the [builder](/builder) scaffolds, those slots are URLs your [frontend](/academy/frontend-backend) already knows:

* `/api/todos` — list or create
* `/api/todos/12` — one row
* `/api/auth/callback` — the [auth](/academy/auth) handshake

A 404 means that slot is not on today's menu. Check the spelling and the verb before you rewrite the kitchen. A 401 means the slot exists and you did not bring a key.

Your [agent](/academy/agent) does not talk to "the backend" as a blob either. It walks the list. Fetch the todos. Create one. Mark it done. Three slots. Three trips.

**Name them like a stranger would**

[REST](/academy/rest) wants nouns in the path. Keep the verbs in the method. `/deleteTodo` is a slot you will hate at 4 a.m. `/todos/12` plus `DELETE` is a slot another tool can guess.

When something fails on stage, the error is usually "wrong slot," not "the internet is down." Read the path. Read the method. Then change code. A [webhook](/academy/webhook) is just another slot that strangers [POST](/academy/http-methods) into — public, picky, and easy to misspell in the vendor dashboard.

**What this unlocks**

Once you see slots, debugging stops being mystical.

The 404 is a missing label. The 200 is the slot you meant. Pick the slot, then argue about the body.
