Module 5 · Lesson 1 of 6
APIs for non-coders
Requests and responses, URLs, methods, headers, keys, JSON, status codes, rate limits, pagination and terms, with examples you can run in a browser.
10 min
Your website sends a lead to the CRM. Your CRM sends a text through a messaging service. A market report pulls this week's mortgage rates from the Bank of Canada. Each of those conversations happens through an API, and every API works the same way: one system sends a precise request, and the other sends back a precise response.
You do not need to write code to work with APIs. You need to read their documentation: what you can ask for, how to prove who you are, what comes back, and what the limits are. That skill lets you brief a developer, configure Zapier or n8n (Module 4), or tell a coding agent exactly what to build.
- Key term
- API (application programming interface)
A set of rules one piece of software publishes so other software can ask it for data or ask it to do something. A website is built for people to read; an API is built for programs to read.
A request is a precise question
Paste this address into your browser:
https://www.bankofcanada.ca/valet/observations/V80691335/json?recent=5
You just made an API request. The Bank of Canada's Valet API answered with the five most recent weekly values of its "Conventional mortgage, 5-year" series. No account, no key. Here is what each part of that address does:
| Part | In the example | What it means |
|---|---|---|
| Scheme | https:// | The connection is encrypted. Never send a key over plain http://. |
| Host | www.bankofcanada.ca | Which organization's server you are talking to. |
| Path | /valet/observations/V80691335/json | Which thing you want: observations for series V80691335, as JSON. |
| Query string | ?recent=5 | Options that narrow the answer: only the five most recent values. |
The host plus the start of the path (https://www.bankofcanada.ca/valet) is the base URL. Each thing you can ask for under it is an endpoint. Documentation is mostly a list of endpoints and the options each accepts. Valet's says you can swap recent=5 for start_date=2025-01-01 (year-month-day) but cannot combine the two in one request. Rules like that are why you read the docs first.
Methods: what you want to do
Your browser sends a GET, which means "give me this". APIs use a few more methods, and the documentation names one beside every endpoint.
| Method | Means | Brokerage example |
|---|---|---|
| GET | Read something | Fetch today's mortgage rates, or look up a contact in the CRM |
| POST | Create something or send an event | Send a new website lead into Follow Up Boss (its docs ask you to use POST /v1/events for this) |
| PUT or PATCH | Update something that exists | Change a lead's stage from "New" to "Appointment set" |
| DELETE | Remove something | Delete a test contact you created by mistake |
A POST usually carries a body: the data you are sending, often in JSON. A GET usually does not.
Headers and keys: who is asking
Every request also carries headers, envelope information the server reads before the body. The common ones:
Authorizationproves who you are. It carries an API key or a token.Content-Type: application/jsonsays the body you are sending is JSON.Acceptsays what format you would like back.
An API key is a long secret string tied to an account. To the API it is a password. In Follow Up Boss, a key carries its owner's access: an agent's key reaches only that agent's contacts, the broker's key reaches everyone.
A token is a key with an expiry. The CREA DDF® Web API (lesson 2) trades your feed's username and password for a token that lasts 60 minutes. Short-lived tokens limit the damage if one leaks.
Keys never go in chat, email or shared sheets
Do not paste an API key into an AI chat, a Slack message, a shared Google Sheet or a screenshot. Store keys in the tool that uses them (your automation platform's credential store, or a password manager), give each tool its own key, and delete keys you no longer use. If a key leaks, revoke it in the vendor's admin screen first, then work out how it happened. Module 10 covers secrets in depth.
The response: a status code and a body
Every response starts with a three-digit status code. Learn the families and you can diagnose most problems without a developer.
| Code | Meaning | What to check |
|---|---|---|
| 200 OK | It worked | Nothing. Read the body. |
| 400 Bad Request | It could not understand your request | A misspelled option, wrong date format or missing field. |
| 401 Unauthorized | It does not know who you are | Missing, wrong or expired key or token. |
| 403 Forbidden | It knows you, and you are not allowed | Your account lacks permission. |
| 404 Not Found | That thing does not exist | A typo in the path or an ID. |
| 409 Conflict | It cannot do that right now | Statistics Canada can return this between midnight and 8:30 a.m. Eastern, while tables update. |
| 429 Too Many Requests | You hit the rate limit | Wait as long as the server says, then retry. |
| 500 or 503 | The server had a problem | Not your fault. Wait and retry. |
Try a mistake on purpose. Ask Valet for a series that does not exist:
https://www.bankofcanada.ca/valet/observations/NOTASERIES/json
The server replies with status 404 and the message "Series NOTASERIES not found." Good APIs explain their errors; read the message before you assume something is broken.
Reading JSON
The body is the data. Most APIs return JSON, a plain-text format made of names and values. Here is a trimmed Valet response (the numbers are an illustration; run the request yourself for today's values):
{
"seriesDetail": {
"V80691335": {
"label": "Conventional mortgage, 5-year",
"metadata": { "unit": "Percent", "frequency": "Weekly" }
}
},
"observations": [
{ "d": "2026-10-14", "V80691335": { "v": "6.19" } },
{ "d": "2026-10-07", "V80691335": { "v": "6.19" } }
]
}
Curly braces hold an object: named values, like a CRM record. seriesDetail gives the label, unit and frequency. Square brackets hold a list: observations is a list of dated values, where d is the date and v the value. The value is in quotes, which makes it text; a spreadsheet may need you to convert it to a number. Change json to csv in the path and Valet returns a spreadsheet-ready file, which you will use in the lab.
Try it
Take an API call apart uses a second Valet request: GET https://www.bankofcanada.ca/valet/observations/FXUSDCAD/json?recent=5, the five latest daily rates for the US dollar in Canadian dollars, sent with an Accept: application/json header. Click each highlighted part of the request (Method, Host, Path, Query parameters, Headers), then of the response (Status code, Content type, Body). Guess what each does before you read its explanation. The response values are samples; click Open the live request in a new tab for today's data.
Take an API call apart
Try itA real request to the Bank of Canada's Valet API and the shape of its answer. Click any highlighted part.
Request
Response
Method
What you want to do. GET reads. POST creates or sends something. PUT/PATCH change something. DELETE removes it. Most data lookups are GET.
The response values shown are samples for illustration. Open the link to see today's real data.
The request says what (method and URL), who (an Authorization header, when the API needs a key; Valet does not) and, for a POST, with what (the body). The response says how it went (status code) and here it is (body). Every API in this course follows that shape. When an automation fails, check those parts in that order.
Limits: rate limits, pagination and terms
Rate limits cap how many requests you can send. Statistics Canada's Web Data Service allows 25 requests per second from one IP address. Follow Up Boss counts requests in a 10-second window and, on a 429, sends a Retry-After header saying how many seconds to wait. Automations that loop over hundreds of contacts hit these limits first.
Pagination splits big answers into pages. The DDF® Web API returns 20 records per page by default (up to 100) plus a @odata.nextLink address for the next page. An automation that reads only page one silently misses the rest.
Terms of use are the contract. Technical access is not permission. The Bank of Canada's terms ask you to name the Bank as your source, say when you changed the data, and not get around its request limits. Lesson 3 shows what happens when people ignore a site's terms.
In practice
Priya runs operations at Lakeshore Homes Brokerage. The team wants open-house sign-ins from a tablet form to land in Follow Up Boss. Before anyone builds anything, she reads the documentation and writes a short spec:
- Endpoint and method:
POST https://api.followupboss.com/v1/events, because the docs say this route checks for duplicates, applies the brokerage's lead routing and notifies the agent, while creating a person directly skips all of that. - Authentication: Basic authentication with a dedicated API key belonging to an admin user, stored only in the automation tool.
- Body: source "Open house: 123 Example Street", name, email, phone, visit time and the form's consent answer.
- Limits: well under the rate limit for a weekend open house; on a 429, wait for
Retry-Afterand retry once. - Errors: on a 401, alert Priya (the key changed); on a 400, email the raw form to the listing agent.
Ten minutes of reading saves a week of guessing.
Common mistakes
- Treating a 200 as success without reading the body. Some APIs return 200 with an empty list when your filter matched nothing.
- Reading only the first page of results and assuming you have everything.
- Using one shared "master" key for every tool, so you cannot revoke one without breaking all of them.
- Retrying instantly in a loop after a 429, which makes the block last longer.
- Assuming that because an API returned data, you are allowed to store, display or reuse it.
Key takeaways
- A request has a method, a URL, headers (including your key) and sometimes a body; a response has a status code and a body.
- Status code families tell you where to look: 4xx means fix your request or permissions, 5xx means wait and retry.
- JSON is just named values and lists; read it like a CRM record.
- Rate limits, pagination and terms of use are part of the API, not footnotes.
- Keys are passwords. One key per tool, stored in the tool, never in chat.
Finished reading? Move on when you're ready.