APIs & HTTP interview questions

HTTP methods and status codes, REST design, idempotency, pagination, caching, GraphQL, webhooks and what happens when you type a URL.

Readiness: 0 of 13 nailed

How to use this page: 1. Read a question2. Type your answer3. Check with AI4. Open the model answer5. Timed drill when you’re 70% ready

HTTP

JuniorConcept

What happens when you type a URL into the browser and press Enter?

FoundationConcept

GET vs POST vs PUT vs PATCH vs DELETE?

FoundationConcept

Explain common status codes: 200, 201, 204, 301, 304, 400, 401, 403, 404, 409, 422, 429, 500, 502, 503.

Mid-levelConcept

How does HTTP caching work with Cache-Control and ETag?

Design

JuniorReal-world scenario

Design REST endpoints for a blog with posts and comments.

Mid-levelConcept

Offset vs cursor pagination?

SeniorReal-world scenario

A payment request times out and the mobile app retries. How do you avoid charging twice?

Mid-levelConcept

REST vs GraphQL?

JuniorConcept

How do you version an API?

JuniorConcept

How should an API communicate rate limits?

JuniorConcept

What should a good API error response look like?

Mid-levelConcept

REST vs gRPC?

Integration

Mid-levelConcept

How do you receive webhooks reliably and securely?

Also prepare