Skip to main content
Network failures and timeouts can make it unclear whether an API request succeeded. Use an idempotency key when creating a resource to safely retry the same request without creating a duplicate. Idempotency is supported by the Create Verification and Create Discovery APIs.

Usage

Include the optional Idempotency-Key header with a UUID v4 value. Generate a new key for each resource you intend to create and reuse that key only when retrying the same request.
The first request returns 201 Created. Retrying the request with the same key also returns 201 Created, with the ID of the resource created by the first request. Sohar does not create another resource or start processing again. Idempotency keys are scoped to your account, environment, and API. Reusing a key with a different request body does not create a new resource; Sohar returns the original resource ID. Use a new key if any request parameters change. An invalid Idempotency-Key, including a UUID of a version other than v4, returns 400 Bad Request.