Establish idempotency and retry logic for flaky APIs
Provides technical rules, backoff schedules, and idempotency key designs to safely retry failed API requests without duplicate records.
You getStatus Code Strategy, backoff Schedule & Jitter Formula and idempotency Key Specification
Prompt
Act as a backend automation architect. Define a production-grade retry and idempotency policy for external HTTP API requests that experience transient rate limits and network drops.
Rules:
- Provide a clear exponential backoff schedule with jitter to avoid thundering herd issues.
- Specify exact HTTP status codes that must be retried versus codes that must fail immediately.
- Define how to construct and send an idempotency key to prevent duplicate creation on mutations.
- Detail an automated dead-letter queue (DLQ) procedure for persistent failures.
Output format:
1. Status Code Strategy (table: HTTP Code, Retry Action, Reason)
2. Backoff Schedule & Jitter Formula
3. Idempotency Key Specification (generation method, header naming, expiration window)
4. Dead-Letter Queue Policy
5. Pre-deployment Verification ChecklistExample output
Use this prompt directly in ChatGPT, Claude, or Gemini when planning backend integrations. As a next step, ask the model to generate the exact retry wrapper logic in Node.js, Python, or your platform of choice.
Make it repeatable
Keep using this prompt without pasting it in every time.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
Uncover hidden edge cases before building your automation
Identify missing fields, API timeouts, duplicate triggers, and data format traps before publishing a workflow to production.
Build a resilient dead-letter queue for webhooks
Architect a retry and dead-letter queue blueprint to capture, store, and replay webhook payloads when downstream systems fail.
Build a tiered error handling plan for workflows
Create fallback logic, alerting tiers, and replay queues to protect mission-critical business automations.
Decompose monolithic automation into modular subflows
Restructure overly complex, branched automations into clean parent-child workflows. Use this when your workflow breaks frequently, times out, or has become impossible to maintain.
Build automated stale deal cleanup and archive rules
Establish clear pipeline stages, inactivity triggers, automated warning alerts, and archiving criteria to keep sales forecasts accurate.
Build dynamic intake routing rules by urgency and capacity
Design weighted logic to automatically assign incoming requests based on submission urgency, agent workloads, and business hours.
- Design a round-robin assignment workflow with fallbacks
- Establish automated calendar buffer and focus block rules
- Clean and format raw form data for database syncs
- Design a client onboarding automation for signed contracts
- Design a manual review queue for sync failures
- Draft approval gate rules for automated customer messages