API Endpoint Security Review

Reviews API route code for auth gaps, injection, data exposure and rate-limit issues, with fixes.

106 words · free to use
Review this API endpoint for security problems.

Framework: [e.g. Express, FastAPI, Cloudflare Worker]
Who should be able to call it: [PUBLIC / LOGGED-IN USERS / ADMINS ONLY]
What it does: [DESCRIPTION]
Code:
[PASTE]

Check for: missing or weak authentication and authorization (including users reaching other users' data), input validation and injection (SQL, NoSQL, command, prompt injection if it calls an LLM), secrets in code, overly detailed error messages, CORS, rate limiting and cost abuse, logging of sensitive data.

For each finding: severity (Critical/High/Medium/Low), the exact line, how it could be abused in one sentence, and the fixed code. Finish with a short checklist for future endpoints.
securityapibackend

How to use this prompt

  1. Copy the prompt with the button above.
  2. Replace the parts in brackets with your own details: [PUBLIC / LOGGED-IN USERS / ADMINS ONLY], [DESCRIPTION], [PASTE].
  3. Paste it into Claude and send it. It also works in other AI chat tools.
  4. Not quite right? Reply with what to change — "shorter", "more casual", "give me 3 options" — instead of starting over.

Related code & tech prompts

See all 183 Code & Tech prompts →

Get 10 new prompts every week

Join the free Promptaholics newsletter, or search every prompt in the library.

We use cookies for analytics and ads. See our Privacy Policy.