API developer interview questions and how to answer them

API developer interview questions focus on the contract other people build against: how you design endpoints and errors, how you change an API without breaking the clients already using it, how you secure and rate-limit it, and how you support the developers who call it. Expect a design exercise, often a take-home that asks for a small working API with tests and documentation, and questions about deprecations and webhooks. Interviewers look for someone who thinks about the caller first and treats every published field as a promise.

By Published 9 min read

What an API developer does

The title covers three common setups. Some API developers build a public or partner API that is part of the product, with outside developers as customers. Others own internal platform APIs that dozens of teams inside the company call. A third group are integration developers who connect a company's systems to payment, shipping, CRM or identity providers. All three share the same pressure: once someone depends on a field, changing it costs them time and money. The backend developer guide covers storage and server internals; this page covers the parts that are specific to owning an interface.

  • Contract design: names, shapes, errors and pagination that stay consistent across the whole surface.
  • Change management: additive changes by default, and a clear process when something must break.
  • Security: authentication, authorization on every object, scoped keys, rate limits and safe logging.
  • Developer experience: reference docs, examples, SDKs, a sandbox, a changelog and readable error messages.
  • Operations: monitoring by client and endpoint, incident communication and usage data to guide decisions.

How API developer interviews usually run

  1. Recruiter screenWhich APIs you have owned, who called them, which styles you used (REST, GraphQL, gRPC, events) and your main language.
  2. Technical screenHTTP semantics, status codes, auth flows and a short coding task such as validating a request or paginating results.
  3. Design exerciseDesign the API for a booking system, a payments refund flow or a file upload service. You write endpoints, payloads and errors and defend the choices.
  4. Take-home or spec reviewBuild a small API with tests and an OpenAPI description, or review someone else's spec and list the problems a client would hit.
  5. Behavioral and partner scenariosA breaking change that went wrong, a large customer asking for a special endpoint, or an outage that affected integrators.

Contract and design questions

Design questions an API developer should expect
QuestionWhat it testsWhat a strong answer shows
Do you write the spec first or the code first?ProcessSpec first for anything outside the team: an OpenAPI or schema file reviewed by a client developer before code, then mocks and contract tests from the same file
What should every error response contain?Error designA stable machine-readable code, a human message, the field at fault, and a request id for support; one format everywhere, such as the problem details format in RFC 9457
How would you design an endpoint for an operation that takes ten minutes?Long-running workAccept with 202, return a status resource or job id, let clients poll or receive a webhook, and make the start request safe to retry
How do you let clients fetch only the fields they need?Payload sizeSparse fieldsets or expand parameters on REST, or a GraphQL layer when many clients need very different shapes
When would you pick REST, GraphQL, gRPC or events?Style choiceREST for broad public use and caching, GraphQL for varied client views, gRPC for fast internal service calls, events when consumers should react rather than ask
How do you keep fifty endpoints consistent?GovernanceA written style guide, a linter on the spec in CI, shared components for pagination and errors, and design review for new resources
How do you design bulk operations?Partial failureLimit batch size, report a result per item, decide up front whether the batch is all-or-nothing, and keep it idempotent
Design questions an API developer should expect. Scroll sideways on a small screen.

Pure HTTP questions such as method safety or caching headers are covered in more depth in the REST API interview guide, and schema questions for graph APIs in the GraphQL guide.

Versioning, deprecation and change

  • Which changes are breaking? Removing or renaming a field, changing a type or meaning, adding a required parameter, tightening validation and changing default behavior. Adding an optional field or endpoint usually is not, if clients ignore fields they do not know.
  • Where should the version live? In the path, a header or a dated version pinned per account. Each has trade-offs for caching, routing and how easily clients upgrade; say which you used and what hurt.
  • How do you retire an endpoint? Measure who still calls it, announce a date, send deprecation signals in docs, the changelog and response headers such as Sunset, contact heavy users directly, and only then remove it.
  • A large customer will not upgrade before the deadline. What now? Extend for that account with a firm new date, help them migrate, and avoid keeping a permanent special case.
  • How do you avoid needing a v2 at all? Design fields to grow (objects instead of bare strings, enums that may gain values), and tell clients to tolerate unknown values.
  • How do you test that you did not break anyone? Contract tests generated from the spec, a diff check on the spec in CI that flags breaking changes, and replaying recorded real requests against the new build.

