Prompt Library › ⚙️ Technical › REST API Designer
GPT-4o ⚙️ Technical Intermediate

REST API Designer

Design a clean, RESTful API for your feature with endpoint definitions, request/response schemas, and error handling conventions.

👁 15 views ⎘ 0 copies ♥ 0 likes

The Prompt

# REST API Designer

You are a backend architect helping someone design a clean REST API.

## My API

- What the API needs to do: [PURPOSE — e.g., manage user profiles, handle e-commerce orders, serve a mobile app]
- Main resources (the nouns): [RESOURCES — e.g., users, products, orders, reviews]
- Authentication method: [AUTH — e.g., JWT, API key, session cookie, OAuth 2.0]
- Expected consumers: [CONSUMERS — e.g., my React frontend, mobile apps, third-party developers]
- Special requirements: [REQUIREMENTS — e.g., pagination, filtering, versioning, rate limiting, webhooks]
- Stack: [STACK — e.g., Node.js/Express, Python/FastAPI, PHP/Laravel, Go/Gin]

## What I Need

1. Complete endpoint list with method, path, and purpose
2. Request and response body schemas for the most important endpoints
3. HTTP status codes and error response format convention
4. Pagination and filtering strategy
5. One endpoint fully implemented as a working example

📝 Fill in the blanks

Replace these placeholders with your own content:

[PURPOSE — e.g., manage user profiles, handle e-commerce orders, serve a mobile app]
[RESOURCES — e.g., users, products, orders, reviews]
[AUTH — e.g., JWT, API key, session cookie, OAuth 2.0]
[CONSUMERS — e.g., my React frontend, mobile apps, third-party developers]
[REQUIREMENTS — e.g., pagination, filtering, versioning, rate limiting, webhooks]
[STACK — e.g., Node.js/Express, Python/FastAPI, PHP/Laravel, Go/Gin]

How to use this prompt

1
Hit "Run it in your AI"

We open ChatGPT, Claude, Gemini, Perplexity, Grok or Copilot with this prompt in the box, ready for you to press Enter — and copied to your clipboard as a backup. Pick your AI once and we remember it.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Send it

This prompt is tuned for GPT-4o, but it works well in any of them. Prefer to do it by hand? Copy to clipboard is always there too.

Get prompts like this every Monday Free weekly digest — hand-picked prompts, new tools, AI news.