> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guppyapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Idempotency

> Safe retries with idempotency keys

All write operations in the Guppy API support idempotency keys. This allows you to safely retry requests without accidentally creating duplicate intents or payments.

### Using Idempotency Keys

Include an `Idempotency-Key` header with a unique string for each request.

```bash theme={null}
Idempotency-Key: <unique_string>
```

If a request with the same key is received, Guppy will return the same response as the first successful request.

### Best Practices

* Generate a new idempotency key per *logical* operation (e.g., "create intent").
* Reuse the same key when retrying the same operation due to timeouts or transient errors.
* Store the key server-side for at least 24 hours so your own retries remain consistent.
* If you accidentally reuse a key for a *different* operation, Guppy may return `409 Conflict`.
