StoicBuilder

HandbookV the OfficinaReading API docs

Vthe Officina, Use the tools

Reading API docs

1 min readUpdated 28 November

In plain words

API docs are the manual a service publishes for its API: every address it answers, the method, the required fields, which key to send and what errors come back.

Where you see it

Stripe's API reference is typical: one page per action, such as Create a refund, with the parameters down the middle and an example request and response on the right. Many docs sites now also offer a Markdown copy or an llms.txt file written for agents.

Your promptagent
Use Stripe's refund docs, not memory:https://docs.stripe.com/api/refunds/createCheck the required fields, the unit for amount, and theerror returned for a charge that's already refunded.Quote the parts of the docs you relied on.
A link and a short checklist turn the agent's memory into a lookup.

What goes wrong

  1. Trusting the agent's memory of an API

    Agents learned most APIs a year or more ago, and fields get renamed or retired. Give it the docs page for the version you're on.

  2. Missing the units

    Stripe and many payment APIs take amounts in the smallest unit, so 1000 means $10.00. Read the field's description, not only its name.

    amount: 25 // 25 cents, not 25 dollars
  3. Skipping the errors and limits

    Docs list the errors you'll get and how many requests you may send per second. Code written from the happy-path example breaks on the first 429, the code for too many requests.

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Before writing code for this API, read the official docs page I'm linking and quote the endpoint, the required fields, the auth it expects and the errors it can return. Where your plan differs from the docs, follow the docs and tell me.

Quick check

Sign in to earn +10 XP for it

QuickBite refunds a $25.00 order through Stripe, and the customer gets 25 cents back. What happened?

Got a prompt that touches reading API docs?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.