Nodea — logo

API

An API (Application Programming Interface) is a formally defined set of rules that lets one piece of software use the capabilities of another. It specifies which requests are allowed, what parameters they take and what responses to expect — a contract between systems that hides all internal implementation details. Where a user interface is built for humans, an API is an interface built for code.

How an API works

On the web, most APIs follow a client–server request cycle: the client sends an HTTP request to a named endpoint, and the server answers with structured data, typically JSON. Several design styles dominate:

  • REST — resources addressed by URLs and manipulated with standard HTTP verbs (GET, POST, PUT, DELETE); the de facto default for public web APIs;
  • SOAP — an older, XML-based protocol with strict schemas, still common in banking and enterprise integrations;
  • GraphQL — a query language where the client declares exactly which fields it needs in a single request.

Access is controlled with API keys, OAuth 2.0 tokens scoped to specific permissions, or signed JWTs, while rate limiting caps how many calls a client may make per minute. Mature APIs are versioned (for example /v2/) so providers can evolve without breaking existing consumers, and documented in machine-readable formats such as OpenAPI.

Practical application

APIs are the connective tissue of modern software. An online store calls a payment gateway's API to charge a card and a carrier's API to book shipping; a mobile app and a website share one backend API; accounting tools sync invoices with marketplaces overnight. Infrastructure work is equally API-driven: domain registrars, DNS providers, hosting control panels and cloud platforms all expose programmatic interfaces, so provisioning a VPS, issuing an SSL certificate or updating DNS records can be scripted end to end instead of clicked through a panel.

When events need to travel the other way, providers offer webhooks that push notifications to your application in real time. If you design your own API, prioritize a stable contract, predictable error codes and honest documentation — other people's code depends on it, and code does not tolerate surprises.

Powiązane pojęcia

Najczęstsze pytania

What is the difference between an API and a webhook?

An API follows a pull model: the client sends a request whenever it needs data. A webhook is push-based: the provider calls a URL you registered the moment an event happens. They complement each other — the webhook signals the event, and your code fetches details through the API.