Idempotency
Safely retry POST requests without creating duplicate records.
All API POST endpoints support the optional Idempotency-Key header. Use a new, unique value for each logical operation, especially when your client retries after a timeout.
Idempotency-Key: voter-import-2026-001For a given API key, Pepvote stores the first successful 2xx response for 24 hours. A later request with the same key, method, path, and exact raw JSON body receives the stored response. It includes Idempotent-Replayed: true.
If you reuse the key with a different method, path, or body, Pepvote returns 422 idempotency_mismatch. Pepvote stores only successful 2xx responses. Fix a failed request, then retry it with the same key or a new one.
Use stable request JSON for retries. Changing whitespace or key order changes the raw body and can cause a mismatch.
Last updated September 5, 2026