Security, keys and abuse

Security questions for people who own an API
QuestionWhat it testsWhat a strong answer shows
What is broken object level authorization and how do you prevent it?Most common API flawA caller changes an id in the URL and reads someone else's data; check ownership on every object access, not only that the token is valid
Which OAuth flow fits a server-to-server integration, and which fits a mobile app?Auth flowsClient credentials for machines; authorization code with PKCE for apps acting for a user
How should API keys be issued and stored?Key handlingShown once, stored hashed, scoped to the least access needed, easy to rotate, with a visible prefix so leaked keys can be found and revoked
How do you rate-limit fairly?Abuse controlLimits per key and per endpoint cost, 429 with Retry-After, headers that show remaining quota, and higher limits by agreement rather than by accident
What is mass assignment?Input handlingBinding a whole request body to a model lets callers set fields like role or balance; accept an explicit allowlist of writable fields
What must never appear in logs?Data hygieneTokens, keys, passwords and sensitive personal data; log a request id and the caller instead
Security questions for people who own an API. Scroll sideways on a small screen.

Webhooks and integrations

  • How do you make webhooks reliable? Retry with backoff for a period, record every delivery attempt, let integrators replay events, and include an event id so receivers can drop duplicates.
  • How does a receiver know a webhook really came from you? Sign the timestamp and raw body with a shared secret, let the receiver recompute and compare in constant time, and reject old timestamps to stop replays.
  • Should a webhook carry the full object or just an id? Full payloads are convenient but can be stale or leak data; a thin event plus a fetch keeps the API as the source of truth. Many APIs do both.
  • How do you handle events that arrive out of order? Include a version or timestamp on the object so receivers can ignore older updates.
const crypto = require("node:crypto");

function sign(secret, timestamp, rawBody) {
  return crypto.createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex");
}

function verify(secret, header, rawBody, nowSeconds, toleranceSeconds = 300) {
  const [t, sig] = String(header).split(",");
  const timestamp = Number(t);
  if (!Number.isFinite(timestamp) || !sig) return false;
  if (Math.abs(nowSeconds - timestamp) > toleranceSeconds) return false; // replay window
  const expected = Buffer.from(sign(secret, timestamp, rawBody), "hex");
  const given = Buffer.from(sig, "hex");
  return given.length === expected.length && crypto.timingSafeEqual(given, expected);
}

const body = JSON.stringify({ id: "evt_1", type: "invoice.paid" });
const now = 1_700_000_000;
const header = `${now},${sign("whsec_demo", now, body)}`;
console.log(verify("whsec_demo", header, body, now));        // true
console.log(verify("whsec_demo", header, body + " ", now));  // false: body changed
console.log(verify("whsec_demo", header, body, now + 3600)); // false: too old
Signing and verifying a webhook in Node with a replay window. Run with node against valid, altered, stale and malformed inputs.

Reliability and performance

Reliability questions
QuestionWhat it testsWhat a strong answer shows
A client's POST timed out. Did the payment happen?IdempotencyAccept an idempotency key, store the first result under it, and return the same result on retry instead of charging twice
Why prefer cursor pagination over page numbers?PaginationStable results while data changes and steady speed on deep pages; offsets skip or repeat rows when items are inserted
How can clients avoid downloading unchanged data?CachingETags with If-None-Match returning 304, Cache-Control on public reads, and change feeds for sync
One client is causing most of your load. What do you do?OperationsConfirm with per-key metrics, contact them, offer a bulk or webhook alternative, and apply limits fairly
What do you monitor on an API?ObservabilityLatency percentiles and error rates per endpoint and per client, saturation, and the share of traffic on deprecated versions
Reliability questions. Scroll sideways on a small screen.

