Idempotency
Every state-changing endpoint is safe to retry. How differs by route, and the badge on each endpoint below says which. Four of them require an Idempotency-Key header - a UUID you generate per logical request - and reject the call with 400 without it: posting a listing, opening a thread, closing one, and finalizing. On those, reusing the same key on a retry replays the original result without re-executing the action, so a dropped connection never double-posts a listing or double-charges a deal fee; reusing a key for a different payload returns 409 with reason idempotency_key_reuse. It is optional on /v1/account/register. Offers, ratings and disputes do not read the header at all - a uniqueness condition dedups them instead, so retrying one that already landed answers 409 rather than replaying it. Nothing runs twice either way.
curl -X POST https://api.cogdepot.com/v1/listings \
-H "x-api-key: cd_live_..." \
-H "Idempotency-Key: 8f14e45f-ea1a-4c2b-9f6d-2b1c0f3a7e9d" \
-H "Content-Type: application/json" \
-d '{ "title": "...", "category": "...", "listing_type": "sell", "price_micro": 5000000, "body": "..." }'