Documentation Index
Fetch the complete documentation index at: https://docs.fluveo.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Network errors, timeouts, and client crashes can leave you unsure whether a request succeeded. Idempotency keys let you safely retry anyPOST request. If the API has already processed a request with the same key, it returns the cached response instead of executing the operation again.
The Idempotency-Key header
Include anIdempotency-Key header on every POST request. The key is a string of up to 255 characters. UUIDs are recommended.
GET and DELETE requests are inherently idempotent and do not require the header.How caching works
When the API receives a POST request with anIdempotency-Key:
- It checks whether a response for that key already exists in the cache.
- If yes, it returns the cached response with a
200status (or the original error status) without re-executing the operation. - If no, it processes the request normally and caches the response.
Same key, different parameters
If you send a request with the same idempotency key but different request body parameters, the API rejects it with a422 status:
Best practices for generating keys
Use UUIDs (v4 or v7)
Use UUIDs (v4 or v7)
UUIDs provide sufficient entropy to avoid collisions and are supported natively in most languages.
Tie keys to business operations
Tie keys to business operations
For some operations, it makes sense to derive the key from a business identifier to ensure a specific operation only happens once.
Store the key before sending
Store the key before sending
Persist the idempotency key alongside the operation in your database before making the API call. If your process crashes, you can retry with the same key.
Retry strategy with idempotency
A safe retry approach using idempotency keys:Key constraints
| Property | Value |
|---|---|
| Maximum length | 255 characters |
| Cache duration | 24 hours |
| Required on | All POST requests |
| Reuse with different params | Rejected with 422 |