Skip to main content
After a network error, a client can’t always tell whether a POST went through. When the POST carries an Idempotency-Key header, the client can retry it without adding the same note twice or starting a second erasure job. Every POST endpoint takes the header. The value is 1 to 255 printable ASCII characters without leading or trailing spaces, unique to the operation, such as a UUID generated once and reused on every retry of the same request.

How Usertick handles the key

“The same request” means the same method, path, parameters and body. A body sent again with different whitespace or key order counts as the same. Keys are stored per credential, so two keys or two apps never collide. The stored HTTP response includes its status, body and Location header. A 5xx response isn’t stored, so a retry after a server error runs the request again. Without the header, a POST runs every time it is sent.

Endpoints that take the header

Every POST endpoint takes the header: PATCH and DELETE don’t take the header, and retrying them is safe without it. Sending the same PATCH twice leaves the response as the first PATCH left it. Once something is deleted, a second DELETE of it returns 404.