Networks fail. Webhooks get retried. Automation tools sometimes fire a trigger twice. Without idempotency, a retried API call to create a contact could create two contacts, a retried payment call could charge a card twice, and a retried opportunity call could open the same deal twice.
An Idempotency Key solves this. You generate a unique key for each logical operation, for example a UUID. You include it in the request header. If GoHighLevel has already seen that key, it returns the result of the original request instead of processing the operation again.
This matters most in payment and contact creation flows where duplicates cause real problems. If your automation sends a webhook and the receiving server times out before acknowledging it, the automation retries. With idempotency keys, the retry is safe.
How Idempotency Key works
When making an API call that supports idempotency, add the header Idempotency-Key: your-unique-key to the request. Generate the key from the event that triggered the request, such as a hash of the Stripe payment ID or the form submission ID. This ensures the same event always produces the same key.
GoHighLevel stores the key and the response for a set period. If the same key arrives again, GoHighLevel returns the cached response. After the storage period expires, sending the same key would be treated as a new request.