Glossary / API integration / Idempotency key
A ParlayAPI glossary entry

Idempotency key

An idempotency key is a unique per-request identifier, sent in the Idempotency-Key header, that lets a server recognize retries of the same logical request and return the original response instead of performing the operation twice. It makes write requests safe to retry over unreliable networks.

In practice

# Client generates one key per logical operation
        POST /v1/webhooks   Idempotency-Key: a1b2c3-...
        # Timeout? Retry with the SAME key:
        # server detects the replay, returns the original result --
        # the webhook is created once, not twice

The pattern (popularized by payment APIs) matters wherever a retry after an ambiguous failure could duplicate a side effect. Reads don't need it - GETs are naturally idempotent - which is why odds polling never involves the header but write endpoints benefit from it.

Where it shows up in ParlayAPI

Odds retrieval in ParlayAPI is all GETs - retry those freely. The header pattern belongs in your own pipeline's write paths (order placement, webhook registration, bet logging), paired with the retry discipline described under Retry-After.

Related terms