Glossary

What Is an API? How Applications Talk to Each Other

An API (Application Programming Interface) is a defined contract that specifies how one software system exposes its functionality so another system can consume it. APIs power almost every digital interaction: when you check the weather in an app, it calls a weather API; when you pay online, a payment API handles the transaction.

REST APIs

REST (Representational State Transfer) is an architectural style for HTTP APIs. Resources are identified by URLs. Standard HTTP methods map to operations: GET (read), POST (create), PUT/PATCH (update), DELETE (remove). Responses are typically JSON. REST APIs are stateless — each request carries all necessary context. Good REST design uses nouns in URLs (/users/42) not verbs (/getUser).

GraphQL vs REST

GraphQL is a query language for APIs where the client specifies exactly what data it needs in a single request. This avoids over-fetching (getting unused fields) and under-fetching (needing multiple round trips). REST is simpler to cache and browse; GraphQL is better for complex, nested data requirements. Both are widely used; choose based on your data graph complexity.

Webhooks

A webhook is a reverse API: instead of your app polling "has anything changed?", the server pushes a notification to a URL you register when an event occurs. Stripe sends webhook events for payment status changes; GitHub sends them for push events. Always verify webhook payloads using HMAC signatures to prevent spoofed events.