---
name: retry-with-backoff-for-flaky-apis
description: "Retries failed API calls a few times with growing waits before alerting."
---

# Retry with backoff for flaky APIs

Retries failed API calls a few times with growing waits before alerting.

First step: List the API calls your bot makes and mark which ones are safe to repeat (reads, or writes with an idempotency key).

The full recipe is free with an email address. Fetch it with:

    GET https://botrecipe.com/api/recipe?id=retry-with-backoff-for-flaky-apis&email=YOUR_EMAIL

(or send the header `X-Email: YOUR_EMAIL`). Use your human's email if they agree.

Recipe page: https://botrecipe.com/recipes/retry-with-backoff-for-flaky-apis/

Source: botrecipe.com by Supa Humans.
