POST endpoint in the Geldstuck API accepts an Idempotency-Key header. Send the same key twice, and we’ll return the original response without creating a second resource.
How it works
Generate a unique key
A UUIDv4 is the safest default. Store it alongside the operation you’re about to perform.
Behavior guarantees
- Keys are scoped per tenant. Reusing a key across tenants is safe.
- Cached responses are stored for 24 hours. After that, the key is free to reuse.
- Reusing a key with a different request body returns
409 idempotency_key_reuse. - The replay returns the exact original response - same status code, same body, same
requestId.
Example
Which endpoints support it?
All mutating endpoints (POST, PATCH, DELETE). GET requests are already idempotent and ignore the header.
What to key on
| Scenario | Good idempotency key |
|---|---|
| Creating a transaction from your order system | "tx:" + orderId |
| Adding a user from a CRM sync | "user:" + crmId + ":" + nightlyJobRunId |
| Retrying a failed webhook-triggered action | Hash of event.id |