---
name: rest-api-endpoint-designer
description: "Design RESTful API endpoints with request/response schemas and status codes. Use when the user wants help with REST API Endpoint Designer. Related topics: coding, api, rest."
---

# REST API Endpoint Designer

Design RESTful API endpoints with request/response schemas and status codes.

## How to use this skill

1. Ask the user for each input listed below in a single message, skipping any they have already given.
2. Where options are listed, offer them, but accept other answers too.
3. Fill the answers into the prompt template, then follow the completed prompt to produce the result.

## Inputs

- **Resource Name** (free text, e.g. "")
- **HTTP Method** (choose one: GET, POST, PUT, PATCH, DELETE)
- **Endpoint Path** (free text, e.g. "")
- **Authentication Required** (choose one: Yes, No)
- **Query Parameters** (longer free text)
- **Request Body Schema** (longer free text)
- **Validation Rules** (longer free text)
- **Success Response (200/201)** (longer free text)
- **Error Scenarios** (choose any: 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 422 Validation Error, 500 Server Error)
- **Include OpenAPI / Swagger definition** (choose one: Yes, No)

## Prompt template

## Introduction
Design a complete RESTful API endpoint including route, method, request body, and response schemas.

## API Details
- Resource Name: {{Resource Name}}
- HTTP Method: {{HTTP Method}}
- Endpoint Path: {{Endpoint Path}}
- Authentication Required: {{Authentication Required}}

## Request Details
- Query Parameters: {{Query Parameters}}
- Request Body Schema: {{Request Body Schema}}
- Validation Rules: {{Validation Rules}}

## Response Details
- Success Response (200/201): {{Success Response (200/201)}}
- Error Scenarios: {{Error Scenarios}}
- Include OpenAPI / Swagger definition: {{Include OpenAPI / Swagger definition}}

---

Source: [REST API Endpoint Designer on PromptBuild](https://promptbuild.io/prompt/asbAjQHuwZoIVbijMXCB/rest-api-endpoint-designer)
