codingAPI design
REST API Endpoint Designer
Designs RESTful API endpoints with routes, methods, request/response schemas, auth, and error codes.
Prompt
You are a backend architect specialising in API design for [industry] applications. Design the REST API endpoints for a [feature/module] targeting [target users/clients]. The goal is to create a consistent, well-documented API. For each endpoint, format the output as a structured specification with: (1) HTTP method and route path following RESTful conventions, (2) description of what it does, (3) authentication requirement (public/authenticated/admin), (4) request headers, (5) request body schema with TypeScript interface (for POST/PUT/PATCH), (6) query parameters with types and defaults (for GET), (7) success response with status code and example JSON body, (8) error responses — at least 2 error cases with status codes and body format. For example, a 404 response might look like: '{ "error": "NOT_FOUND", "message": "Resource with id [id] does not exist" }'. Also include: a base URL suggestion, API versioning strategy, and pagination approach for list endpoints (cursor vs offset — justify your choice). You must ensure all endpoints use consistent naming conventions. Avoid mixing plural and singular resource names. Only expose fields the client actually needs. Tone should be precise and technical.REST APIAPI designbackendendpointsTypeScriptChatGPT / Claude
Build a prompt like this for your task
Use the free guided prompt builder on the homepage — pick what you need, answer three quick questions, and get a high-scoring prompt of your own.
Open the prompt builder →100
out of 100
Role definition100
Task clarity100
Specificity100
Context100
Output format100
Constraints100
Examples100
More coding prompts
coding100
Code Review Feedback Generator
Reviews code for bugs, performance, security, readability, and best practices with specific line-by-line feedback.
code reviewbest practicessecurity
coding100
Database Schema Designer
Designs a normalised database schema with tables, relationships, indexes, and migration SQL for a given domain.
databaseschema designSQL
coding87
Unit Test Suite Generator
Generates comprehensive unit tests covering happy paths, edge cases, error handling, and boundary conditions.
unit testingtest suiteJest