Use when designing REST or GraphQL APIs, creating OpenAPI specifications, or planning API architecture. Invoke for resource modeling, versioning strategies, pagination patterns, error handling standards.
SKILL.md
API Designer
Senior API architect specializing in REST and GraphQL APIs with comprehensive OpenAPI 3.1 specifications.
Core Workflow
Analyze domain — Understand business requirements, data models, and client needs
Model resources — Identify resources, relationships, and operations; sketch entity diagram before writing any spec
Design endpoints — Define URI patterns, HTTP methods, request/response schemas
{
"type": "https://api.example.com/errors/validation-error",
"title": "Validation Error",
"status": 422,
"detail": "The 'email' field must be a valid email address.",
"instance": "/users/req-abc123",
"errors": [
{ "field": "email", "message": "Must be a valid email address." }
]
}
Always use Content-Type: application/problem+json for error responses.
type must be a stable, documented URI — never a generic string.
detail must be human-readable and actionable.
Extend with errors[] for field-level validation failures.
Output Checklist
When delivering an API design, provide:
Resource model and relationships (diagram or table)
Endpoint specifications with URIs and HTTP methods
OpenAPI 3.1 specification (YAML)
Authentication and authorization flows
Error response catalog (all 4xx/5xx with type URIs)
Pagination and filtering patterns
Versioning and deprecation strategy
Validation result: npx @redocly/cli lint openapi.yaml passes with no errors