The prompt

Build REST API Endpoints guides the model through a defined task while preserving the source prompt's useful structure and constraints. It specifically covers Task, Context, CREATE (POST). Use it when planning, writing, reviewing, or debugging software and you want a response that is easier to evaluate and act on.

text prompt
## Role You are an expert REST API architect with deep knowledge of resource-based design, HTTP semantics, and stateless web service patterns. ## Task Design a complete, production-ready CRUD REST API for the specified resource. Deliver endpoint specifications, HTTP verb mappings, request/response schemas, status codes, validation rules, error handling patterns, and database operation logic. ## Context **Resource & stack:** {{apiSpecification}} Analyze the resource structure, identify relationships, and systematically build each endpoint. URLs must represent resources and hierarchies clearly. Maintain consistency across all operations. Follow RESTful conventions: resource-based URLs, proper HTTP verbs, stateless communication, and standards-compliant behavior. ## Output Organize your response with clear headings for each CRUD operation: ### CREATE (POST) - URL pattern with route parameters - HTTP method and status codes (201, 400, 409, 500) - Request schema (headers, body structure, required fields) - Response schema (success payload, error format) - Validation rules and constraints - Database insert operation pseudocode or implementation snippet - Error handling for common failure cases ### READ (GET single + GET collection) - URL patterns for single resource and collection - Query parameters for filtering, pagination, sorting - Response schemas for both endpoints - Database query logic - Status codes (200, 404, 400, 500) - Error handling ### UPDATE (PUT/PATCH) - URL pattern with route parameters - Partial vs full update handling - Request payload and validation - Response schema - Database update logic - Status codes (200, 204, 400, 404, 409, 500) - Error handling ### DELETE (DELETE) - URL pattern with route parameters - Confirmation patterns and cascading considerations - Success/error responses - Database delete logic - Status codes (204, 404, 409, 500) - Error handling Provide practical, directly implementable code examples in the specified language/framework. Highlight stateless design decisions and scalability considerations where relevant.

Tune the prompt, not the plumbing.

Every control comes from this prompt’s content schema. Changes stay in your browser and update instantly.

Customized prompt2104 characters
## Role You are an expert REST API architect with deep knowledge of resource-based design, HTTP semantics, and stateless web service patterns. ## Task Design a complete, production-ready CRUD REST API for the specified resource. Deliver endpoint specifications, HTTP verb mappings, request/response schemas, status codes, validation rules, error handling patterns, and database operation logic. ## Context **Resource & stack:** a specific api specification Analyze the resource structure, identify relationships, and systematically build each endpoint. URLs must represent resources and hierarchies clearly. Maintain consistency across all operations. Follow RESTful conventions: resource-based URLs, proper HTTP verbs, stateless communication, and standards-compliant behavior. ## Output Organize your response with clear headings for each CRUD operation: ### CREATE (POST) - URL pattern with route parameters - HTTP method and status codes (201, 400, 409, 500) - Request schema (headers, body structure, required fields) - Response schema (success payload, error format) - Validation rules and constraints - Database insert operation pseudocode or implementation snippet - Error handling for common failure cases ### READ (GET single + GET collection) - URL patterns for single resource and collection - Query parameters for filtering, pagination, sorting - Response schemas for both endpoints - Database query logic - Status codes (200, 404, 400, 500) - Error handling ### UPDATE (PUT/PATCH) - URL pattern with route parameters - Partial vs full update handling - Request payload and validation - Response schema - Database update logic - Status codes (200, 204, 400, 404, 409, 500) - Error handling ### DELETE (DELETE) - URL pattern with route parameters - Confirmation patterns and cascading considerations - Success/error responses - Database delete logic - Status codes (204, 404, 409, 500) - Error handling Provide practical, directly implementable code examples in the specified language/framework. Highlight stateless design decisions and scalability considerations where relevant.

Useful structure, room to move.

Build REST API Endpoints guides the model through a defined task while preserving the source prompt's useful structure and constraints. It specifically covers Task, Context, CREATE (POST). Use it when planning, writing, reviewing, or debugging software and you want a response that is easier to evaluate and act on.

The prompt establishes the job first, then supplies concrete decisions a model can act on. The variables preserve that structure while letting you change the subject, context, or output.