Skip to main content

Overview

Network issues can cause requests to fail ambiguously — you don’t know if the server processed it or not. Idempotency keys let you safely retry requests without creating duplicate messages.

How It Works

Include an Idempotency-Key header with a unique value (we recommend a UUID v4) on any POST request. If we receive a duplicate request with the same key, we return the original response instead of processing it again.

Behavior

Best Practices

Use UUID v4

Generate a unique UUID for each logical operation. Don’t reuse keys across different operations.

Retry safely

On network timeouts, retry with the same idempotency key. You’ll get the original response back.
Idempotency keys are scoped per API key. The same key used by different API keys are treated as separate requests.

Replayed Responses

When a response is replayed from cache, the response includes the header:
Your application can check this header to know if the response was a cached replay.