API setup
Safe retries
Retry any call that times out or answers 429, 500 or 503. Calls that spend take an Idempotency-Key, so the retry never charges twice.
Idempotency-Key
Match people, Find an email, Find emails in bulk and Verify emails take an Idempotency-Key header: any unique string up to 200 characters, such as a UUID. Make one per request and send it again on every retry.
- Same key, same body
- Within 24 hours: the first successful answer again, with
Idempotent-Replayed: trueand no charge. Bodies are compared as JSON, so spacing and key order do not matter - After an error
- An error frees the key: once you fix the cause (top up after a 402, wait out a 503), the same request with the same key runs again
- Same key, new body
- 422
request.idempotency_mismatch. Use a new key for a new request. The first request's answer stays under the key - Still running
- 409
request.in_progress. Wait a few seconds and retry with the same key: the first call keeps running and its answer is replayed once it ends. A call that never finished frees its key after 5 minutes
When to retry
- 429
- After
Retry-Afterseconds. Forusage.daily_limitthat is midnight UTC - 500, 503 and timeouts
- With backoff: 2, 4, 8 seconds and so on. A 503 carries
Retry-After. Nothing was charged - 400, 401, 403, 404
- Fix the request first. The message says what to fix
Every answer has an X-Request-Id header, the same as request_id in an error. Quote it if you write to us.