API FUNDAMENTALS / LESSON 10
APIs You Will Actually Meet.
See how two real tools used alongside Seedly CRM put API keys, endpoints, JSON and webhooks to work

Loading the lesson…
Loading activities…
API FUNDAMENTALS / LESSON 10
See how two real tools used alongside Seedly CRM put API keys, endpoints, JSON and webhooks to work

Loading the lesson…
Loading activities…
You've learned the pieces of an API one at a time. Now let's look at two real tools people use alongside Seedly CRM and spot every one of those pieces out in the wild.
Zernio is a tool for posting and scheduling to social media. Its own docs describe it as a "Social media management API for scheduling, publishing, and analytics." Instead of logging in to every social site one at a time, you send one request to Zernio and it posts for you. (Ghostpen, the voice-training content tool I built, auto-publishes through Zernio.)
CloseBot handles conversations with your leads. Its website calls it an "AI Appointment Setter" that can "Qualify leads, automate follow-up, book appointments." When a new message comes in, CloseBot can reply and follow up all on its own.
You can check them out here.
Heads up, the Zernio and CloseBot links here are my referral links, so I may earn a commission if you sign up.
Both tools have a normal screen you click around in. Both ALSO have an API, so other software can do the same jobs without anybody clicking anything. That's the part we care about today.
Every idea from this module shows up in these two tools. Here's the quick map.
| Module idea | Zernio | CloseBot |
|---|---|---|
| Base URL | https://zernio.com/api/v1 | https://api.closebot.com |
| API key header | Authorization: Bearer | X-CB-KEY |
| Data format | JSON | JSON |
| Webhooks | Yes, documented | Yes, webhook endpoints in the API reference |
Notice the two tools put the key in different headers. That's totally normal. Every API picks its own, which is exactly why you always read the docs first.
Zernio's quickstart says you open the API keys page in your dashboard and click Create API key. Then it warns you to copy the key right away, because Zernio "stores a SHA-256 hash of it and never shows it again."
That's straight out of the API Authentication lesson. The key is a secret, so the service only shows it to you once. Zernio's docs also show the key saved in an environment variable named ZERNIO_API_KEY, the same habit we covered for keeping secrets out of your code.
The base URL is https://zernio.com/api/v1. Each job gets its own path on top of that. Scheduling a post sends a POST to /posts, and listing your connected accounts sends a GET to /accounts.
Look familiar? That's the URLs and Endpoints lesson doing its thing. A base URL plus a path, with a method that says what you want to do.
Here's the request Zernio's own quickstart shows for scheduling a post, copied exactly.
Let's walk through it line by line.
POST means you're creating something new, a scheduled post.Authorization header carries your API key.Content-Type: application/json tells Zernio the body is JSON.A scheduled post goes out later, so how do you know when it's live? You could keep asking over and over. Zernio's quickstart has a better idea. It says webhooks "push each status change to you instead of polling."
Its webhooks page says Zernio sends a POST to your endpoint "when something happens: a post publishes, a DM arrives, an account disconnects, a number activates." The example events include post.published, post.failed and message.received.
Zernio also has you set a secret when you create the webhook, and it signs every delivery with it. That's the signature check from the Webhooks lesson, so you can prove a message really came from Zernio.
CloseBot's API docs say "All API requests require authentication using a CloseBot API Key." You include it in a header named X-CB-KEY. The docs show it like this.
The docs also warn you to "never expose it in client-side code or public repositories." Same rule you already know by heart.
CloseBot's base URL is https://api.closebot.com. Its API reference groups endpoints by topic, such as Bot, Lead, Analytics and Webhook. One example from the reference is the List bots endpoint.
That's a collection endpoint, just like the ones in the URLs and Endpoints lesson. It sends back a list of your bots as JSON.
CloseBot's homepage also says "Everything that can be done in the UI can be done with the API." Translation? Anything you click in their app, a program can do too.
CloseBot's API reference has a Send a webhook event endpoint at POST /webhook/event/{sourceId}. It also has endpoints for setting up an inbound webhook mapping and an outbound webhook. The docs describe one outbound mode where CloseBot "POSTs bot events to the callback URL."
So data can flow BOTH ways. Messages can come in to CloseBot through a webhook, and CloseBot can send events out to a URL you give it. The exact setup depends on how you connect it, so check their API docs for the exact endpoints and fields.
You don't need to write any code to use Zernio or CloseBot. Both have regular apps. But knowing how their APIs work helps you out in three ways.
You can follow the setup steps. When a setup screen asks you to paste an API key or a webhook URL, you now know what that thing is and why it matters.
You can troubleshoot. If a post never shows up or a reply never fires, you can ask the right questions. Is the key still valid? Did the webhook hit the right URL? Did the request get an error code back?
You can read the docs. API docs stop looking like a scary wall of code. You'll see a base URL, a method, a path, a header with a key and a JSON body. Every API you meet from here on out uses those same parts.
Authorization: Bearer and CloseBot uses X-CB-KEYYou've finished the API Fundamentals module! Next time a tool asks you for an API key or a webhook URL, you'll know exactly what it wants and why...