Interview Prep10 min read

Backend Developer API Design Interview: Make Retries Safe

A mid-level API design mock interview, turn by turn: where candidates lose points on idempotency, pagination and versioning, plus the full 30-minute blueprint.

IT
InterviewStack TeamResearch
|

The Timeout Is the Whole Question

Your client sends "create gift order," the network drops, and the app has no idea whether the order exists. Everything a mid-level interviewer wants to hear in an API design round starts from that moment. Candidates who describe tidy endpoints and stop there leave most of the points on the table.

This post walks through one illustrative mid-level Backend Developer API design interview, built from a real InterviewStack.io AI mock interview blueprint at a generic large tech company. The answers below are dramatized ("a common answer is..."), not a transcript of a real person, and the question is not any specific company's.

Key Findings

  • The interview runs 30 minutes in 3 phases: 0-8, 8-21 and 21-30 minutes.
  • The middle phase, distributed API concerns, gets 13 minutes, the most of any phase, and holds 6 of 16 checklist items.
  • 60 of 100 rubric points go to Interviewer Objectives Alignment (30) and Level-Specific Expectations (30).
  • Technical Proficiency and Communication each carry 20 points, against 60 combined for the two 30-point dimensions, so the rubric weights fit and depth more than any single technical detail.
  • The opening phase expects 2-4 clarifying questions before you commit to a contract.
  • The blueprint asks for at least 2 API gateway responsibilities and at least 1 credible versioning strategy.
  • 4 areas are listed as out of scope, including internal database schema design, so the interview stays on the interface layer.

The Question the AI Interviewer Opens With

The interview question

Your team owns the interface layer for a commerce platform used by the company's mobile app, web app, and several internal services.

A new capability is launching: clients need to create and track "gift orders" that can be scheduled for future delivery, retried safely if the client times out, and viewed in paginated history screens. Some traffic comes from first-party clients over public APIs, and some from internal services that need low-latency service-to-service communication.

You are designing the contracts between clients/services and the backend systems, not the internal database schema. Design the API and interface contract for this gift order capability.

The interviewer is probing five things: whether you can pick and justify an API style, model requests, responses and errors clearly, handle pagination, rate limiting and idempotency, evolve the contract without breaking clients, and split work between an API gateway and downstream services.

How Is a Backend Developer API Design Interview Scored?

Interviewer scoring weights for a mid-level backend API design interview

Interviewer Objectives Alignment and Level-Specific Expectations are 30 points each. That is the lesson of the chart: a mid-level answer is graded on solving the stated problem at the right depth, with workable edge cases, not on how many protocols you can name. Technical Proficiency (20) and Communication and Problem Solving (20) cover the rest.

Four Follow-Ups Where Tidy Contracts Crack

The dramatized candidate below is Priya. After her first proposal of a REST POST /gift-orders and GET /gift-orders, the interviewer pushes.

Turn 1: Protocol Per Audience

Interviewer: "How would you decide which parts of this should be exposed as REST, gRPC, or GraphQL, given both first-party clients and internal services?"

COMMON MISTAKE
A common answer is for Priya to pick her favorite and defend it everywhere, or to expose all three side by side. That skips the expected checklist item of giving a reasoned view of REST or GraphQL for clients and gRPC for internal low-latency calls, and it costs points under Technical Proficiency.
STRONGER MOVE
Decide by caller: simple, cacheable REST for the public clients, gRPC for internal services that need low latency. Name the cost of running two paradigms and say you would keep one externally unless a client really needs flexible queries.

Turn 2: The Duplicate Create

Interviewer: "Suppose mobile clients often retry after network timeouts and occasionally send the same create request multiple times. How would your interface make this safe?"

COMMON MISTAKE
A common answer is for Priya to say "the client should not retry" or to deduplicate on the request body. That misses the expected idempotency mechanism with replay semantics and the timeout-ambiguity checklist item, and it costs points under Level-Specific Expectations.
STRONGER MOVE
Require a client-generated idempotency key on create, scoped to the caller. Return the stored result for a repeat, and say what happens when the same key arrives with a different payload. Then tell the caller exactly what to do after a timeout.

Turn 3: Stable Infinite Scroll

Interviewer: "The product team wants a gift-order history screen with infinite scroll and stable ordering even as new orders arrive. How would you design pagination?"

COMMON MISTAKE
A common answer is for Priya to offer page number and page size and move on. New orders shift every page, so she misses the cursor-based, stable-ordering checklist item and loses points under Technical Proficiency.
STRONGER MOVE
Use an opaque cursor token built on a stable sort key plus a unique tiebreaker, and return the next token with each page. Say what the client sees when new orders land mid-scroll.

Turn 4: Adding Group Gifting

Interviewer: "Six months from now, we need to add support for group gifting and new delivery states without breaking existing clients. How would you version or evolve this API?"

COMMON MISTAKE
A common answer is for Priya to jump straight to "ship v2 and migrate everyone." She never explains how old clients survive a new enum value, which is the add-fields-without-breaking checklist item, and it costs points under Level-Specific Expectations.
STRONGER MOVE
Prefer additive changes: new optional fields, and a rule that clients must tolerate unknown enum values. Add explicit deprecation, and reserve a major version for changes that cannot be additive.

