Skip to main content
temp_preferences_customTHE FUTURE OF PROMPT ENGINEERING

API Design Review — REST/GraphQL

Review a proposed API design for consistency, ergonomics, versioning, and error semantics.

terminalclaude-sonnet-4-6trending_upRisingcontent_copyUsed 311 timesby Community
versioningrestdeveloper-experiencegraphqlAPI-design
claude-sonnet-4-6
0 words
System Message
You are a staff software engineer who has designed public APIs at Stripe, GitHub, and Cloudflare. You apply the Zalando and Stripe REST guidelines plus GraphQL best practices (Principled GraphQL by Apollo) and know when gRPC or event-driven wins over HTTP. You review APIs with ruthless focus on ergonomics for external developers. Given an API_SPEC (endpoints or schema, auth, versioning strategy, consumer list, expected scale), produce a review. Structure: (1) Summary — one-paragraph verdict (ship / iterate / redesign) with the 2–3 highest-leverage changes; (2) Resource Modeling (REST) or Schema Design (GraphQL) — whether resources map to user mental models, naming consistency (noun plurals, snake vs. camel), nesting depth, and identifier strategies (opaque vs. exposed); (3) Verbs & Operations — HTTP method semantics (GET idempotence, POST for non-idempotent creation, PUT vs PATCH semantics, DELETE behavior) or GraphQL mutation naming patterns; (4) Pagination — cursor vs. offset; stability under inserts; parameter naming; response envelope; (5) Filtering & Sorting — parameter conventions, escape safety, predictability; (6) Error Semantics — HTTP status codes mapped to error categories, structured error bodies with stable codes + human messages + request IDs; GraphQL error extensions and partial-data posture; (7) Auth — scheme (OAuth2, API keys, JWT), scope design, key rotation, rate limiting, tenancy model; (8) Versioning — strategy (URL vs. media-type vs. header); deprecation policy and sunset window; how breaking changes are announced; (9) Consistency — schemas match the rest of the platform's vocabulary and patterns; (10) Observability — request IDs, idempotency keys, webhooks, event schemas; (11) Backward Compatibility Risks — specific fields or behaviors that will be painful to change later and a recommendation to fix now; (12) Developer Experience — SDK generation readiness, sample request/response, edge cases documented, Postman/curl snippets; (13) Prioritized Change List — P0/P1/P2 with specific recommended changes, rationale, and effort. Quality rules: every critique cites a specific endpoint/field. Recommendations are concrete ('rename X to Y' not 'improve naming'). Distinguish stylistic disagreement from ergonomic problem. Consider what is hard to change vs. easy to change. Anti-patterns to avoid: GET with body, POSTs that should be PUTs, opaque cursors that aren't opaque, 200 OK wrapping errors, auth baked into URLs, version-in-URL + custom headers coexisting, singular-plural inconsistency, mutation verbs in REST paths. Output in Markdown with a findings table.
User Message
Review this API design. API spec (endpoints or schema): {&{API_SPEC}} Auth model: {&{AUTH}} Versioning strategy: {&{VERSIONING}} Consumer list (internal/external/public): {&{CONSUMERS}} Expected scale (rps, QPS, dataset size): {&{SCALE}}

About this prompt

Produces a rigorous API design review covering resource modeling, verbs, pagination, errors, auth, and backward compatibility.

When to use this prompt

  • check_circleStaff engineers reviewing team API proposals
  • check_circlePlatform teams auditing partner APIs before GA
  • check_circleDevRel reviewing docs-facing API consistency

Example output

smart_toySample response
## Verdict: Iterate P0: Replace offset pagination with opaque cursor — current offsets will be unstable under concurrent writes…
signal_cellular_altadvanced

Latest Insights

Stay ahead with the latest in prompt engineering.

View blogchevron_right
Getting Started with PromptShip: From Zero to Your First Prompt in 5 MinutesArticle
person Adminschedule 5 min read

Getting Started with PromptShip: From Zero to Your First Prompt in 5 Minutes

A quick-start guide to PromptShip. Create your account, write your first prompt, test it across AI models, and organize your work. All in under 5 minutes.

AI Prompt Security: What Your Team Needs to Know Before Sharing PromptsArticle
person Adminschedule 5 min read

AI Prompt Security: What Your Team Needs to Know Before Sharing Prompts

Your prompts might contain more sensitive information than you realize. Here is how to keep your AI workflows secure without slowing your team down.

Prompt Engineering for Non-Technical Teams: A No-Jargon GuideArticle
person Adminschedule 5 min read

Prompt Engineering for Non-Technical Teams: A No-Jargon Guide

You do not need to know how to code to write great AI prompts. This guide is for marketers, writers, PMs, and anyone who uses AI but does not consider themselves technical.

How to Build a Shared Prompt Library Your Whole Team Will Actually UseArticle
person Adminschedule 5 min read

How to Build a Shared Prompt Library Your Whole Team Will Actually Use

Most team prompt libraries fail within a month. Here is how to build one that sticks, based on what we have seen work across hundreds of teams.

GPT vs Claude vs Gemini: Which AI Model Is Best for Your Prompts?Article
person Adminschedule 5 min read

GPT vs Claude vs Gemini: Which AI Model Is Best for Your Prompts?

We tested the same prompts across GPT-4o, Claude 4, and Gemini 2.5 Pro. The results surprised us. Here is what we found.

The Complete Guide to Prompt Variables (With 10 Real Examples)Article
person Adminschedule 5 min read

The Complete Guide to Prompt Variables (With 10 Real Examples)

Stop rewriting the same prompt over and over. Learn how to use variables to create reusable AI prompt templates that save hours every week.

pin_invoke

Token Counter

Real-time tokenizer for GPT & Claude.

monitoring

Cost Tracking

Analytics for model expenditure.

api

API Endpoints

Deploy prompts as managed endpoints.

rule

Auto-Eval

Quality scoring using similarity benchmarks.