The docs didn't say whether a community platform's API could attach images to posts, so Claude found out. It tested 27 possible field names in one sitting without creating a single post, and all 27 came back invalid. That settled the question in minutes and sent me to a different door: an automation platform's connector that could post images.
Last week's post covered connectors, the front door into your apps. Most apps you pay for also have a side door, an API, even when nobody has built a connector for it. Claude Code or Codex can read the API's docs and write the small script for you. You don't need to code. You need to be the project manager: set the job, insist on a safe order and check the results.
What an API is, with a waiter
API stands for application programming interface. In plain English, it's the official way one program asks another program for something.
Picture a restaurant. You don't walk into the kitchen and start cooking. You order from the menu, a waiter carries the order back, and the waiter returns with your plate or with "the kitchen doesn't make that." The API is the waiter. The docs are the menu. Each item on the menu is an endpoint, a web address for one kind of request, such as "list contacts" or "create an event." What comes back is usually JSON, which is structured text that reads like labeled lists.
Requests come in two flavors, and the difference drives every safety rule below. Reading (a GET request) isn't supposed to change anything. Writing (POST to create, PATCH or PUT to change, DELETE to remove) does.
How does this differ from a connector? A connector is a waiter who already knows the menu and comes with a short list of approved orders. The API is the full menu, and your AI writes the order slips. That's more work, but it reaches things no connector offers yet.
Your API key is a house key
An API key is a long secret string the app gives you, usually somewhere in its settings under a name like Developer or API. It proves a request comes from your account. Whoever holds it can do whatever the key allows, with no password and no second check.
Keep it in a .env file, a plain text file of private settings that sits in your project folder and that your script reads:
NEWSLETTER_API_KEY=paste-your-key-here
Four rules go with it:
- Paste the key into .env yourself. Then tell the AI the variable name. Don't paste the key into the chat, where it ends up in transcripts.
- Keep it out of everything shareable. That means your memory file, emails, shared docs and screenshots. If the folder ever goes to a code-sharing site like GitHub, have the AI add .env to the .gitignore file, the list of files that never get uploaded.
- Use the smallest key the app offers. Read-only if it exists, and one key per job, so you can switch one off without breaking the rest.
- Rotate it if it's exposed. Make a new key in the app's settings, put it in .env and then delete the old one.
The safe sequence: docs, one record, read it back, then the batch
Every API job you hand an AI should follow the same five steps, and the order is the safety.
- Docs first. Have the AI read the API docs and summarize them before it writes anything.
- Read before you write. Fetch one record you already know, like a contact or an event, and compare it with what the app shows.
- Write one test record. Fake data, labeled TEST, in a test area if the app has one.
- Read it back. Not the success message. Fetch the record again, then look at it in the app's own screen.
- Then the batch. Slowly, with a log of every record, stopping at the first error. Delete the test record when you're done.
Here's a prompt that sets all of that up:
Read the API docs at [link]. Before writing any code, tell me how this API
signs in, which endpoints we need to [job], its rate limits and how it pages
through long lists. The key is in .env as APP_API_KEY. Never print it.
Then read one record I name, create one TEST record with fake data, read it
back and stop. Show me every result. No batch until I say go, and when we
run it, log every record and stop at the first error.
To see the pattern before you point it at a real app, use JSONPlaceholder, a free practice API full of fake data that only pretends to save what you send (its guide). You don't have to write the requests yourself. Give Claude Code or Codex this, and it will write and run them with curl, a small tool for sending web requests from the terminal:
Use JSONPlaceholder (jsonplaceholder.typicode.com), the free practice API,
for four quick tests. Run each one, then show me the status code and
explain what it means in plain English.
1. Read post number 1.
2. Create a new post with the title TEST and the body "fake data."
3. Read back the post you just created, using the ID the API gave you.
4. Read post 1 again, but misspell the path as /post/1 instead of /posts/1.
Test 1 reads one record. Test 2 "creates" a post, and the API answers 201, meaning created, with a new ID of 101. Test 3 reads that record back and gets a 404: nothing was saved, because this practice API only pretends. That's the whole lesson in miniature. A success message isn't proof. Test 4 has a typo ("post" instead of "posts") and also gets a 404, which is why a 404 on its own tells you so little.
Reading back also means looking at the real thing. I ran about 70 plugin and theme updates across five client websites through a management dashboard's API, one at a time, checking each site's front end (the pages visitors see) after every update. Zero failures. One lesson: a page cache, which stores copies of pages for speed, kept serving the old page, so my checks had to bypass the cache. If a stale copy can fool your check, it isn't a check yet.
Rate limits and pagination, in plain terms
A rate limit is the API's speed limit: how many requests it accepts per minute or per second. Go over it and you get a 429, "Too Many Requests," sometimes with a Retry-After note saying how long to wait (MDN's explanation). Ask the AI to find the limit in the docs and pace its requests to stay under it. After a 429, it should wait before retrying instead of hammering away.
Pagination is how APIs hand back long lists: a page at a time, say 100 records per page, with a pointer to the next page. A script that forgets to follow the pointer quietly stops after page one, and the report looks complete. The defense is simple. Compare the count the script reports with the total the app shows. If the app says 2,300 contacts and your export has exactly 100, you've found the bug.
Reading error messages without panicking
Every response carries a three-digit status code. Here are the ones you'll meet most:
| Code | What it means | What to try |
|---|---|---|
| 200, 201 | It worked (201 means something was created) | Read it back anyway |
| 400 | The request was malformed | Check field names and formats against the docs |
| 401 | No valid key came with the request | Check the key and how it's sent |
| 403 | The key works but isn't allowed to do this | Check the key's permissions |
| 404 | Not found | Check the path and the ID before you blame the key |
| 422 | Understood, but the content was rejected | Read the message; it often names the field |
| 429 | Too many requests | Slow down, wait, retry |
| 500 to 599 | Trouble on the app's side | Wait, then try once more |
The 404 deserves its own warning. It can mean the record doesn't exist, the path has a typo or, on some APIs, that you're not allowed to know the thing exists (MDN). One line from my memory file, which you saw in week four: "this API returns 404 for any wrong path, so a 404 says nothing about whether your key works."
Errors are information, too. That's how the image test I opened with worked. Claude aimed each request at a space (a section of the community) that doesn't exist. A valid field name got "space not found," because the request made it past the field check; an invalid one got "bad field." Nothing was created, and the question was settled. Whenever something fails, ask the AI to show you the full error text, not its summary of it.
Keep a gotchas list, and know when to stop
Every API has quirks the docs skip, and dates and times are the classic. You met two of mine in week four: 31 recurring events that showed up a day early, and a planning tool's API that stored 9 a.m. as 4 a.m. until I sent the time in UTC (the world's reference clock). Check the first record's date and time on the app's own screen before you run the rest, and write every quirk you find into your memory file, dated.
Then know when to put the script down. I built more than two dozen merch products across two designs through an online store's API: tees, hoodies, mugs, notebooks, a desk mat. The API couldn't create embroidered items, so those went through the store's dashboard by hand. No amount of clever scripting changes what an API allows.
Stop and use the dashboard when:
- the docs say the API can't do it, or your tests prove it, like those 27 field names;
- the job is small enough that clicking beats an hour of setup;
- it involves money, permissions or permanent deletes, where you want to see exactly what you're clicking;
- the same error survives two fixes, which usually means a wrong assumption, so ask the AI to list its assumptions and check them against the docs;
- the dashboard already has a bulk tool, like a spreadsheet import.
Try this this week
- Pick one app you use weekly that has no connector and find its API docs (search the app's name plus "API docs").
- Ask Claude Code or Codex to read the docs and summarize how it signs in, the endpoints you'd need, its rate limits and how it pages through lists. No code yet.
- Create a key with the least access the app allows, and paste it into a .env file yourself.
- Run the JSONPlaceholder prompt above and have the AI explain each result.
- Add a gotchas section for that app to your memory file.
Every office has one app that won't talk to the others. Book a free Discovery Call and bring the app you wish talked to your other apps. We'll look at its docs together and work out whether it's a connector job, an API job or a by-hand job.



