What should I focus on for a REST API interview?
Can I explain REST and choose the right HTTP method?
Start with resources, URLs, and HTTP methods. PUT versus PATCH was the most asked question, appearing in 23 of 377 interviews. Questions about choosing HTTP methods and defining REST were also among the most asked.
Reviews of real answers found gaps in these basics. Some answers missed that REST APIs expose resources through URLs and use HTTP methods to operate on them. Others missed parts of the core method set or when to use each method.
- Can you explain how resources, URLs, and methods fit together?
- Can you name
GET,POST,PUT,PATCH, andDELETE, and say when to use each? - Can you explain when you would choose
PUTrather thanPATCH?
Can I explain how an API connects to other systems?
Integration appeared in more interviews than any other topic: 99 of 377 interviews. Questions covered frontend connections, third-party services, SDKs, webhooks, messaging, streaming, and background workflows.
Can you explain how a frontend connects to an API? Can you describe a webhook flow? Check whether you can also explain how you would investigate a problem with a third-party integration, rather than only describe your own endpoint.
Can I explain my design, security, and performance choices?
These questions cover how you define an API, protect it, and handle large datasets or high traffic. Use these checks to find what you need to review:
- Can you name resources and endpoints, document an API contract with OpenAPI, and keep changes backward compatible?
- Can you explain how you would handle filtering, pagination, caching, and rate limiting?
- Can you describe how you would use authentication, authorization, and access controls to protect sensitive data?
Can I handle repeated requests and failures?
Reliability appeared in 64 of 377 interviews. Questions covered duplicate prevention, concurrency, timeouts, payment failures, and consistency across systems.
Can you explain idempotency and why it is useful? Then go further: where would you store an idempotency key, and what would you return for a repeated request? Can you explain how you would retry after a timeout without creating duplicate operations?
Can I build a small endpoint?
Coding tasks appeared in 9 of 377 interviews. Tasks included creating and retrieving a user, updating a user by ID, and creating an order.
Can you write a user endpoint, store the user in memory or a database, retrieve it, and return appropriate HTTP status codes? Can you also show the route and controller action for an update by ID?
Who gets asked REST API
The 20 most asked REST API questions
Counted by interview, not by mention: a question asked twice in one conversation counts once.
What is the difference between PUT and PATCH, and when would you use each?
Asked in 23 of 377 interviews · last asked Oct 23 · Concept · Junior
Show answer
PUT replaces a resource’s full representation; PATCH applies changes to it. Use PUT when sending a complete replacement, and PATCH when updating only part of the resource. PUT is idempotent: repeating the same request has the same intended effect. PATCH may be idempotent, depending on the changes requested.
- PUT can also create a resource at the target URL if the API allows it.
- Do not assume PUT preserves fields left out of the request.
- PATCH behavior depends on the patch format and the API contract.
What the interviewer checks: The interviewer checks whether you understand replacement versus partial updates and how repeated requests affect the resource.
Other ways it was asked
- “What is the difference between PUT and PATCH?”
- “What is the difference between the PUT and PATCH methods?”
- “What is the difference between the HTTP POST and PUT methods?”
What HTTP methods are used in REST APIs, and when should you use each?
Asked in 20 of 377 interviews · last asked Oct 23 · Concept · Junior
Show answer
Use GET to read a resource and POST to submit data, often to create a resource. Use PUT to create or replace a resource at a known URL, and PATCH for partial updates. Use DELETE to remove a resource. HEAD returns headers without a body; OPTIONS describes communication options and supports CORS preflight.
- GET, HEAD, and OPTIONS are safe: they should not request changes to server state.
- PUT generally replaces the full resource representation; PATCH applies partial changes.
- PUT and DELETE are idempotent: repeating the request has the same intended effect, though responses may differ.
- POST and PATCH are not guaranteed to be idempotent.
What the interviewer checks: The interviewer checks whether you can choose the right method and explain its update and retry behavior.
Common mistake (in 3 of 9 reviewed answers): Many answers forget that the core set includes GET, POST, PUT, PATCH, and DELETE, so explain each one.
Other ways it was asked
- “What are the standard HTTP methods used in a REST API?”
- “Which HTTP methods are used to interact with APIs, and when would you use them?”
- “What are the common HTTP methods?”
What is a REST API?
Asked in 16 of 377 interviews · last asked Oct 5 · Concept · Junior
Show answer
A REST API is an interface that follows REST design rules. It exposes resources, such as users or orders, through URLs and uses HTTP methods to work with them. Each request contains the information needed to handle it, without relying on stored client session state.
- Use resource URLs, such as /users/42, with methods like GET, POST, PUT, and DELETE.
- Requests are stateless; the server can still store resource data.
- Use HTTP status codes to show results, such as 200, 201, or 404.
- JSON is common, but REST does not require it.
CodeGET /users/42 200 OK Content-Type: application/json {"id":42,"name":"Sam"}What the interviewer checks: The interviewer checks whether you understand resources, HTTP methods, and stateless requests.
Common mistake (in 5 of 8 reviewed answers): Many answers forget that REST APIs expose resources through URLs and use HTTP methods to work with them.
Other ways it was asked
- “What are REST APIs?”
- “What do you mean by a RESTful API?”
- “What is the REST API?”
How do you approach REST API design, and what considerations and tools guide you?
Asked in 11 of 377 interviews · last asked Oct 16 · Concept · Mid-level
Show answer
I start with client needs and model resources with clear URLs, HTTP methods, and status codes. I define request and response formats in OpenAPI and review the contract before coding. I plan security, validation, errors, pagination, and compatibility. I use Swagger UI for documentation, Postman or curl for exploration, and automated tests to check behavior.
- Keep requests stateless, and use HTTP methods according to their meaning.
- Use HTTPS, authenticate callers, and check permissions for each resource.
- Keep errors consistent; define pagination, filtering, and rate limits where needed.
- Avoid breaking clients; plan retries, idempotency, and caching where appropriate.
What the interviewer checks: The interviewer checks whether you can turn client needs into a secure, consistent API that is easy to use and maintain.
Other ways it was asked
- “How do you design and develop a RESTful API?”
- “What factors do you consider when designing or consuming REST APIs?”
- “What do you consider when designing a REST API?”
What does idempotency mean in HTTP APIs, and why is it useful?
Asked in 10 of 377 interviews · last asked Oct 16 · Concept · Mid-level
Show answer
Idempotency means repeating the same request has the same intended effect on the server as sending it once. It makes retries safer when a timeout leaves the client unsure whether a request succeeded. Retrying an idempotent request does not repeat its intended change.
- GET, HEAD, OPTIONS, TRACE, PUT, and DELETE are idempotent by HTTP semantics.
- Responses may differ: a repeated DELETE can return 404 after the first request succeeds.
- POST and PATCH are not guaranteed to be idempotent.
- An API can support idempotency keys to prevent duplicate actions, such as payments, when retrying POST requests.
What the interviewer checks: The interviewer checks whether you understand safe retries and the difference between repeated effects and repeated responses.
Other ways it was asked
- “What does idempotency mean?”
- “Which HTTP methods are idempotent?”
- “What is idempotency?”
What is the difference between GET and POST?
Asked in 9 of 377 interviews · last asked Aug 20 · Concept · Junior
Show answer
GET retrieves data from a server. POST submits data for processing, often to create a resource or trigger an action. GET is safe and idempotent: it should not request state changes, and repeating it has the same intended effect. POST is not guaranteed to be idempotent, so repeating it may create duplicates.
- HTML forms put GET data in the URL and POST data in the request body.
- GET responses can be cached; POST responses are cacheable only under specific conditions.
- POST is not automatically secure because it uses a body; both methods need HTTPS to protect data.
What the interviewer checks: The interviewer checks whether you understand each method’s purpose, safety, and behavior when requests are repeated.
Other ways it was asked
- “What is the difference between the GET and POST methods in an API?”
- “What is the difference between the GET and POST methods in an HTML form?”
- “What is the difference between GET and POST methods in PHP?”
How is GraphQL different from REST?
Asked in 7 of 377 interviews · last asked Oct 22 · Concept · Mid-level
Show answer
GraphQL is a query language for APIs, while REST is an architectural style. GraphQL lets clients request specific fields and related data, usually through one endpoint. REST APIs usually expose resources through separate URLs and use HTTP methods such as GET and POST. GraphQL can reduce unwanted data and extra requests, but adds query processing complexity.
- GraphQL defines a typed schema that clients can query.
- REST APIs can also support field selection and related data; these features are not unique to GraphQL.
- REST GET responses fit standard HTTP caching more naturally; GraphQL caching often needs extra tooling.
- GraphQL servers need controls to limit expensive or deeply nested queries.
What the interviewer checks: The interviewer is checking whether you understand client-driven queries, resource-based APIs, and their trade-offs.
Other ways it was asked
- “What are the differences between GraphQL and REST?”
- “What problem does GraphQL solve compared with REST APIs?”
- “What is the difference between GraphQL and REST?”
What techniques and tools would you use to secure a REST API?
Asked in 6 of 377 interviews · last asked Oct 13 · Scenario · Senior
Show answer
I would use HTTPS, verify client identity, and check permissions on every request and resource. For user login, I would use OpenID Connect; for delegated access, OAuth 2.0 access tokens. I would also validate input, use parameterized database queries, limit request rates, protect secrets, and monitor security events.
- Validate JWT signatures, issuer, audience, and expiry; a valid token does not grant access to every resource.
- Use an API gateway for rate limits and request size limits, not as a replacement for application authorization.
- Store credentials in a secrets manager, rotate them, and never log tokens or passwords.
- Keep dependencies patched and use security scanners; CORS is a browser control, not API access protection.
What the interviewer checks: The interviewer checks whether you can combine identity checks, resource permissions, input protection, and operational safeguards.
Other ways it was asked
- “How do you secure a REST API?”
- “How do you secure a web API?”
- “How do you secure an API?”
How would you design rate limiting for a public API?
Asked in 6 of 377 interviews · last asked Oct 16 · Design · Senior
Show answer
I would limit requests per API key or user at the API gateway, with IP limits for anonymous traffic. A token bucket allows short bursts while limiting the average rate. Across servers, I would keep shared state in Redis and update it atomically. Rejected requests get HTTP 429 with Retry-After.
- Set limits by customer plan and endpoint cost.
- Use atomic updates so concurrent requests cannot bypass the limit.
- IP limits can affect unrelated users sharing one network.
- Decide whether to allow or block requests if the rate limiter fails.
What the interviewer checks: The interviewer checks whether you can enforce fair limits across servers while handling bursts and failures.
Other ways it was asked
- “How would you implement a rate limiter for APIs?”
- “What is API rate limiting, and how would you implement it?”
- “Imagine you're building an API in Node.js that needs to handle rate limiting for different users. How would you design that solution?”
How would you make an API operation idempotent, including key storage and responses to repeated requests?
Asked in 6 of 377 interviews · last asked Oct 21 · Design · Senior
Show answer
I would use a client-generated idempotency key so retries apply the operation only once. I would atomically reserve it in shared, durable storage, scoped to the authenticated user and operation. I would store the request fingerprint, state, and final response. Completed matching retries get the saved status and body; changed input gets a conflict.
- Enforce uniqueness on user, operation, and key; clients must reuse the key when retrying.
- For an in-progress request, wait or return a documented retryable response; never start duplicate work.
- Commit database changes and the saved response together; pass a stable key to external payment providers.
- Keep records for a documented retry window; after expiry, the same key may trigger another operation.
What the interviewer checks: The interviewer checks whether retries, concurrent requests, and crashes can happen without causing duplicate effects.
Other ways it was asked
- “How would you implement idempotency for a charge-customer call? What idempotency key strategy would you use, where would you persist it, and what would you return for a repeated request?”
- “How would you implement idempotency end to end? Where would you store the idempotency key, how would you validate it per user, and what would you return for a repeated request?”
- “In the same create endpoint, how do you handle idempotency, especially for retries, so you don't accidentally create duplicate resources?”
What are webhooks, and when would you use them instead of REST API calls?
Asked in 6 of 377 interviews · last asked Oct 13 · Concept · Junior
Show answer
A webhook is an HTTP request a service sends to your endpoint when an event happens. Use webhooks for event updates, such as payment confirmations, instead of repeatedly polling a REST API. Use REST API calls when you need to fetch data or request an action; both can work together.
- Webhooks push event updates; polling repeatedly checks for changes.
- Use HTTPS, verify signatures when supported, and check signed timestamps when available to help prevent replay attacks.
- Acknowledge valid events quickly, then process longer tasks in the background.
- Handle duplicate deliveries safely; retry and delivery guarantees depend on the provider.
What the interviewer checks: The interviewer checks whether you understand event-driven updates, when polling is needed, and secure, reliable webhook handling.
Other ways it was asked
- “What is a webhook, and how do you secure one?”
- “What is a webhook? Explain it.”
- “What do you mean by webhook?”
What is the difference between SOAP and REST?
Asked in 5 of 377 interviews · last asked Oct 15 · Concept · Junior
Show answer
SOAP is a messaging protocol, while REST is an architectural style. SOAP uses XML messages; REST APIs can use JSON, XML, or other formats. REST is often a good fit for web and mobile APIs. Choose SOAP when you need an existing SOAP contract or standards such as WS-Security.
- SOAP can use HTTP or other transports; REST APIs commonly use HTTP methods and status codes.
- REST defines constraints such as stateless requests and a uniform interface.
- SOAP services often use WSDL contracts; REST does not require a specific contract format.
- Both can be secure; SOAP adds standards for message-level security.
What the interviewer checks: The interviewer checks whether you distinguish a protocol from an architectural style and explain when each fits.
Other ways it was asked
- “What is the difference between REST and SOAP?”
- “How do SOAP and REST differ, and in what situations would you choose each?”
- “What is the difference between REST and SOAP API?”
What is an API?
Asked in 5 of 377 interviews · last asked Sep 30 · Concept · Junior
Show answer
An API, or Application Programming Interface, is a set of rules that lets software systems communicate. It defines what one system can request from another and how the result is returned. APIs let developers use features or data without knowing how the other system works inside.
- An API defines how software can interact.
- It helps systems share data and reuse features.
- APIs are not limited to the web; REST APIs are one kind.
What the interviewer checks: The interviewer wants to know whether you understand what an API does and why software uses it.
Other ways it was asked
- “What is an API, and why is it important?”
- “Can you explain what an API is?”
What do HTTP 401 and 403 mean, and how do you troubleshoot each?
Asked in 5 of 377 interviews · last asked Oct 13 · Concept · Junior
Show answer
HTTP 401 means the request lacks valid authentication credentials. HTTP 403 means the server understood the request but refuses access, often because permissions are missing. For 401, check the Authorization header, token validity, and authentication scheme. For 403, check roles, scopes, resource permissions, and access policies.
- A 401 response must include a WWW-Authenticate header describing an authentication challenge.
- For 401, check whether credentials are missing, expired, revoked, or invalid.
- A 403 does not always mean the user is authenticated; other access policies can block requests.
- Retrying a 403 with the same credentials usually will not help.
What the interviewer checks: The interviewer checks whether you distinguish authentication from access restrictions and can troubleshoot both.
Other ways it was asked
- “What do HTTP status codes 401 and 403 mean, and when would you use each?”
- “What is the difference between HTTP status codes 401 and 403?”
- “What HTTP status codes indicate authentication and authorization failures?”
How do you change an API without breaking existing clients?
Asked in 4 of 377 interviews · last asked Oct 23 · Scenario · Mid-level
Show answer
I keep changes backward compatible whenever possible, so existing clients can still use the API unchanged. For breaking changes, I introduce a new version and keep the old version running during migration. I test compatibility, document the changes, and give clients time to move before retiring the old version.
- Avoid removing fields, changing types, or making optional inputs required in an existing version.
- Additive changes are usually safer, but strict clients may reject new fields or enum values.
- Expose versions consistently, such as through URL paths or request headers.
- Announce retirement dates and track old-version usage before shutting it down.
What the interviewer checks: The interviewer checks whether you can preserve existing client behavior while planning and managing breaking changes.
Other ways it was asked
- “How do you handle API versioning?”
- “How do you ensure your API versioning doesn't disrupt existing clients, especially when making significant updates?”
- “How do you version your API?”
How do you authenticate an API?
Asked in 4 of 377 interviews · last asked Sep 19 · Concept · Junior
Show answer
I authenticate API requests by checking credentials, such as an API key or access token, over HTTPS. For user access, I can use OpenID Connect for login and OAuth 2.0 access tokens for API calls. After validating the credentials, I check permissions separately.
- API keys usually identify applications, not individual users.
- For JWT access tokens, validate the signature, issuer, audience, and expiry.
- Return 401 for missing or invalid credentials; return 403 when valid credentials lack permission.
- Authentication checks identity. Authorization checks what that identity can do.
What the interviewer checks: The interviewer checks whether you can choose suitable credentials, validate them safely, and separate authentication from authorization.
Other ways it was asked
- “How would you implement authentication for an API?”
- “How does authentication work in an API?”
- “What authentication methods are commonly used in APIs?”
How do offset pagination and cursor pagination differ?
Asked in 4 of 377 interviews · last asked Oct 14 · Concept · Mid-level
Show answer
Offset pagination skips a set number of rows, then returns a page. Cursor pagination uses a token to continue from a known position in the result order. Offset makes page jumps easy but can slow down at large offsets. Cursor pagination is usually faster for deep pages, but arbitrary page jumps are harder.
- Both need a stable sort order, with a unique field to break ties.
- Inserts or deletes can make offset pagination skip or repeat items between requests.
- Position-based cursors handle those shifts better, but do not guarantee an unchanged view of the data.
- Efficient cursor queries need indexes that support the sort order.
What the interviewer checks: The interviewer checks whether you understand navigation, performance, and what happens when data changes between requests.
Other ways it was asked
- “What is the difference between using an offset and a cursor for database pagination?”
- “Explain the trade-offs between offset pagination and cursor pagination.”
- “What is the difference between page-based pagination and cursor-based pagination?”
What is JSON?
Asked in 3 of 377 interviews · last asked Aug 27 · Concept · Junior
Show answer
JSON stands for JavaScript Object Notation. It is a text format used to exchange data, often between a REST API and a client. It supports objects, arrays, strings, numbers, booleans, and null. Despite its name, it works with many programming languages.
- Objects contain key-value pairs; arrays contain ordered values.
- Object keys and strings must use double quotes.
- Standard JSON does not allow comments or trailing commas.
Code{ "id": 42, "name": "Sam", "active": true, "roles": ["reader"] }What the interviewer checks: The interviewer checks whether you understand JSON’s purpose, basic structure, and syntax.
Other ways it was asked
- “Can you tell me about JSON?”
What are the different types of API calls?
Asked in 3 of 377 interviews · last asked Oct 3 · Concept · Junior
Show answer
REST API calls are usually grouped by HTTP method. GET reads data, POST submits data or creates a resource, PUT replaces or creates a resource at a known URL, PATCH partially updates a resource, and DELETE removes it. HEAD returns headers without a response body; OPTIONS reports supported communication options.
- GET and HEAD should not request changes to server data.
- PUT and DELETE are idempotent: repeating the same request has the same intended effect.
- POST and PATCH are not guaranteed to be idempotent.
What the interviewer checks: The interviewer checks whether you can choose the right HTTP method and understand its expected behavior.
Other ways it was asked
- “What are the different types of APIs?”
- “What types of API requests are there?”
How would you implement API versioning, and what would versioned endpoints look like?
Asked in 3 of 377 interviews · last asked Oct 16 · Scenario · Mid-level
Show answer
I would put the major API version in the URL, such as `/api/v1/orders`, and route each version to its own handlers. I would add a new version for breaking changes and keep compatible changes in the current version. Old versions would stay available during a documented migration period.
- URL paths are easy to see and test; headers or media types are alternatives.
- Version both request and response contracts, not just endpoint names.
- Test supported versions and announce retirement dates before removing old ones.
CodeGET /api/v1/orders/123 POST /api/v1/orders GET /api/v2/orders/123 POST /api/v2/ordersWhat the interviewer checks: The interviewer is checking whether you can evolve an API without unexpectedly breaking existing clients.
Other ways it was asked
- “What steps would you follow to version an API?”
- “How can you implement versioning in a Web API?”
- “How can you implement API versioning, and what would a versioned GET or POST method look like?”
REST API basics interview questions
Start with APIs, REST principles, statelessness, JSON, and how REST compares with SOAP, GraphQL, and gRPC. 47 questions.
What is the difference between REST APIs and GraphQL, how is GraphQL implemented under the hood, and when should each be used?
Asked in 2 of 377 interviews · last asked Oct 23 · Concept · Senior
Other ways it was asked
- “When would you use a REST API versus GraphQL, and how do they differ?”
How does gRPC work?
Asked in 2 of 377 interviews · last asked Oct 5 · Concept · Mid-level
Other ways it was asked
- “What is gRPC?”
How can a REST API be stateless if a request to retrieve a resource depends on an earlier request that created it?
Asked once · last asked Jan 29 · Concept · Mid-level
Other ways it was asked
- “In a REST API, is creating a resource in one request and retrieving it in a later request considered stateful or stateless?”
What is the difference between stateless and stateful systems in client-server interactions and API calls?
Asked once · last asked Jan 29 · Concept · Mid-level
Can you create a record in a REST API with one request and retrieve that same record with a subsequent request?
Asked once · last asked Jan 29 · Concept · Mid-level
How does a component's internal state differ from a resource created through an API?
Asked once · last asked Jan 29 · Concept · Mid-level
Other ways it was asked
- “What is a component's internal state, and does it depend on previous API requests?”
When exposing a service for external consumers, how would you choose between providing API endpoints and publishing a NuGet package?
Asked once · last asked Apr 2 · Design · Mid-level
What is a REST API, and what are the basic HTTP methods it supports?
Asked once · last asked Apr 23 · Concept · Junior
What is the difference between developing a REST API and integrating a third-party REST API?
Asked once · last asked Apr 24 · Concept · Mid-level
What are gRPC and GraphQL used for, and how do they differ from REST?
Asked once · last asked May 25 · Concept · Mid-level
Can you name some TM Forum APIs and explain their current names and purposes?
Asked once · last asked Jun 18 · Concept · Senior
Other ways it was asked
- “What TM Forum APIs do you work with? Can you name any and say what they are called now?”
What is a REST API, and what other API architectural styles are there?
Asked once · last asked Jul 16 · Concept · Mid-level
HTTP methods and status codes interview questions
Check when to use each HTTP method, how requests and headers work, and which status codes fit different operations. 59 questions.
When you design a REST API endpoint to create a resource, what HTTP status code do you typically return, and what do you include in the response body and headers?
Asked in 2 of 377 interviews · last asked Jul 16 · Concept · Junior
Other ways it was asked
- “When designing a RESTful API endpoint in PHP to create a resource, which HTTP method and typical success status code do you use, and what should the response include?”
Which HTTP error status codes do you commonly use in APIs, and in what scenarios?
Asked once · last asked Feb 10 · Concept · Mid-level
When would you choose for a web API endpoint to return a 200, 204, 400, 404, or 409 status code, and what practical client behaviors are you optimizing for with each choice?
Asked once · last asked Feb 16 · Concept · Mid-level
When might a web API return a 409 Conflict response, and how should a client handle it?
Asked once · last asked Feb 16 · Scenario · Mid-level
A user wants to update only their profile bio, leaving their email and name unchanged. Would you use PUT or PATCH, and what could happen if you used the wrong method?
Asked once · last asked Mar 10 · Scenario · Junior
When designing a REST endpoint in PHP to update a resource, how do you decide between PUT and PATCH, and what should each mean semantically?
Asked once · last asked Mar 26 · Concept · Mid-level
When would you return 202 Accepted instead of 201 Created for a create operation, and how would you communicate completion to the client?
Asked once · last asked Mar 26 · Concept · Mid-level
Name six commonly used HTTP status codes and explain what each one indicates.
Asked once · last asked Apr 17 · Concept · Junior
What information should a REST API request include when connecting ServiceNow to Okta?
Asked once · last asked Apr 21 · Tooling · Mid-level
Why is data sent in the request body with POST rather than in the URL?
Asked once · last asked May 19 · Concept · Junior
If I want to send parameters in the URL with a POST request, how can I do that?
Asked once · last asked May 19 · Concept · Junior
If a 17-year-old submits a structurally valid request that violates an age eligibility rule, what error code should the API return?
Asked once · last asked Jul 17 · Scenario · Mid-level
REST API design and versioning interview questions
Explore resource modeling, endpoint names, API contracts, OpenAPI documentation, versioning, and backward compatibility. 66 questions.
What is API versioning, and when would you use it?
Asked in 2 of 377 interviews · last asked Sep 13 · Concept · Mid-level
Other ways it was asked
- “What is API versioning, and how would you use it?”
What is OpenAPI, and how is it used to describe APIs?
Asked once · last asked Mar 9 · Concept · Junior
How do you document REST APIs and integrate them with other systems?
Asked once · last asked Apr 9 · Scenario · Mid-level
When a front end calls a back-end API that triggers a long-running job, how would you design the API contract so the UI can reliably track progress, handle retries safely, and avoid duplicate work?
Asked once · last asked Apr 17 · Design · Senior
How do you handle asynchronous requirements clarification when the Swagger spec conflicts with stakeholders' understanding?
Asked once · last asked May 5 · Scenario · Senior
What is the Backend for Frontend (BFF) pattern, and when would you use it?
Asked once · last asked May 11 · Concept · Mid-level
How would you roll out a schema change to the notification payload without breaking existing consumers?
Asked once · last asked May 23 · Design · Senior
How would you structure the back-end API for notifications, including endpoints and data shapes, to support both real-time and paginated access?
Asked once · last asked May 23 · Design · Senior
What are good practices for naming API endpoints?
Asked once · last asked Jun 4 · Concept · Mid-level
What APIs should a billing system expose to support a mobile wallet integration?
Asked once · last asked Jun 18 · Design · Senior
What does API-first mean, and how does the approach apply when working with existing products that already have APIs?
Asked once · last asked Jun 18 · Concept · Senior
When you're designing endpoints and data models for a web application, how do you ensure that they're efficient and scalable for future growth?
Asked once · last asked Jul 16 · Design · Mid-level
REST API implementation interview questions
Work through routes, controllers, middleware, framework choices, database storage, and practical endpoint-building questions. 60 questions.
How would you design authenticated REST endpoints to create, retrieve, update, and delete library books?
Asked in 2 of 377 interviews · last asked Jul 28 · Design · Mid-level
Other ways it was asked
- “How would you design REST API endpoints to create, retrieve, update, and delete books in a library management system, and how would you handle authentication?”
- “How would you design REST API endpoints to create, retrieve, update, and delete books in a library management system, including pagination and response formats?”
- “How would you design HTTP endpoints for a library application that supports adding and deleting books?”
How does attribute routing work in ASP.NET Core Web API? Specifically, how do you map an action method to a particular URL and HTTP verb?
Asked in 2 of 377 interviews · last asked Aug 15 · Tooling · Junior
Other ways it was asked
- “How does attribute routing work in an ASP.NET Core Web API, and how do you map an action to a specific URL and HTTP method?”
Can you tell me the difference between a controller and a REST controller?
Asked in 2 of 377 interviews · last asked Oct 7 · Concept · Junior
Other ways it was asked
- “What is the difference between a REST controller and a controller?”
How can Apache Iceberg data be exposed through a REST API?
Asked once · last asked Jun 9 · Design · Senior
What design patterns would you use when building APIs with Node.js and Express?
Asked once · last asked Jun 26 · Concept · Mid-level
Other ways it was asked
- “What design patterns have you used when building APIs with Node.js and Express?”
- “Beyond using a consistent format for API responses and errors, what design patterns have you used with Node.js and Express? Can you give an example?”
Besides authorization, roles, and permissions, what other use cases are appropriate for middleware?
Asked once · last asked Feb 10 · Concept · Mid-level
How would you expose a GET endpoint for an internal client to retrieve transactions using an account ID, and what technology or libraries would you use?
Asked once · last asked Mar 5 · Design · Mid-level
How would you design the backend architecture for mobile applications?
Asked once · last asked Mar 6 · Design · Senior
What would you normally include in health checks or health-check endpoints?
Asked once · last asked Mar 9 · Concept · Mid-level
In Spring Boot, how would you design a GET endpoint that accepts a user's ID and returns their information, including retrieving the data from the database?
Asked once · last asked Mar 18 · Tooling · Mid-level
When an API request creates or updates data, how does the application persist that data in the database?
Asked once · last asked Mar 27 · Concept · Mid-level
How would you structure and implement a simple user API that creates and retrieves a user—holding the user temporarily in memory or, alternatively, saving and retrieving it from a database—and returns appropriate HTTP status codes?
Asked once · last asked Apr 9 · Write code · Mid-level
API validation, error handling, and testing interview questions
Questions here cover input validation, business rules, data correctness, error responses, API tests, and how clients handle invalid data. 45 questions.
When designing a REST API, how do you structure error responses consistently, and which HTTP status codes do you standardize for validation, authorization, and conflicts?
Asked in 2 of 377 interviews · last asked Sep 10 · Scenario · Mid-level
Other ways it was asked
- “How do you choose HTTP status codes for validation errors, authentication versus authorization failures, and resource conflicts, and what error response schema do you standardize on?”
How do you verify data correctness when designing an API?
Asked in 2 of 377 interviews · last asked Jun 24 · Scenario · Mid-level
Other ways it was asked
- “How do you handle validation when designing an API?”
How should a Telegram bot handle an invalid response from a currency API?
Asked once · last asked Jun 6 · Scenario · Mid-level
Other ways it was asked
- “How would you test that a Telegram bot fails safely when a currency API returns an invalid response?”
What approach or framework feature would you use to centralize error handling across 20–30 API endpoints?
Asked once · last asked Mar 5 · Tooling · Mid-level
If the frontend already validates text input, is backend validation still necessary, and why?
Asked once · last asked Mar 10 · Scenario · Junior
How would you handle an invalid value, such as a negative price submitted by a user or a BFF?
Asked once · last asked Mar 20 · Scenario · Mid-level
How would you validate a product request before querying MongoDB, then handle and monitor a product-not-found result?
Asked once · last asked Mar 20 · Scenario · Mid-level
How do you handle validation between React and Spring Boot when a user sends a request from the frontend to the backend?
Asked once · last asked Mar 25 · Scenario · Mid-level
How would you implement a button on a contact form that validates the entered address with the Google Maps API, displays whether it is valid, returns the result before the user saves, and prevents saving until validation succeeds?
Asked once · last asked Apr 4 · Scenario · Senior
How can you detect an invalid response from a currency API?
Asked once · last asked Jun 6 · Scenario · Mid-level
What are the major advantages of FastAPI in terms of validation?
Asked once · last asked Jun 24 · Concept · Mid-level
How would you design and optimize a React component for data loading, form validation, API errors, and performance?
Asked once · last asked Jun 24 · Scenario · Senior
All 45 API validation, error handling, and testing questions
REST API security and authentication interview questions
Review authentication, authorization, tokens, API keys, access controls, encryption, sensitive data, and checks that webhooks are genuine. 45 questions.
Is it safe to pass a sensitive employee ID in the query string, and should you use GET or POST?
Asked once · last asked Sep 21 · Scenario · Mid-level
Other ways it was asked
- “When sending sensitive data such as an employee ID, should you use GET or POST?”
- “Is it safe to pass a sensitive employee ID in a GET query string, and should you switch to POST?”
Is validating a request using only an ID sufficient for authentication and authorization, and why or why not?
Asked once · last asked Apr 2 · Concept · Mid-level
When should an API use an API key versus an access token to authenticate requests?
Asked once · last asked Apr 2 · Concept · Mid-level
How would you implement authentication in a backend service, and how would you use Swagger or OpenAPI to document and test it?
Asked once · last asked Apr 9 · Tooling · Mid-level
What is an authentication token, and what are some common API authentication methods?
Asked once · last asked Apr 23 · Concept · Junior
How would you authenticate a front-end UI with back-end APIs?
Asked once · last asked May 5 · Scenario · Mid-level
How would you design a simple back-end API to handle user login requests while ensuring scalability and security? Outline the key components and design decisions you would make.
Asked once · last asked May 8 · Design · Mid-level
Can you explain how you secure REST APIs in enterprise applications?
Asked once · last asked May 14 · Scenario · Senior
What are the main security pitfalls you watch for in web APIs, and how do you systematically prevent them?
Asked once · last asked May 16 · Scenario · Senior
Could you elaborate on how you implement input validation and sanitization in your APIs to prevent injection attacks? What specific techniques or libraries do you use?
Asked once · last asked May 16 · Scenario · Mid-level
Can you maintain a session in an API-based application with separate front end and back end, and if so, how?
Asked once · last asked May 25 · Concept · Mid-level
How does CORS work in a REST API?
Asked once · last asked May 25 · Concept · Mid-level
API pagination, performance, and rate limiting interview questions
Look at filtering, pagination, efficient database queries, caching, uploads, rate limiting, gateways, and handling high traffic. 62 questions.
What is pagination?
Asked in 3 of 377 interviews · last asked Sep 18 · Concept · Junior
Other ways it was asked
- “What do you mean by pagination?”
- “What is pagination, and when would you use it?”
How would you design an API to efficiently retrieve data from millions of database records?
Asked in 2 of 377 interviews · last asked Sep 30 · Design · Senior
Other ways it was asked
- “How would you design an API to handle millions of records?”
- “How would you design pagination for an API that needs to handle millions of records?”
- “How would you efficiently handle an API that needs to return data from 10,000,000 student records in a Postgres database?”
What do you mean by rate limiting?
Asked in 2 of 377 interviews · last asked Sep 12 · Concept · Junior
Other ways it was asked
- “What is rate limiting?”
How can you reduce API response time?
Asked in 2 of 377 interviews · last asked Oct 7 · Scenario · Mid-level
Other ways it was asked
- “How would you reduce average API response time by 30%?”
Where would you implement rate limiting—within the API endpoints or in another component?
Asked once · last asked Feb 11 · Design · Mid-level
What rate-limiting patterns are available, and how can they be set up?
Asked once · last asked Feb 11 · Concept · Senior
Do GraphQL and REST require different API optimization strategies?
Asked once · last asked Feb 23 · Concept · Senior
When you're creating a REST API, how do you ensure it efficiently handles high traffic and scales as needed?
Asked once · last asked Feb 25 · Design · Senior
How would you optimize transaction-history retrieval if the system has been running for 20 years but the account is only one year old?
Asked once · last asked Mar 5 · Scenario · Senior
How can you implement pagination in Spring Boot?
Asked once · last asked Mar 10 · Tooling · Mid-level
How would you design a rate limiter for an API allowing 50 requests per second per user across multiple stateless application servers? What components and data stores would you use, and how would you enforce consistency?
Asked once · last asked Mar 16 · Design · Senior
When redesigning a REST API to handle higher traffic, what database query challenges might arise, and how would you address them?
Asked once · last asked Mar 25 · Scenario · Senior
All 62 API pagination, performance, and rate limiting questions
API idempotency, retries, and consistency interview questions
Think through duplicate prevention, idempotency keys, concurrency, timeouts, safe retries, payment failures, and consistency across systems. 73 questions.
How would you prevent duplicate SMS messages when processing repeated requests?
Asked in 2 of 377 interviews · last asked Jul 27 · Concept · Senior
Other ways it was asked
- “How would you prevent duplicate SMS messages from being sent?”
How would you design idempotency for a POS/payments endpoint, including the database schema and API contract, so retries don't create duplicate charges?
Asked in 2 of 377 interviews · last asked Oct 22 · Design · Senior
Other ways it was asked
- “In a high-throughput REST API, how would you implement idempotency for POS or payments so retries don't double-charge?”
How would you prevent duplicate survey submissions caused by repeated clicks or network retries?
Asked once · last asked Sep 30 · Scenario · Mid-level
Other ways it was asked
- “How would you prevent duplicate survey submissions if a user taps the submit button twice?”
- “How would you prevent duplicate survey submissions if a student taps the submit button twice?”
- “How would you handle a survey submission being sent twice because a student has a weak signal?”
How would you handle duplicate or out-of-order callbacks using idempotency keys, and where would you enforce idempotency?
Asked once · last asked Oct 13 · Scenario · Senior
How would you prevent duplicate form submissions or repeated requests from being processed twice?
Asked once · last asked Jan 28 · Scenario · Mid-level
How would you use idempotency in a REST API to prevent a critical request, such as a payment, from being processed multiple times after retries or duplicate clicks?
Asked once · last asked Feb 10 · Scenario · Senior
How would you ensure an API request is sent only once and prevent it from being invoked more than once accidentally?
Asked once · last asked Mar 5 · Scenario · Mid-level
How should the order service handle a GET request to the limit service that times out or receives no response, and what should the order API communicate?
Asked once · last asked Mar 19 · Scenario · Senior
In a PHP API integrating a third-party service, how do you design retries and timeouts to avoid duplicate side effects, such as double charging, and what role does idempotency play?
Asked once · last asked Mar 26 · Design · Senior
How would you implement idempotency end to end—including client key generation, server storage and TTL, and response replay—for a create-order API that may be retried multiple times?
Asked once · last asked Apr 17 · Design · Senior
In Laravel, how would you enforce idempotency for a POST endpoint, such as creating a payment, to prevent duplicate processing during retries or timeouts?
Asked once · last asked May 5 · Scenario · Senior
Where would you persist the idempotency key and associated response in the Laravel schema, and what unique constraint would you add to prevent duplicates?
Asked once · last asked May 5 · Design · Senior
API integration and webhooks interview questions
Integration questions cover frontend connections, third-party services, SDKs, webhooks, messaging, streaming, background workflows, and troubleshooting. 119 questions.
How would you implement payment processing in an application?
Asked in 3 of 377 interviews · last asked Oct 7 · Design · Mid-level
Other ways it was asked
- “How would you implement payment processing?”
- “How would you design a payment processing system?”
How would you implement an API integration and handle errors and timeouts?
Asked in 2 of 377 interviews · last asked Oct 20 · Behavioral · Mid-level
Other ways it was asked
- “Describe an API integration you implemented. How did you handle errors and timeouts?”
- “Describe a REST or SOAP API integration you implemented. How did you handle errors and timeouts?”
When would you choose synchronous REST calls over asynchronous messaging between systems, and why?
Asked in 2 of 377 interviews · last asked Oct 21 · Design · Senior
Other ways it was asked
- “When designing an interface between two systems, what factors determine whether it should be synchronous or asynchronous, and which tools and protocols would you use?”
- “When would you use synchronous REST communication versus asynchronous messaging between enterprise applications? Which failure modes influence that decision?”
How would you connect a React frontend to a backend API?
Asked in 2 of 377 interviews · last asked Sep 10 · Design · Mid-level
Other ways it was asked
- “How would you connect a React frontend to a Python backend?”
- “How would you integrate a React front end with a back end in a web application?”
How do you pass user-entered text from a React application to a backend API?
Asked once · last asked Jul 31 · Scenario · Mid-level
Other ways it was asked
- “How do you pass user text from React state to a backend API?”
How would you reduce front-end and back-end integration overhead by 60–70%?
Asked once · last asked Aug 24 · Behavioral · Mid-level
Other ways it was asked
- “How did you reduce front-end and back-end integration overhead by 60–70%?”
- “How can you reduce front-end and back-end integration overhead?”
How would you integrate real-time FedEx shipping calculations into the Salesforce B2B Commerce checkout process?
Asked once · last asked Sep 21 · Design · Senior
Other ways it was asked
- “How would you integrate real-time shipping calculations into the Salesforce B2B Commerce checkout process?”
How would you connect an external website to a chatbot and provide the website's data to it?
Asked once · last asked Sep 30 · Design · Mid-level
Other ways it was asked
- “How would you integrate an external company website with a chatbot so the bot can use the website's data?”
How would you add an existing tag to a ticket using code?
Asked once · last asked Oct 1 · Write code · Mid-level
Where should separate POST requests for updating a ticket tag and sending a message be made?
Asked once · last asked Oct 1 · Write code · Mid-level
Given an accordion parent item with child items for each accordion entry, how would you fetch the data and render it on the front end in a headless application?
Asked once · last asked Feb 9 · Scenario · Mid-level
In a headless application, when would you modify data from the front end using a GraphQL mutation?
Asked once · last asked Feb 9 · Scenario · Mid-level
Related interview questions
- Software Engineer interview questions
- AI Engineer interview questions
- QA Engineer interview questions
- Solutions Architect interview questions
- Data Structures and Algorithms interview questions
- OOP and Design Patterns interview questions
- System Design interview questions
- Microservices interview questions
- Kafka and Message Queues interview questions
- Caching and Redis interview questions
- Operating Systems interview questions
- Computer Networks interview questions
- Git interview questions
How this list is made
Every question here was asked by a real interviewer in a real job interview that a candidate ran MeetAssist in. After the call, the interviewer's questions are pulled from the transcript. Practice sessions, tests, exams and anything that was not a job interview are dropped.
Questions are rewritten so they make sense on their own: names of people, employers and clients are removed, and speech-to-text mistakes are fixed. Small talk, logistics and questions about one candidate's own résumé are left out. Rephrasings of the same question are merged, and the count is the number of different interviews it came up in.
The interviews come from candidates who use MeetAssist, so they lean towards software, data and AI roles: the shares describe these interviews, not every REST API interview. Answers to the most asked questions are written and checked by an editor; a "common mistake" is shown only when reviews of real answers in these interviews show it, with the count.
377 interviews, 243 candidates, Jan 2026 to Oct 2026. Updated every month with new interviews.
Or add the Chrome extension