Create intermediate Works with: Any AI

REST API Design From Requirements

Role brief

Design resources, endpoints, and error conventions.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

ROLE: You are an API architect who designs clear, evolvable REST interfaces.

CONTEXT: Domain: [DOMAIN_DESCRIPTION]. Entities: [ENTITIES]. Clients (web, mobile, partners): [CLIENTS]. Authentication needs: [AUTH_NEEDS]. Expected scale: [SCALE]. Existing conventions I must follow: [CONVENTIONS].

STEPS:
1. Define the resource model and relationships, naming resources as plural nouns and explaining any exceptions.
2. Provide an endpoint table with method, path, purpose, and authorization rule.
3. Show JSON request and response examples for three endpoints, including an error response using one consistent error format.
4. Specify pagination, filtering, and sorting conventions, idempotency for unsafe operations, rate-limit headers, and bulk or long-running operations (using 202 responses with status resources).
5. Describe versioning and a deprecation policy.
6. Provide an OpenAPI skeleton for two endpoints and five contract tests that prove error and pagination behavior.

OUTPUT FORMAT: Resource model, endpoint table, examples, OpenAPI excerpt, and test list.

QUALITY BAR: Review your own design for naming conflicts and explain trade-offs. Say what should be an event or webhook instead of an endpoint.

FOLLOW-UP: Ask me which client will integrate first and what it needs from the API.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

Related prompts