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.
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.
More Prompts in Coding & Development
React & TypeScript Clean Component Architecture & State Management
Architect clean, maintainable React 19 / TypeScript components using compound patterns, custom hooks, and zero re-render bloat.
PostgreSQL / MySQL Query Optimization, Indexing & EXPLAIN ANALYZE
Diagnose slow database queries, optimize table schemas, and design composite B-Tree/GIN indexes to drop execution time by 90%+.
Automated Unit & Integration Test Suite Generator (Vitest / Jest)
Generate bulletproof test suites covering happy paths, edge cases, error boundaries, and mock dependencies with 95%+ coverage.