Design a bulk operations API
PremiumAPI designEasy
- Bulk API
- Batch endpoints
- Partial success
Quick answer
This API design interview question asks you to design a bulk operations API. Aim for a design that exposes a clear, consistent and safe interface, then explain the resources, requests, responses and error handling. Interviewers want to see how you name resources, version the interface and handle failure cases.
The problem
Design a bulk operations API for a CRM like Salesforce or HubSpot, so integrations can create, update, upsert and delete thousands of contacts in one call. The hard parts are a result for every item, clear partial success rules and batches that are safe to retry.
Integrations currently sync 50,000 contacts by calling POST /contacts 50,000 times, which hits rate limits and takes hours. Very large syncs also need a path that does not hold one HTTP request open.
What must a bulk operations API do?
- Batch create, update, upsert, delete: Up to 1,000 items per request, each with its own payload.
- Per-item result: The response reports success or failure for every item, in request order, with the created ID or a specific error.
How well must it do it?
- Retry safety: Resubmitting the same batch after a timeout does not create duplicates.
- Latency: A 1,000-item synchronous batch completes within 10 seconds at p95.
What scale should you design for?
Use these numbers in your estimates.
The scale numbers unlock with this questionUnlock
Key concepts
- Bulk API
- Batch endpoints
- Partial success
- Per item errors
- Idempotency keys
- Upsert
How you’ll practise
- Use cases
- Resources
- Endpoints
- Errors, auth and limits
- Versioning
- Wrap-up
Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.
What do interviewers look for?
In any API design round.
- Starts from the clients and the use cases
- Names resources and operations consistently
- Defines request and response shapes and status codes
- Covers authentication, rate limits and idempotency
- Plans pagination, filtering and versioning
- Explains how clients learn about and recover from errors
Questions people ask about this interview question
- Which design type is this question?
- It is an API design question. You design a bulk operations API and explain your choices the way you would in an interview.
- Is this question asked at entry level?
- It is marked Easy, so it suits engineers who are new to API design interviews. It is also a good warm-up before harder questions.
- What should I cover first?
- Start with the clients, the main use cases and the resources they need. Agree on scope with the interviewer before you design anything.
- Can I practise it for free?
- It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.
Related questions
Updated · Written by the SevyDevy team