πIdempotency
The OffBlocks API supports API idempotency. This allows safe request retries (during the validity time window of the key) while only performing the requested action once.
For example, if there is a temporary connection issue, a request to create an account could be safely retried several times without creating multiple accounts.
Always use a different idempotency key for different requests
You must use different idempotency keys for different requests. Reusing the same idempotency key will cause the subsequent requests to not be executed. Reuse of an idempotency key with a different payload, while the key is still valid, results in an error.
Enabling Idempotency
To use idempotency, where required (this includes all modifying requests such as POST
, PUT
, PATCH
and DELETE
), add the Idempotency-Key
header as shown in the following example endpoint. We expect a key in a format of UUID to be provided. This is automatically generated and populated for relevant requests in our Postman collection.
Scope and Validity
Each idempotency key has a duration of 1 hour.
During the validity period, you can only send the same payload with the same idempotency key. If you do this, you receive an identical response.
If the payload is different, but the idempotency key is the same, you receive an error. The error is likely 422 or 409, explained below.
Error Handling
These are some of the common errors associated with idempotency:
Last updated