Back to prompts
Design a RESTful API for the following application: Application: [describe what it does] Core resources / entities: [list 3–5 main data objects — e.g. Users, Posts, Comments] Authentication: [e.g. JWT / API key / OAuth / none] Consumer: [mobile app / web frontend / third-party developers / internal only] Provide the full API design: 1. Base URL and versioning strategy 2. Authentication approach with example headers 3. Resource endpoints for each entity: - List all CRUD operations (GET/POST/PUT/PATCH/DELETE) - URL structure and path parameters - Query parameters for filtering, sorting, pagination - Request body schema (with field names, types, required/optional) - Response schema (success and error) - HTTP status codes to use for each case 4. Error response format: consistent structure for all error responses 5. Rate limiting strategy 6. One example request/response pair for the most complex endpoint Follow REST best practices: nouns not verbs, plural resource names, nested resources where logical.
How to use this prompt
- 1Copy the prompt using the button above.
- 2Open your AI tool (ChatGPT, Claude, Midjourney, etc.)
- 3Paste and customize any variables in the prompt.
- 4Generate your result.