All actions which modify states in Vault's APIs are idempotent. This means they're safe to retry and will produce exactly the same result despite having been requested before. Idempotency enables solutions to be built which are resilient to network and infrastructure problems, providing a better experience for the user.
Some requests can't determine whether you meant to make two identical calls or to retry a single call (for example upon making a transfer or payment). You can indicate this using the request_id field which is present in all state-modifying requests.
The value of this field must be unique for all distinct calls to the API. For this reason we suggest using something like UUIDv4 to ensure uniqueness.
When you want to:
Retry the same request, use the same request_id
Make a similar but distinct request, use a new value for the request_id
Determining whether or not to retry a request should be based on the HTTP response code. For further information, see the Status codes section in the Overview.