#37coding

Design a Secure API Endpoint

Turns a feature request into a documented, testable endpoint contract.

0 views 0by @yazeed
Base prompt
Design an API endpoint for [feature] in [stack]. Define the request and response schemas, validation, authentication and authorization, error codes, idempotency, pagination if relevant, and example calls. Identify sensitive fields and keep them server-side. Explain edge cases and backward compatibility. Provide implementation steps and meaningful tests. State assumptions instead of inventing existing system behavior.

Follow-up steps

  1. 1

    Refine and verify

    Tests the output against the original goal and improves its practical usefulness.

    step 1
    Review the proposed endpoint against abuse cases, permission bypasses, duplicate requests, and breaking changes. Revise the contract where needed.

Comments0

Sign in

No comments yet.