#37coding
Design a Secure API Endpoint
Turns a feature request into a documented, testable endpoint contract.
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
Refine and verify
Tests the output against the original goal and improves its practical usefulness.
step 1Review the proposed endpoint against abuse cases, permission bypasses, duplicate requests, and breaking changes. Revise the contract where needed.
Comments0
No comments yet.
