InterviewStack.io LogoInterviewStack.io

API Contracts and Schema Design Questions

Defining the interface contract between producers and consumers: request/response payload shapes, data models, field-level validation, nullability, and enum/typing decisions (including safely evolving an enum's allowed values without breaking clients). Covers contract-first design with OpenAPI and JSON Schema (authoring specs, generating SDKs and mock servers, catching breaking changes in CI), mapping internal domain models to external DTOs as both evolve independently, and designing a stable error-response contract (structured error codes, correlation IDs, retryable classification). Also covers the leadership and behavioral practice of establishing and governing contract standards across teams. The contract is the durable artifact clients depend on.

HardTechnical
56 practiced

How do you lead API and schema governance across multiple engineering teams without becoming a bottleneck? Describe the standards, review rituals, exception process, and coaching mechanisms you would put in place so teams can move quickly while still protecting contract quality and data integrity.

MediumTechnical
41 practiced

How should an API's error contract let a client tell a retryable failure (for example, a downstream dependency outage) apart from a non-retryable one (a validation error, an authorization failure)? Walk through the response shape, the HTTP status codes you would map to it, and what you would expose for internal observability.

EasyBehavioral
46 practiced

Walk me through a time you helped your team improve API or data-model consistency by introducing a review practice, template, or standard. How did you get buy-in, and what measurable outcome showed the change was worth it?

EasyTechnical
56 practiced

Compare JSON and Protocol Buffers (protobuf) as serialization formats for APIs. Discuss trade-offs across latency, payload size, schema evolution, developer ergonomics, client diversity, human-readability, and tooling. Provide scenarios where you would choose JSON for a public REST API and where you would choose protobuf for internal, high-throughput communication, and why.

EasyTechnical
52 practiced

What should a well-designed API contract specify about the data itself, beyond just the list of endpoints? Walk through what you would document for request and response shapes, required versus optional fields, and how the contract communicates its own versioning and evolution guarantees to consumers.

Unlock Full Question Bank

Get access to all 16 API Contracts and Schema Design interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.