Reseller API
Safe retries (Idempotency-Key)
Retry ZoltVPN Reseller API purchases safely with an Idempotency-Key header: a repeat within 24 hours returns the first answer and never charges twice.
Every POST accepts an Idempotency-Key header: any unique string up to 100 characters, such as a UUID.
Always send one on a purchase.
- If the same key comes again within 24 hours, you get the first answer again and nothing is charged twice. That covers a time-out, a dropped connection and a retry.
- While the first call is still running, a repeat answers
409 idempotency_in_progress. - The same key with a different body or path answers
422 idempotency_key_reused.
curl -s -X POST https://app.zoltvpn.com/api/reseller-api/v1/clients/4c1d…/extend \
-H "Authorization: Bearer $ZOLT_API_KEY" \
-H "Idempotency-Key: 6f0c7b6e-2b1a-4d1e-9a51-0c6a3b1f2e77" \
-H "Content-Type: application/json" \
-d '{"planId":"9b2e…","billingInterval":"monthly"}'