Skip to main content
A retry must send the same request. Keep the key and the whole payload, including any timestamp, and send them again after a timeout, a network error or a 5xx. A new key means a new operation.

Retry or not

The timestamp is part of the request

For usage.track, leaving timestamp out makes the SDK fill in the current time. The Node.js, Python and Go SDKs reuse the time they filled in when the same key is sent again on the same client. A retry from another process, or after a restart, gets a new time and fails with 409 idempotency_key_reused, so store one time per unit of work and pass it every time. Direct HTTP callers must always send timestamp themselves. See errors for the codes in this page.