Module 11Neill's Vibe · Tier 1 · Basic Vibe Coding~8 min

It's just an API call

The doorway one program uses to talk to another. Once that clicks, integrating a new service stops being scary and becomes a lookup.

01 · the scene

"Not every link is a doorway you can knock on."

I wanted my pending tasks out of Notion programmatically. I had the URL of the "My Tasks" view, so I pointed the code at it. It 404'd. The page existed — I was looking right at it in the browser — but the code got a flat "not found."

factory tooling — pulling tasks from Notion
$ GET /v1/databases/<my-tasks-view-id>
404 — object_not_found
(but the page loads fine in my browser. so what's "not found"?)
Neill51% · the terrain

"I assumed: if I can see it at a URL, the code can ask for it at that URL. Same address, right? The 404 made no sense to me — the thing was clearly there."

Claude49% · the execution

"That 'My Tasks' page is a view, not a real database — there's no API doorway behind it. I should've checked that the URL you could see was actually an API endpoint, not just a page. We pointed at the real database instead and it worked."

02 · the why

An API is the agreed way to ask another program for something.

An API (Application Programming Interface) is a defined set of requests one program makes to another: "send this, get that back." You call the Claude API to get a model response, the Dropbox API to fetch a file, the Notion API to write a row. Almost everything you build is just gluing APIs together. Once "it's just an API call" clicks, adding a new service stops being a scary project and becomes a lookup: what's the request, what comes back.

⇥

The request

what you send

An address (endpoint), usually a key to prove who you are, and the details of what you want.

⇤

The response

what comes back

Structured data (usually JSON) — the file, the answer, the confirmation. Predictable shape you can use.

⌦

The contract

the agreed rules

The endpoints, names, and shapes the provider promises. Not every URL is one — a page isn't an endpoint.

The model: an API is a drive-through window. There's a specific window (the endpoint), a menu of what you can order (the documented requests), and you say your name (the key). You don't wander into the kitchen — you use the window. The trap from the cold open: a picture of the restaurant on a website is not a drive-through window. A page you can view in a browser isn't automatically an API endpoint your code can call.

03 · predict it

You can see the page in your browser. Your code gets a 404. Why?

The Notion page loads fine for you, but the API call to that same URL returns "not found." What's going on?

Not it. The network's fine and size isn't the issue. Focus on the difference between "a page I can look at" and "an endpoint my code can call."
Exactly. A browser-viewable page and an API endpoint are not the same thing. The "My Tasks" view has no API doorway — pointing code at it 404s. The fix is to call the real database's endpoint, the one the contract actually exposes. Visible ≠ callable.
04 · the walkthrough

Make one clean API call, in four frames.

find the real endpoint
step 1Read the provider's docs for the actual endpoint — not just a URL you can see in a browser. Visible ≠ callable.
add your key
step 2Send the API key (from an env var, never hard-coded) so the service knows who's asking.
send the request
step 3Say what you want — the right method and any details. "Send this."
read the JSON back
step 4You get structured data back. Check the status first: 200 = good, 404 = wrong door, 401 = bad/missing key.
05 · prove it · gate

Teach it back to unlock the payoff.

Same rule as always: answer it right, or the module isn't done.

A page loads fine in your browser, but calling its URL from code returns 404. What's the lesson?
// one correct answer unlocks Module 11
Not the load-bearing answer. A 404 isn't an outage, and the difference between a page and an endpoint is exactly the point — don't wave it away.
That's it. An API is a defined doorway, not "any URL you can look at." Integrating a service becomes a lookup — find the real endpoint, send the request, read the response — and "visible ≠ callable" saves you the 404 every time. Module unlocked. ↓
the durable idea

Everything you build is gluing APIs together. An API is the agreed doorway between programs — find the real endpoint, send the request, read the response. A page you can see is not automatically a door you can call.

06 · factory payoff
⊘ locked — pass the teach-back to claim this piece of the factory

The fetch-an-API snippet you'll reuse forever.

A real, minimal fetch call — endpoint, key from an env var, send the request, check the status, read the JSON — with the status codes you'll actually hit annotated (200 / 401 / 404 / 429). Plus a short checklist that turns "integrate a new service" into the same four-step lookup every time.

✓ Module 11 complete