REST API is a set of web endpoints that let different applications exchange data using the HTTP protocol in a stateless way. Each endpoint corresponds to a resource and can be accessed with standard methods such as GET or POST, typically returning JSON.
Also called: RESTful API
Why it matters
Because a website can pull product listings, user profiles or analytics from external systems without reloading the whole page, a REST API keeps the experience smooth and lets future features be added without rewriting the front‑end.
How it works
The API is built on HTTP routes defined on the server; when a request arrives, the server matches the URL and method to a controller function, which processes the input, interacts with a database or another service, and sends back a response with a status code and a JSON payload. In Laravel this is done with route definitions in routes/api.php and controller methods that return response()->json(…).
The mistake people make
A common mistake is to make the API stateful by relying on server‑side sessions or cookies, which defeats the stateless principle and causes problems when the same endpoint is called from mobile apps or third‑party services; the result is unexpected errors and difficult scaling.