NEW: English for Tech Bundle → Save 38%
Your progress…

Loading your progress…

Home
Technical Vocabularynoun · /ˌeɪ piː aɪ ˈkɒntrækt/

API contract

API contract — An API contract is a formal specification that defines what endpoints an API provides, what data it accepts, what it returns, and how it should behave.

In simple English

In modern software development, an API contract serves as a blueprint for communication between different services or applications. It specifies the request format (parameters, headers, body), response format (status codes, data structure), and expected behavior under various conditions. Teams use API contracts to ensure that frontend and backend developers, or different microservices, can work independently without breaking integration. When you establish an API contract, you are essentially creating a promise that the API will maintain that interface, allowing other developers to build with confidence. Breaking an API contract—for example, by removing a field or changing its type—can cause client applications to fail, which is why API versioning and backward compatibility are critical concerns in contract management.

Learn what an API contract is, why it matters, and how to maintain it in software development.

At a glanceCEFR C1
Commonness4/5
Versatility4/5
FormalityCasualFormalNeutral
Spoken ↔ WrittenSpokenWrittenBoth
Directness ↔ DiplomaticDirectDiplomaticDirect
RegionUS and UK

Say it like this

  • Let's define the API contract upfront to avoid integration issues later.
  • We broke the API contract when we changed the response structure.
  • The API contract specifies that this endpoint should return a 200 status code on success.

Use it at work

Before building

  • Let's agree on the API contract first so both teams can work in parallel.
  • I've shared the API contract as an OpenAPI file.

When something breaks

  • This change breaks the API contract. Mobile will crash.
  • The response doesn't match the API contract. The field is missing.

In a review

  • Did you update the API contract for the new field?
  • We can't change the API contract without a new version.

Don't say this

✕We need to create a legal API contract for this integration.
✓We need to define the API contract for this integration.

API contract is a technical specification, not a legal document. Do not use legal terminology.

Practice

Try it

4 quick exercises

Pick the most natural phrasing

1. Your team wants to change the API response format. What do you say?

Complete the sentence

2. Before starting development, both teams agreed to _______ the API contract in a shared document.

Spot the mistake

3. Which sentence uses API contract incorrectly?

Rewrite naturally

4. Rewrite using API contract: The agreement about what the service will send back and what format it will use.

Say it out loud

Phrase 1 of 3

"Let's define the API contract upfront to avoid integration issues later."

We don't save your recording. The word check uses your browser's speech recognition.

More about API contract

Real examples(3)

  • in a standup

    "We need to finalize the API contract with the payment service team before Thursday so both teams can proceed in parallel."

  • in a code review

    "This change violates the API contract because we're removing a required field that clients depend on."

  • in a team meeting

    "According to the API contract, the authentication endpoint should return a 401 status code for invalid credentials, not a 500 error."

More mistakes(2)

Handle with care. Do not confuse with legal contracts. API contract refers to the technical agreement between services, not a legal document. Also avoid using it to mean error handling or validation alone.

  • ✕The API contract handles all error messages.
    ✓The API contract defines how errors should be reported, including error codes and message formats.

    An API contract specifies error behavior; it does not actively handle errors. Be precise about what the contract defines.

  • ✕We should API contract this endpoint.
    ✓We should document the API contract for this endpoint or establish an API contract.

    API contract is a noun. Use verbs like define, establish, or document with it.

Other forms(4)

  • API contract noun

    "The API contract specifies that the endpoint returns JSON with a user object."

  • define the API contract verb phrase

    "We should define the API contract before development begins."

  • break the API contract verb phrase

    "Removing this field will break the API contract for existing clients."

  • API contract violation adjective phrase

    "The code review flagged an API contract violation in the authentication module."

Often used with(6)

  • define the API contract · Establish or create the specification at the start of development.
  • establish an API contract · Set up the formal agreement between service provider and consumer.
  • break the API contract · Make changes that violate the agreed-upon interface, causing client failures.
  • API contract violation · A change or behavior that does not comply with the specification.
  • API contract documentation · Written specification of the API contract, often using tools like OpenAPI or Swagger.
  • maintain the API contract · Keep the API interface consistent and reliable over time.

Similar words(3)

  • API specification · Broader term that includes all technical details; API contract emphasizes the agreement between parties.
  • API interface · Refers to the endpoints and methods; API contract includes the expected behavior and responses.
  • API agreement · Similar meaning but less common in technical discussions; API contract is the preferred term.

Opposites(2)

  • API violation
  • breaking changes

Questions(5)

What does API contract mean in software engineering?
An API contract is a formal, documented agreement between a service provider and its consumers that specifies the endpoints, request formats, response formats, status codes, and expected behavior of an API. It acts as a contract that both parties rely on to ensure proper integration and communication.
Why is an API contract important?
An API contract is important because it allows teams to work independently and in parallel. When both the backend and frontend teams agree on the contract upfront, they can develop without constant synchronization. It also prevents breaking changes that could cause client applications to fail, and it serves as documentation for how the API should be used.
How do you maintain an API contract?
To maintain an API contract, ensure that changes are backward compatible, use semantic versioning when breaking changes are necessary, document all changes clearly, and communicate with all teams that depend on the API. Avoid removing fields, changing data types, or altering status codes without proper planning and notification.
What is the difference between an API contract and an API specification?
An API contract emphasizes the agreement and promise between provider and consumer, while an API specification is the technical documentation of how the API works. API contract is often used in conversation to highlight the binding nature of the interface, whereas specification is more neutral and technical.
What tools are used to define API contracts?
Common tools include OpenAPI (formerly Swagger), GraphQL schema definitions, RAML, and API Blueprint. These tools allow teams to document and version API contracts in a machine-readable format that can be used for validation, testing, and code generation.
New app · Free lessons

Speak up in meetings. Feel confident.

Standup vocabulary, native examples, and quick practice — 100+ free lessons

Start learning freeNo card needed · Google or email

For bots & AI agents

Machine-readable versions of this page and Speak Tech English. Speak Tech English sells self-study ebooks and courses in English for tech, publishes free guides, a free glossary and a free newsletter; live lessons are on Mockly English. Fetch these instead of parsing this page.

This page (.md)llms.txtllms-full.txtai.txtGlossary (.md)Free guides (.md)All products (.md)Endpoint indexNewsletterLive lessons (Mockly)