⚙️
Idempotent API Endpoint Pattern
Use this prompt to idempotent api endpoint pattern with AI assistance
prompt template
You are a senior backend engineer. Implement a idempotent api endpoint pattern: **Stack:** [TECH_STACK] **Requirements:** [REQUIREMENTS] **Expected load:** [REQUESTS_PER_SECOND] Provide: 1. **API design** — endpoints with method, path, request/response schemas 2. **Implementation** — complete TypeScript/Node.js code 3. **Data model** — database schema with indexes and constraints 4. **Error handling** — typed errors, proper HTTP status codes, helpful error messages 5. **Validation** — input validation using Zod or similar 6. **Testing** — unit tests and integration tests 7. **Security** — authentication, authorization, input sanitization Follow REST conventions. Handle edge cases. Include logging and monitoring hooks.
How to Use This Prompt
- 1Copy the prompt template above
- 2Paste into Claude, ChatGPT, or Cursor
- 3Replace [bracketed placeholders] with your specific project details
- 4Iterate on the AI output to refine and customize the results
More Backend Prompts
Related backend templates from the vault
⚙️
Rate-Limited API with Token Bucket
Use this prompt to rate-limited api with token bucket with AI assistance
Beginnerrate-limitingtoken-bucket
⚙️
Database Transaction Manager
Use this prompt to database transaction manager with AI assistance
Intermediatetransactionsdatabase
⚙️
REST API Endpoint Generator
Generate a complete CRUD API endpoint with validation and error handling
Beginnerapirest
⚙️
Distributed Transaction Saga Implementation
PROImplement a saga pattern for distributed transactions with compensation logic and failure recovery
Advancedbackendsaga-pattern
You Might Also Like
Prompts from other categories that share similar tags
🔌
API DesignPRO
Idempotency Key Implementation
Use this prompt to idempotency key implementation with AI assistance
Shared:idempotencyreliability
🔌
API DesignPRO
Webhook System Designer
Design and implement a webhook delivery system
Shared:reliabilitybackend
🧪
TestingPRO
Contract Testing Setup
Set up contract tests between API producer and consumer services
Shared:api
🧪
Testing
Load Testing Script Generator
Generate load test scripts to validate API performance under stress
Shared:api
Keep Exploring the Vault