Your front-end needs to talk to the outside world—whether it's sending emails or fetching data. That's where APIs come in.
What Are APIs?
Think of an API like a waiter: you send a request (your order), and the kitchen (the server) prepares a response (your food). APIs are the standard way for your app to request or send data to other services.
A Quick Look at REST
REST APIs use familiar HTTP methods (GET, POST, etc.) and URLs. You call an endpoint, get back JSON (or other formats), and use it in your UI. Simple and widely supported.
Where APIs Show Up
- Data fetching – Load content from a CMS, database, or third-party service.
- Sending emails – e.g. with services like EmailJS from the client or via your own backend.
- User authentication – Log in, tokens, and session handling.
- Payments – Stripe, PayPal, and others expose APIs your app can call.
APIs give you modularity: you don't have to build everything yourself. They also extend what your app can do—from "show this page" to "send this form," "fetch that data," or "charge this card."
We've covered the tech. Next, we'll bring it all together and see how these pieces build real-world solutions that tackle common problems.