Design a full set of REST API endpoints for a given resource, with resource-based URLs, correct HTTP methods, and example JSON request and response bodies.
You are an API design instructor who has reviewed enough beginner-designed endpoints to know the most common mistake by far is naming a URL after an action instead of a resource, `/getUser` or `/createOrder` instead of a noun the API's actions revolve around, and you correct that specific habit directly rather than only showing the fixed version without naming what was wrong with the instinct behind it. My resource is [RESOURCE], described in plain English, such as a blog post, an item in a shopping cart, or a comment on a photo. If I left that blank, ask me to describe one instead of inventing a resource to design endpoints for in its place. Name the resource as a plural noun first, the actual word the URL path should be built around, and state briefly why a noun rather than a verb, because the HTTP method already carries the verb, so putting an action word in the path duplicates that information and usually signals the design is thinking in function calls instead of resources. Then design the full set of endpoints for basic operations on [RESOURCE], listing each one as its HTTP method and path together, creating a new one, reading the full list, reading one specific item by its identifier, updating one specific item, and deleting one specific item, and for each endpoint, state in one sentence why that specific method fits that specific action by convention. For the create and update endpoints, write an example JSON request body showing the fields [RESOURCE] would realistically need, and for the read endpoints, write an example JSON response body, with a brief note on why the list response typically wraps its items in a container object rather than returning a bare array, since that leaves room to add pagination or metadata later without breaking every client that already parses the response. My depth is [DEPTH:select:just the endpoint design,also explain which of these are safe to retry automatically]. If I chose the second option, name which of the endpoints just designed are idempotent, meaning calling them more than once with identical input produces the same result as calling them once, reading, updating, and deleting typically qualify, while creating typically does not, since calling create twice usually creates two separate items, and explain briefly why that distinction matters specifically for a client retrying a request after a dropped connection. If [RESOURCE] naturally nests under a parent, such as a comment belonging to a specific photo, ask whether I want the nested version of these endpoints designed instead, with the parent's identifier appearing in the path before the resource itself.
Use this prompt anywhere
10,000+ expert prompts for ChatGPT, Claude, Gemini, and wherever you use AI.
Get Early AccessThe single most common beginner API design mistake is naming a URL after an action, a path like getUser or createOrder, instead of after the resource that action operates on. The instinct makes sense, actions are what code actually does, but it duplicates information the HTTP method already carries and usually signals the design is thinking in function calls instead of resources.
This tool takes your described [RESOURCE] and names it as a plural noun first, stating why a noun beats a verb here, then designs the full endpoint set around it, create, read the list, read one item, update, delete, each listed as its HTTP method and path with a one-sentence reason that method fits that action. Create and update get an example JSON request body with realistic fields, and read endpoints get an example response, including why a list response usually wraps its items in a container instead of a bare array.
Set [DEPTH] to also learn which of these endpoints are safe to retry automatically without side effects, and which one, create, is not. Run it in the Dock Editor to build a set of designed resources, pair with the crud operations explainer for the operation-to-code mapping, or the api request explainer once you have a real request to parse instead of design.
Open a new chat in ChatGPT, Claude, or Gemini, or work directly in the Dock Editor. Set [RESOURCE] to the thing your API manages, such as a blog post, a shopping cart item, or a comment on a photo.
See your resource named as a plural noun for the URL path, with the reason a noun beats a verb in the path stated directly.
See create, read all, read one, update, and delete each listed as an HTTP method and path together, with the reasoning for that method named.
Get an example request body for create and update, and an example response body for the read endpoints, matching your actual resource's realistic fields.
Set [DEPTH] to also cover idempotency, learning which endpoints produce the same result no matter how many times they're called and which one does not.
Get resource-based endpoint naming and JSON body design for an actual app idea instead of copying convention from a tutorial without understanding the reasoning.
You know create, read, update, and delete map to HTTP methods, but not how to structure the URL path itself. Get that specific piece filled in for your resource.
Design the endpoint set for a project's core resource before writing any route handler code, catching naming mistakes before they get built into the codebase.
Learn which of your designed endpoints are idempotent and safe for a client to retry automatically after a dropped connection, and which one is not.
Discover more prompts that could help with your workflow.
Build a small working program that calls a real public API, with the request, response, and API key setup explained step by step.
Explain a core functional programming idea, such as pure functions or immutability, with a broken code example and its fixed version shown side by side.
Explain a built-in math function, square root, power, absolute value, or rounding, covering math and syntax, then generate practice calls to predict before revealing results.
10,000+ expert-curated prompts for ChatGPT, Claude, Gemini, and wherever you use AI. Our extension helps any prompt deliver better results.