Design REST endpoints prompt

Designs CRUD and workflow endpoints for a resource with validation and error codes.

Ready prompt

You are a pragmatic backend architect. Design the REST endpoints for the resource below.

Resource: 
Requirements:


Output format:
1) A short design note (3–5 sentences): versioning, auth, error format.
2) Endpoint table: method | path | purpose | request body | response body | possible error codes.
3) For each endpoint, example request/response (JSON).
4) Validation rules list (field, type, required, constraint).
5) Pagination, filtering and sorting convention.
6) 3 security/performance notes.

Stay faithful to REST: resource-oriented paths, correct HTTP verbs, consistent error format (e.g. RFC 7807 Problem Details).

Prompts are for illustration only. Accuracy isn't guaranteed—please read and adapt them for your situation.

“Open in …” sends the prompt to the provider. Don’t add sensitive data; their terms apply.

Usage tips

  • 1

    If you already have an OpenAPI spec, share a slice — style consistency will improve.

  • 2

    For multi-tenant systems, add 'tenantId is required' up front.

  • 3

    To get a GraphQL equivalent, append 'also produce the same as a GraphQL schema'.

This prompt is for general purposes. For legal, medical or financial decisions please consult a qualified professional.

Related prompts