🤖 Catch Inconsistent API Design Before Your Consumers Do
One endpoint returns dates as ISO strings, another returns Unix timestamps. One uses camelCase, another snake_case. One paginates with page/pageSize, another with offset/limit. None of these are individually wrong – together, they make an API exhausting to integrate with, and this prompt catches the drift before it ships.
🤖 The Prompt
I'm about to ship a new API endpoint and want to check it for consistency against the rest of our API before release. Here's the design of the new endpoint, followed by 2-3 examples of our existing endpoints for comparison: NEW ENDPOINT: [paste the new endpoint's request/response shape] EXISTING ENDPOINTS (for comparison): [paste 2-3 existing endpoint shapes] Please check specifically for consistency in: 1. Naming convention (camelCase vs snake_case, field naming patterns like "createdAt" vs "created_date") 2. Date/time format (ISO 8601 string vs Unix timestamp vs something else) 3. Pagination style, if applicable (cursor vs offset, field naming for page size/limit) 4. Error response shape (status codes, error object structure) 5. Null vs. omitted fields for optional data List every inconsistency you find between the new endpoint and the existing pattern, and suggest the specific change needed to match. If the existing endpoints themselves disagree with each other, flag that too.
✅ Why Consistency Checks Get Skipped Otherwise
- A single developer reviewing their own endpoint has no natural reason to go re-read three OTHER endpoints’ exact field naming before shipping – this prompt does that comparison automatically, every time.
- API inconsistency compounds – every inconsistent endpoint makes the NEXT one harder to judge, since there’s no longer one clear pattern to match against, which is exactly why catching drift early matters.
- Flagging disagreement between EXISTING endpoints as well surfaces technical debt worth fixing, not just problems with the new addition.
⚠️ Getting the Most Value From It
- Paste real production endpoint examples, not idealized ones – if your existing API already has quirks, you want the new endpoint checked against reality, not against how things were supposed to be.
- For a large API surface, keep a running ‘style reference’ doc updated with your team’s actual conventions, and paste that alongside the new endpoint instead of hand-picking 2-3 examples each time.
API consumers don’t experience your endpoints one at a time — they experience the whole surface at once, and every small inconsistency is a decision they have to relearn.
