Skip to main content

Idempotency-Key

You can make requests idempotent by sending an Idempotency-Key header.

Behavior (defaults)

  • The server stores the response for 24 hours
  • Repeating the same request with the same key returns the cached response
  • Reusing a key with a different payload returns 409 INVALID_ARGUMENT

Example

curl -sS 'https://api.langbly.com/language/translate/v2' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Idempotency-Key: 4f96c8b5-0b2e-4ff7-9e20-3f8a2b3ac2f4' \
-d '{"q":"Hello world","target":"nl"}'