Skip to content
ArchitectureIntermediateVersion 1.0Works with any capable model

REST API Design Review

Review a proposed HTTP API contract for consistency, error handling, versioning and client-friendliness before implementation starts.

When to use it

Use it on a draft OpenAPI file, a list of endpoints or a design document before anyone writes handlers. It catches inconsistent naming, unclear failure behaviour, missing pagination and operations that cannot be retried safely, while changes are still cheap.

When not to use it: Do not use it as a substitute for talking to the client developers who will call the API. It does not replace a security review, and it cannot judge whether the API fits the business domain without your context.

Required inputs

PlaceholderWhat to provideExample
{{api_contract}}The proposed contract: OpenAPI text, or a list of method, path, request and response shapes.POST /createBooking {customerId, slotId} -> 200 {id} GET /getBookings?customer=... -> 200 [{id, slotId, status}] DELETE /booking/{id} -> 200
{{consumers}}Who will call the API and how: web app, mobile app, partner systems, scripts.A web front end and a nightly export job run by the clinic's admin team.
{{conventions}}Existing house conventions the API must follow, or 'none'.JSON only, ISO 8601 UTC timestamps, errors use a { code, message } object.

The prompt

Fill in each {{placeholder}} before you send it.

You are a senior API designer reviewing a proposed HTTP API before implementation. Your job is to find problems that would be expensive to change once clients depend on it.

<api_contract>
{{api_contract}}
</api_contract>

<consumers>
{{consumers}}
</consumers>

<conventions>
{{conventions}}
</conventions>

Review these areas, skipping any that do not apply:
1. Resource modelling and naming: nouns versus verbs, plural or singular consistency, nesting depth, ambiguous names.
2. HTTP semantics: method choice, status codes, idempotency and safe retries, what happens on a repeated request.
3. Error design: one consistent error shape, distinguishable client and server faults, and enough detail for a client to react.
4. Collections: pagination, filtering, sorting, and what happens when the result is large or empty.
5. Evolution: versioning approach, how fields can be added without breaking clients, and how deprecation would work.
6. Concurrency and consistency: lost updates, double submission, and ordering assumptions.
7. Anything the contract implies but does not specify, such as authentication, rate limits or time zones.

Rules:
- Base every finding on something in the contract. Quote the endpoint or field you mean.
- Do not invent requirements. When the contract is silent, report it as a gap and ask a question instead of assuming behaviour.
- Rank findings: Blocker (clients will break or data may be corrupted), Should fix, Consider.
- Suggest a concrete corrected form for each Blocker and Should fix item.
- Do not redesign the whole API. Keep the author's structure where it is sound.
- Say where you are uncertain, particularly where the right answer depends on the consumers or conventions.

Output format:
Summary (three sentences at most)
Findings table: ID | Severity | Where | Problem | Suggested change
Questions for the author
What is already sound (two or three points)

Expected output

A short summary and a ranked findings table where each row quotes the endpoint concerned, explains the consequence and proposes a concrete fix. Typical findings include verbs in paths, 200 returned for creation, no pagination on a list and no idempotency strategy for creation. A list of questions covers whatever the contract left unspecified, and a few sound design choices are acknowledged.

Sample response (excerpt)Illustrative — your output will differ
Summary
The contract works for a first client but will be hard to evolve: naming is inconsistent and failure behaviour is undefined.

Findings
F1 | Blocker | POST /createBooking | A retried request after a timeout could create two bookings; there is no idempotency key. | Accept an Idempotency-Key header and return the original booking on a repeat.
F2 | Should fix | GET /getBookings | Verb in the path and no pagination; the nightly export will grow unbounded. | GET /bookings?customer=...&limit=...&cursor=...
F3 | Should fix | DELETE /booking/{id} -> 200 | Singular path, and the response body is unspecified. | Use /bookings/{id}, return 204, and define the result for an already-cancelled booking.

Questions for the author
- Is a cancelled booking deleted or kept with a status? The list response includes "status", which suggests kept.

Limitations

  • The assistant reviews the contract as written. It cannot tell how the API behaves in practice, so implementation bugs and performance problems are out of reach.
  • Style advice such as REST purity can be presented as a rule when your conventions say otherwise. Give your conventions and check suggestions against them.
  • It may recommend patterns, such as cursor pagination, that are heavier than a small internal API needs. Weigh every suggestion against the consumers.
  • It cannot review what is missing from a truncated contract. Pass the whole file or flag clearly which parts you left out.

How to validate the output

Do these before relying on anything the model returns.

Written by
PromptFable Editorial
Last updated 13 Nov 2026
Review
Not yet reviewed

PromptFable is independent and is not affiliated with, endorsed by or sponsored by Anthropic, Google, OpenAI or any other vendor. Claude, Gemini, Google AI Studio and other product names are trademarks of their respective owners.