Interview Q&A · questions with model answers

API Design Interview Questions

Part of the study plan for: Backend Engineer · Full Stack Engineer · Native AI Engineer · Forward Deployed Engineer (FDE) · QA Engineer / SDET · Tech Lead

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. Most asked What makes an API RESTful, and what are good REST design practices?

    REST models the API as resources identified by URLs, manipulated with standard HTTP methods, using stateless requests and standard status codes and representations. Good practice: noun-based plural…

  2. Most asked How should you version an API?

    Common approaches are URL path versioning (/v1/orders), header/media-type versioning (Accept: application/vnd.acme.v2+json) and date-based versions (Stripe's Stripe-Version: 2024-06-20). Whatever…

  3. How do you design reliable webhooks?

    Send signed (HMAC with timestamp) POST requests with event IDs and types, expect a fast 2xx, retry with exponential backoff on failure, deliver at least once (receivers must dedupe), allow receivers…

  4. How do you design APIs for long-running operations?

    Return 202 Accepted with a job/operation resource (Location: /operations/123) that clients poll for status and results, or notify them via webhooks/SSE when done. Make job creation idempotent and…

  5. What makes a great developer experience for a public API?

    Clear documentation with runnable examples, quick start in minutes, consistent design, sandbox/test mode, official SDKs, meaningful errors, changelog and deprecation policy, status page, and…

  6. How do you design event-driven APIs (events between services)?

    Define event types with clear names (past tense: order.paid), versioned schemas (Avro/Protobuf/JSON Schema in a registry), stable IDs and timestamps, and document delivery guarantees (at-least-once,…

  7. How do you deprecate an API endpoint responsibly?

    Announce it with a timeline, add Deprecation and Sunset headers plus docs and changelog entries, monitor remaining usage per client, contact heavy users, provide migration guides, and only remove…

Was this page helpful?

Report a mistake