Two prompts did not make the cut here: where to enforce rate limits (gateway, with retry timing returned to callers) and how to shape error responses (machine-readable codes that separate user-fixable, throttled and transient failures). Expect either one live.

Why Does Knowing This Not Hold Up Under the Clock?

Every mistake above is obvious once you read the stronger move. The skill is producing it in minute 12, unprompted, while a follow-up arrives you did not rehearse. Reading builds recognition. Practice out loud builds recall under time pressure, and gaps in details such as idempotency or cursor design tend to show up only when someone pushes on them.

What Does the AI Interviewer Track Across the 30 Minutes?

Interview blueprint timeline: three phases over 30 minutes

This is the blueprint a strong candidate hits. It is also what the AI mock interview tracks you against in real time, phase by phase.

Blueprinta strong 30-minute interview, phase by phase
1
Problem framing and interface proposal 0-8
  • ✓Asks 2-4 relevant clarifying questions such as expected clients, read/write patterns, scheduling semantics, or consistency expectations
  • ✓States assumptions when requirements are unspecified instead of stalling
  • ✓Proposes a primary interface shape such as REST resources/endpoints and optionally notes internal gRPC for service-to-service calls
  • ✓Defines at least the create gift order operation and a read/list operation with basic request and response fields
  • ✓Uses naming and status behavior that is internally consistent
2
Distributed API concerns deep dive 8-21
  • ✓Describes an idempotency mechanism for create requests, such as an idempotency key scoped appropriately with replay semantics
  • ✓Explains how duplicate retries, partial failures, and timeout ambiguity are handled from the caller’s perspective
  • ✓Chooses a pagination strategy appropriate for history feeds, preferably cursor-based, and explains stable ordering and page tokens
  • ✓Defines structured error responses with machine-readable codes and distinguishes validation, throttling, not found/conflict, and transient server failures
  • ✓Gives a reasoned view of when to use REST versus GraphQL for client-facing access and gRPC for internal low-latency service calls
  • ✓Identifies at least 2 realistic API gateway responsibilities such as auth, rate limiting, routing, protocol translation, or request size enforcement
3
Evolution, scale, and tradeoff wrap-up 21-30
  • ✓Explains how to add fields or enum values without breaking old clients and notes any client parsing risks
  • ✓Provides a credible versioning or evolution approach, such as additive changes with explicit deprecation and selective major versioning only when necessary
  • ✓Describes where rate limits would be enforced and how clients learn retry timing or quota state
  • ✓Makes at least one pragmatic tradeoff explicit, such as preferring simpler REST externally while using gRPC internally rather than exposing multiple paradigms unnecessarily
  • ✓Responds coherently to follow-up constraints without needing exhaustive prompting

Practice It Live

Run this exact Backend Developer API design interview with the AI interviewer. It asks the opening question, pushes with unscripted follow-ups, and tracks you against the blueprint above.

Start the AI mock interview

If you want more material first, browse the API and interface design question bank for this role.

FAQ

Q. How long is a Backend Developer API design interview?

This blueprint runs 30 minutes in three phases: 0-8 minutes for framing and an initial interface proposal, 8-21 for distributed API concerns, and 21-30 for evolution and trade-offs. The 13-minute middle phase is the longest and holds 6 of the 16 checklist items.

Q. How is an API design interview scored?

Four dimensions add up to 100 points: Interviewer Objectives Alignment (30), Level-Specific Expectations (30), Technical Proficiency (20), and Communication and Problem Solving (20). For a mid-level candidate, 60 of the 100 points reward fitting the answer to the stated problem and showing the right depth.

Q. How do you make a create endpoint safe to retry?

Have the client send an idempotency key, scope it to the caller, store the first result against it, and replay that stored response on duplicates. Also say what the caller should do after a timeout, because the client cannot tell whether the first request succeeded.

Q. Should I use REST, gRPC or GraphQL in the interview?

The blueprint rewards a reasoned split: REST or GraphQL for client-facing access and gRPC for internal low-latency calls. It also credits keeping one paradigm externally when that is simpler, so justify the choice by client type rather than by preference.

Q. Is cursor or offset pagination better for a history feed?

The blueprint expects cursor-based pagination for history feeds, with stable ordering and page tokens. Offset pagination shifts when new items arrive, so a user scrolling an infinite feed would see duplicates or gaps.

Q. Is this a real company interview question?

No. It is an illustrative question and blueprint generated for a mid-level Backend Developer role at a generic large tech company. It shows how a strong 30-minute design interview can run, not what any specific employer asks.

Where to Start

Pick the retry scenario, answer it out loud in under three minutes, then let the AI interviewer push on what you skipped.

Topics

backend developer interviewAPI design interviewidempotencyREST vs gRPCcursor paginationAPI versioningmock interview

Ready to practice?

Put what you've learned into practice with AI mock interviews and structured preparation guides.