Skip to main content

How do I guarantee idempotency when triggering an API broadcast? 

Hi Rushil, 
 
Thank you for reaching out to us, and I hope my response finds you well today!
 
Jumping right in, I believe you are referring to our API trigger broadcast. Is that correct? It sounds like you may want to include an idempotency parameter to your request so you can pass a ULID to deduplicate your requests, similar to what we have for our events here
 
I’ve checked with the team, and unfortunately, this feature isn’t available at the moment. However, I’d be happy to submit a feature request on your behalf. I’d love to learn a little more about how you’d use this functionality and why it's important to you so I can pass it along to our product team for consideration as we explore new features to implement in the future. 
 
To help us better understand, would you please share some additional details on how this is helpful for your business? 
 
We look forward to hearing your additional feedback!

All the best,


Hi @Kratai P. I am wondering the same question here. What are the options we have to send an idempotent parameter in the body of a webhook request.


Hi Tomas, 

Thank you for your question. I believe you are referring to our Webhook Action. Is that correct? If so, we do have a field in the header that you can use to prevent duplications. Per the documentation:
 

By default, we provide X-CIO-Idempotency-Key in the header. This is useful for preventing duplicate requests from creating multiple records in a system. This means that if the same request is sent multiple times, the result will be the same as if it were only sent once.

You may see the value more than once if:

  • your server doesn’t respond with a 20x, but still accepts the request, so we automatically retry the action or
  • you manually re-send the webhook within the UI

 

So, this is already included in the header and you do not need to manually add it to the body of your requests. I hope this helps to explain, Tomas!


Reply