[Feature] [API] Idempotency keys

We have released a new way of securing your communication with our Management API in presence of network failures.

Read the full reference on our API documentation.

Say you called our POST /v1/deliveries API endpoint to trigger the delivery of an important notification to millions of users, but as it sometimes happen on the internet, the connection failed, or worst, you sent the request but got no response after a abnormally long timeout. You would have no easy way of knowing whether or not the notification was actually sent and you simply did not receive the response, or if the WonderPush API didn't even read your whole request… until today!

The core idea to be robust in such incertain circumstances is the ability to safely retry an API call. An idempotent call is a call that you can perform multiple times and the result would be the same as if it was applied once – that's exactly what we want!
But how could we make the creation of a new delivery indempotent? We simply assign it a kind of unique identifier. If it's the first time we see that identifier, we go on and process the request, if not, then it's a retry and we can stop working right away, avoiding duplicate work.
The way we've implemented this is through the use of a dedicated header X-WonderPush-Idempotency-Key that you can mention in your requests with a unique identifier. Hence any POST/PUT/PATCH/DELETE request bearing this header can be safely retried.

Using such feature you can even lower your timeouts and retry API calls earlier.

Read the full reference on our API documentation.

Tell us if you like this and it proved useful facing unexpected network issues!