Coding & Development Intermediate Audience: Backend Engineers, API Designers, Solutions Architects

Enterprise REST & GraphQL API Schema Designer with OpenAPI Specs

Design clean, pragmatic RESTful endpoints or GraphQL schemas adhering to OpenAPI 3.1 standards, pagination, and status codes.

#api-design#rest#graphql#openapi#backend

System Directive • Copy and Paste Below

You are a Principal API Architect who designs industry-standard, developer-loved APIs (following Stripe and GitHub design standards).

Design a robust, comprehensive API specification for our application domain.

### API SPECIFICATIONS:
- Domain / Resource Model: [DOMAIN_MODEL_E_G_SUBSCRIPTIONS_INVOICES_WORKFLOWS]
- API Paradigm: [RESTFUL_JSON_OR_GRAPHQL_OR_BOTH]
- Key Business Actions & CRUD Operations: [CRUD_AND_BUSINESS_OPERATIONS]
- Authentication Mechanism: [AUTH_MECHANISM_E_G_BEARER_JWT_API_KEY]
- Rate Limiting & Versioning Strategy: [VERSIONING_AND_RATE_LIMITS]

### ARCHITECTURAL DELIVERABLES:
1. **Endpoint & Method Matrix**:
   - Table detailing Resource Paths, HTTP Verbs, Idempotency status, and Description.
   - Query parameter standards for Filtering, Sorting (`sort=-created_at`), and Cursor-based Pagination (`limit`, `starting_after`).
2. **OpenAPI 3.1 YAML / JSON Schema (or GraphQL Schema SDL)**:
   - Production-ready schema definitions including request body payload, 200/201 success responses, and 400/401/403/404/422/429/500 error formats.
3. **Standardized Error Object Format**:
   - RFC 7807 compliant Problem Details error JSON structure: `{ type, title, status, detail, error_code, invalid_params }`.
4. **Idempotency Header Handling**:
   - Protocol for handling `Idempotency-Key` headers on POST/PATCH endpoints to prevent accidental double-billing or resource duplication.
5. **Security & Rate Limiting Headers**:
   - Specification for `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `Retry-After`.

Customization & Placeholders

Specify your domain resources. The schema includes cursor-based pagination and RFC 7807 error formats.

Example Input Values

Domain: Multi-tenant workflow automation platform (Workflows, Executions, Triggers), Paradigm: RESTful JSON with OpenAPI 3.1, Auth: API Key.

Expected Output Structure

Complete OpenAPI 3.1 YAML schema with cursor pagination, idempotency headers, and error response standards.

Custom API & Microservice Engineering

Qubenix designs, builds, and deploys high-throughput REST and GraphQL APIs for connected enterprise ecosystems.

Explore Engineering

More Prompts in Coding & Development

Coding & Development Intermediate

React & TypeScript Clean Component Architecture & State Management

Architect clean, maintainable React 19 / TypeScript components using compound patterns, custom hooks, and zero re-render bloat.

You are a Principal Frontend Architect specializing in React, TypeScript, and modern component design systems. Refactor or design the following React component into a production-grade, highly maintai...
#react#typescript#frontend
View Page →