← All interview questions

Skill Zuno · skillzunos.com · System Design

API Design interview questions

Prepare for API Design interviews on Skill Zuno. This practice book covers API Design interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.

Open API Design on Skill Zuno

Also see the API Design tutorial.

API design defines how clients and services talk to a system: the resources, operations, data formats and error behaviour. A good API is consistent, predictable, secure and can evolve without breaking clients. Interviews cover REST principles, choosing between REST, GraphQL and gRPC, pagination, versioning, idempotency and error handling.

Sample API Design interview questions

Which HTTP methods are idempotent?

GET, PUT, DELETE, HEAD and OPTIONS are idempotent: repeating them has the same effect as doing them once. POST is not, so APIs accept an idempotency key to make retries safe.

Why is cursor pagination better than offset pagination?

OFFSET makes the database skip rows, which slows down deep pages, and inserts shift results so items are skipped or repeated. A cursor continues after the last seen key, which is fast and stable.

How should you version an API?

Add fields and endpoints in backward-compatible ways where possible. For breaking changes, use a version in the path such as /v2 or in a header, and give clients time to migrate before removing the old version.

What is the difference between PUT and PATCH?

PUT replaces the whole resource with the request body. PATCH applies a partial update, changing only the fields sent.

What status code should creating a resource return?

201 Created, with a Location header pointing to the new resource. Use 400 for invalid input, 409 for conflicts and 422 for validation errors on well-formed requests.

What you can practice

  • API Design interview questions for beginners and experienced developers
  • Level-based practice: New, Easy, Medium, Hard, and Diff
  • System Design topics alongside API Design on skillzunos.com

More System Design interview questions

All interview questions