Developer experience and support questions

  • What makes API documentation good? A quick start that works in minutes, real request and response examples for each endpoint, every error code explained, and a changelog people can subscribe to.
  • Would you ship SDKs? For a public API with many clients, yes for the main languages, ideally generated from the spec and hand-polished; otherwise good docs and a typed spec can be enough.
  • How do you turn support tickets into API fixes? Tag tickets by endpoint and cause, look for repeated confusion, and fix the error message or design before writing more docs.
  • A partner wants a custom endpoint just for them. How do you respond? Find the underlying need, see if a general feature serves it and others, and avoid one-off endpoints you must maintain forever.

What a take-home is graded on

  • Consistent resource names, status codes and one error format across every endpoint.
  • Validation with clear messages, and no stack traces leaking to the caller.
  • Tests that cover failure paths, not only the happy path.
  • An OpenAPI file or equivalent, plus a README that explains choices and what you would do with more time.
  • Small scope done well rather than many half-finished endpoints.

Testers on the team may probe your take-home the way the API testing guide describes, so test your own error paths before you submit.

Fictional example

Answering "Tell me about a breaking change you had to ship"
I owned the orders API for a logistics company, used by about forty retail partners. Our address field was a single free-text string, which caused failed deliveries because we parsed it badly. We needed structured fields, and removing the string would break every partner. So we added the structured address object next to the old field, filled both for six months, and marked the old one deprecated in the docs, the changelog and a response header. We tracked usage per partner and saw that five partners still wrote only to the old field after four months. I called each of them, and two needed help with their own form changes, which we gave them. We removed the string after seven months instead of six, with no partner broken on the day. Failed deliveries caused by address parsing dropped sharply in the following quarter, and the playbook became our standard process for breaking changes.

Behavioral questions

  • Tell me about an outage that affected people who integrate with you. Cover how you told them, not only how you fixed it.
  • Describe a design review where you changed your mind. Show what argument or data moved you.
  • How do you say no to a product manager who wants to rename a public field? Explain the cost to clients and offer an additive alternative.

Use the behavioral question guide for story structure. If the API serves mobile apps, read the app developer guide for the client view of old versions that never update. Teams still moving a legacy 1.x front end, covered in the AngularJS developer guide, often redesign the APIs it calls at the same time.

A ten-day preparation plan

  • Days 1 to 2: write an OpenAPI description for a small resource, with pagination, filtering and one error format, and lint it.
  • Days 3 to 4: build it in your main language with validation, idempotency keys on POST and tests for failure paths.
  • Day 5: add API keys with scopes, a rate limit that returns 429 and Retry-After, and an ownership check on every read.
  • Day 6: add a signed webhook with retries and a replay endpoint.
  • Day 7: make one breaking change the safe way and write the deprecation notice.
  • Days 8 to 10: practice two design prompts aloud and prepare stories about a breaking change, an outage and a partner request.

API design rounds reward people who say their trade-offs out loud in a sensible order. Natively, an AI interview assistant that runs on Mac and Windows, can transcribe a mock design session on your computer and keep the transcript and notes, so you can see whether you covered errors and versioning before you ran out of time. In practice it can suggest an answer to the question just asked, read a spec or a coding prompt from a screenshot, and sketch endpoint or flow diagrams. With Pro or the free trial it can also use your résumé and the job description to frame suggestions around the APIs you have owned.

Questions people ask

What questions are asked in an API developer interview?

Expect questions on endpoint and error design, versioning and deprecation, OAuth flows and API keys, object-level authorization, rate limits, webhooks, idempotency and pagination, plus a design exercise or a take-home build.

How is an API developer different from a backend developer?

The skills overlap, but an API developer owns the contract other people build against: its consistency, documentation, change process and support. Backend roles lean more on storage, internal services and performance.

What do interviewers look for in an API take-home?

Consistent naming and status codes, one error format, validation with clear messages, tests for failure paths, a spec such as OpenAPI, and a README that explains your trade-offs.

How do I answer a question about breaking changes?

Show the process: prefer additive changes, measure who uses the old behavior, announce a date in docs, changelog and headers, contact heavy users, and remove only once usage is gone or agreed.

Where to go next

Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.

Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.

Keep reading

Put it on your own machine.

A live-conversation assistant that runs locally. Your conversations stay on your machine.

macOS 12+ · Windows 10/11

© 2026 Natively AI Private Limited

Source-available under the Natively Personal Use Source License v1.0 · IP geolocation by DB-IP