All 73 questions

  1. 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?”
  2. 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?”
  3. 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?”
  4. 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?”
  5. 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?”
  6. 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

  7. How would you prevent duplicate form submissions or repeated requests from being processed twice?

    Asked once · last asked Jan 28 · Scenario · Mid-level

  8. 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

  9. 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

  10. 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

  11. 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

  12. 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

  13. 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

  14. 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

  15. How would you handle a situation where money is deducted by the payment gateway but your application does not receive the payment update?

    Asked once · last asked May 25 · Scenario · Senior

  16. How do you ensure the idempotency key check-and-create is atomic under concurrency, for example when two identical requests arrive at the same time across multiple instances?

    Asked once · last asked Jul 16 · Scenario · Senior

  17. What practices do you use when calling an external API to make the integration resilient and reliable?

    Asked once · last asked Jul 16 · Scenario · Mid-level

  18. When an API call fails intermittently with timeouts or 502s on mobile, what's your strategy for retry and backoff and making requests idempotent so you don't create duplicate side effects?

    Asked once · last asked Jul 20 · Scenario · Senior

  19. What is idempotency in HTTP methods and how do you verify idempotency in automated tests?

    Asked once · last asked Jul 21 · Scenario · Mid-level

  20. How do you prevent duplicate requests from being processed more than once in a booking or trading workflow?

    Asked once · last asked Jul 22 · Scenario · Senior

  21. Why might automatically retrying an SMS request after a timeout cause problems?

    Asked once · last asked Jul 26 · Concept · Senior

  22. How do you prevent double deduction when the same payment request is retried?

    Asked once · last asked Jul 27 · Scenario · Senior

  23. In a banking application, a user submits a payment, the request times out without a response, and the user submits the same payment again. How would you prevent it from being processed twice?

    Asked once · last asked Jul 31 · Scenario · Senior

  24. How would you implement idempotency end to end so duplicates are prevented even if the API times out and the client retries while a worker is mid-processing?

    Asked once · last asked Aug 10 · Scenario · Senior

  25. Where would you implement idempotency in a label purchase and delivery system?

    Asked once · last asked Aug 11 · Design · Senior

  26. How would you handle failed Stripe webhook requests or subscription renewals that are not reflected in the system?

    Asked once · last asked Aug 11 · Scenario · Senior

  27. How would you make rate-limit enforcement idempotent?

    Asked once · last asked Aug 24 · Design · Senior

  28. When an agent selects a tool and gets an HTTP 500 back from the server, how should the agent engine handle that self-correction loop?

    Asked once · last asked Aug 25 · Scenario · Senior

  29. How would you design idempotency for create-order POST requests and retries or refreshes, so flaky network connections don't create duplicate rows in PostgreSQL?

    Asked once · last asked Sep 3 · Design · Senior

  30. How do you handle idempotency, failed transactions, duplicate requests, and database consistency in a payment flow?

    Asked once · last asked Sep 4 · Scenario · Senior

  31. When Salesforce sends a record to an external system, how would you prevent that system from creating the same record more than once if the first request succeeded but Salesforce timed out and retried it?

    Asked once · last asked Sep 15 · Scenario · Senior

  32. In a code review, how do you verify that an endpoint is idempotent or clearly non-idempotent, and that retries won't create duplicate side effects?

    Asked once · last asked Sep 16 · Scenario · Senior

  33. What are the must-have edge cases and failure mode tests when designing an idempotent order creation API with a database and message outbox?

    Asked once · last asked Sep 16 · Scenario · Senior

  34. How would you design a REST integration from Salesforce that is resilient to transient failures, including your strategies for retries, idempotency, and monitoring? Give your key decisions and one example.

    Asked once · last asked Sep 17 · Design · Senior

  35. How would you handle duplicate payment webhooks or messages to prevent crediting tokens twice?

    Asked once · last asked Sep 18 · Scenario · Senior

  36. Where should duplicate detection happen when processing payment webhooks?

    Asked once · last asked Sep 18 · Design · Senior

  37. How would you prevent duplicate likes caused by rapid repeated clicks?

    Asked once · last asked Sep 18 · Scenario · Mid-level

  38. What would you do if a Salesforce integration creates duplicate orders when requests are retried after a timeout, including when identical requests arrive concurrently?

    Asked once · last asked Sep 18 · Scenario · Senior

  39. How would you handle race conditions, duplicate submissions, and stale results in an Angular search flow using cancellation, debouncing, or idempotency, and what API support might be needed?

    Asked once · last asked Sep 22 · Scenario · Senior

  40. How should you choose a TTL for an idempotency key stored in Redis?

    Asked once · last asked Sep 22 · Scenario · Senior

  41. A clinician opens a patient planning screen. While they are editing, another user changes the same planning data from another workstation. How would you prevent the first user from accidentally overwriting the second user's changes?

    Asked once · last asked Sep 23 · Scenario · Senior

  42. What does idempotency mean in a REST API?

    Asked once · last asked Sep 23 · Concept · Mid-level

  43. How do you safely retry failed external API calls?

    Asked once · last asked Sep 25 · Scenario · Senior

  44. How would you safely retry a transaction-creation request after a timeout?

    Asked once · last asked Sep 25 · Scenario · Senior

  45. How would you handle transient errors when creating a transaction?

    Asked once · last asked Sep 25 · Scenario · Senior

  46. How would you handle a transaction-creation request if the remote system times out?

    Asked once · last asked Sep 25 · Scenario · Senior

  47. How would you prevent duplicate transactions and recover safely after a timeout?

    Asked once · last asked Sep 25 · Scenario · Senior

  48. What would you do if an external API does not support an idempotency key and a request times out?

    Asked once · last asked Sep 25 · Scenario · Senior

  49. How would you handle errors, retries, and duplicate records in an API integration using batch data processing?

    Asked once · last asked Sep 28 · Behavioral · Mid-level

    Other ways it was asked
    • “How did you handle errors, retries, and duplicate records in an API integration using batch data processing?”
  50. How would you implement idempotency and retry handling in an integration?

    Asked once · last asked Sep 29 · Scenario · Senior

  51. How would you handle two identical requests arriving simultaneously before either request has finished?

    Asked once · last asked Sep 30 · Scenario · Senior

  52. Why might two POST requests be made at the same time when updating a ticket?

    Asked once · last asked Oct 1 · Scenario · Mid-level

  53. How would you handle a case where a message already exists, versus adding a tag and sending a message?

    Asked once · last asked Oct 1 · Scenario · Mid-level

  54. How would you use a hash map on the frontend to prevent duplicate payment requests?

    Asked once · last asked Oct 1 · Scenario · Mid-level

  55. How would you store and use a unique key to prevent duplicate payment requests across tabs and devices?

    Asked once · last asked Oct 1 · Design · Senior

  56. How would you reduce payment failures in a Stripe integration?

    Asked once · last asked Oct 9 · Behavioral · Mid-level

    Other ways it was asked
    • “Tell me about a time you reduced payment failures with Stripe.”
  57. How would you implement conditional API retries in a network manager?

    Asked once · last asked Oct 12 · Scenario · Senior

  58. How would you decide whether and how often to retry a POST request?

    Asked once · last asked Oct 12 · Scenario · Senior

  59. When multiple clients create items at the same time, how would you prevent duplicate records? For example, two requests creating the same username.

    Asked once · last asked Oct 14 · Scenario · Mid-level

  60. How would you prevent a transaction from being processed twice when a client retries a request?

    Asked once · last asked Oct 14 · Scenario · Senior

  61. When an external provider sends the same transaction more than once, how would you prevent a customer from being credited twice?

    Asked once · last asked Oct 15 · Scenario · Senior

  62. A banking core sends a payment order via a REST POST request, but the request times out without a response. Can the POST be retried, and what determines whether doing so is safe?

    Asked once · last asked Oct 15 · Scenario · Senior

  63. Explain the concept of idempotency in a method.

    Asked once · last asked Oct 15 · Concept · Mid-level

  64. How do you document retryability, idempotency, and backoff for errors and retries so engineers do not accidentally double-charge?

    Asked once · last asked Oct 20 · Scenario · Mid-level

  65. How do you decide whether an API operation should be idempotent, and what are two concrete techniques you would use to enforce idempotency end to end?

    Asked once · last asked Oct 20 · Design · Mid-level

  66. Design a service that updates its own PostgreSQL database and communicates with two external enterprise systems. One downstream system can occasionally be unavailable. How would you design transaction boundaries, retry and timeout handling, and consistency?

    Asked once · last asked Oct 21 · Design · Senior

  67. How would you handle payment retries and delayed webhook confirmations in a purchase flow?

    Asked once · last asked Oct 23 · Scenario · Mid-level

  68. When designing idempotency for a payment creation API, what key would you choose, where would you store it, and how would you handle requests with the same key concurrently?

    Asked once · last asked Oct 24 · Design · Senior

  69. How would you make the event handler idempotent across database writes and external API calls so reprocessing after a crash doesn't duplicate side effects?

    Asked once · last asked Oct 24 · Scenario · Senior

  70. What is the maximum time an API endpoint can take to return a response?

    Asked once · last asked Mar 4 · Concept · Junior

  71. Can processing a payment with an instrument ID lead to a decline?

    Asked once · last asked Jul 27 · Concept · Mid-level

  72. Where would you store a generated unique request key on the frontend to prevent duplicate payment submissions?

    Asked once · last asked Oct 1 · Scenario · Mid-level

  73. How many times would you retry an API request?

    Asked once · last asked Oct 12 · Scenario · Mid-level

More REST API 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.