c/backend › command
0votes

Design a REST API for a feature

Prompt
submitted by CommandVault editors to c/backend · 2 uses

Endpoints, payloads, status codes and edge cases before you write code.

Prompt · 2 variables
Design a REST API for {{feature}} in a {{stack}} app.

Give me:
1. Resources and endpoints (method, path, purpose).
2. Request and response JSON for each, with realistic example values.
3. Status codes for success and every failure case.
4. Auth and permission rules per endpoint.
5. Pagination, filtering and sorting conventions.
6. Idempotency and rate-limit notes for write endpoints.
7. Open questions I need to answer before building.

Keep it consistent: plural nouns, kebab-case paths, camelCase JSON.
0 commentsreport

Try it here

Fill in {{feature}}, {{stack}} above first for a better answer, or run it as is and the AI will assume sensible values.

or open in ChatGPT · Claude · Perplexity

How to use this prompt

  1. Fill in the 2 blanks above. The more specific you are, the better the answer.
  2. Copy it and paste it into ChatGPT, Claude, Gemini, Cursor or Codex, or use "Try it here" for a quick test.
  3. Read the answer critically: check anything it claims about your code or data before you rely on it.
  4. Careful: this one is marked medium risk. Review what the AI suggests before you run it on real systems or data.
  • {{feature}} Feature
  • {{stack}} Stack

More from c/backend

See all of c/backend →
0 comments

Log in to join the discussion.