web dev//API//external API
An external API is the pattern in which an app makes HTTP requests directly to a third-party service. The service does not run inside the app's server: it lives somewhere else, and the app consumes it over HTTP.
An external API is the pattern in which an app makes HTTP requests directly to a third-party service. The service does not run inside the app's server: it lives somewhere else, and the app consumes it over HTTP.
The app is responsible for everything: timeouts, retries, error handling, authentication, and managing state between calls.
The request happens synchronously inside the backend handler (or Vercel Function). If the external service is slow, the function waits, and if it waits too long, it hits the timeout.
Gmail API, Google APIs, Resend (email), Sentry (errors), PostHog (analytics), Upstash (Redis), Pinecone (vectors) and Supabase are all external APIs that an app calls over HTTP.
OAuth 2.0 is the standard auth pattern: the user gives permission to the external service, and the service gives the app a token.
For heavy batch work against external APIs (thousands of Gmail calls, for instance), a single function will time out. That is where event-driven processing takes over: the app fires an event and the work happens outside its request, while an external API call keeps the app waiting for the answer.