Every POST needs an Idempotency-Key header: any unique string up to 255 characters. A UUID is ideal; your own order or job id works too.

How it works

Keys are kept for 24 hours, then the same key can be used again.

When to retry

Retry with the same key after a network error, a timeout, a 429 or any 5xx. If the first attempt went through, you get its response; if it didn’t, it runs now. Either way it happens once. Don’t retry 4xx errors other than 429: fix the request first, and use a new key.

The libraries do it for you

The Node.js, PHP and Laravel libraries add a key to every POST and reuse it on their automatic retries. Pass your own to tie it to your records: