Create intermediate Works with: Any AI

REST API Design From Requirements

Table output

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.

Rate this prompt

Loading ratings…

Design the resources, endpoints, and error conventions for an API. Product and consumers: [PRODUCT_AND_CONSUMERS]. Requirements and use cases: [REQUIREMENTS]. Data entities and relationships: [ENTITIES]. Authentication approach: [AUTHENTICATION]. Constraints (existing systems, scale, compliance): [CONSTRAINTS].

Return tables:
1. Resources: Resource | Description | Identifier | Relationships | Owner of data.
2. Endpoints: Method | Path | Purpose | Auth and permissions | Request body or parameters | Success response | Errors. Use nouns for resources, plural names, consistent nesting no deeper than two levels, and idempotent PUT and DELETE.
3. Conventions: naming (snake or camel case), date and time format (ISO 8601 in UTC), money representation, pagination, filtering, sorting, partial updates, bulk operations, and idempotency keys for creates.
4. Error model: a single JSON error shape with a machine-readable code, message, details, and request ID; a table of status codes and when to use them.
5. Versioning and deprecation approach.
6. Security: scopes, rate limits, input validation, and what must never be returned.

Provide two example request and response pairs, an OpenAPI outline for one resource, and a list of design decisions with the alternatives I could consider. Ask for missing requirements instead of guessing.

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