Skip to content
CaptiFi Connect

Glossary

What is Idempotency key?

An idempotency key is a unique value sent with an API request so that, if the request is retried, the service recognises it and doesn't act twice.

Connections drop. If your code sends a text and the response never arrives, you can't tell whether the text went. Retry blindly and the customer might get it twice; don't retry and they might get nothing. With an idempotency key you retry with the same key, and the service hands back the original result without sending again.

A Swindon vet's overnight reminder job that falls over halfway can simply run again with the same keys. Reminders that already went aren't repeated, and the rest go out.

CaptiFi Connect accepts an Idempotency-Key header when you send through the API. Use a value that's unique to the send, such as a UUID or your booking reference plus the type of text. A repeat with the same key returns the first request's result and sends nothing new, and reusing a key for a different request returns an error so mistakes don't go unnoticed.