> This page is for Unified.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Idempotency

> How to use the Idempotency-Key header to safely retry POST requests without creating duplicate records.

> **Info**
>
> Idempotent operations are currently in beta, reach out to your account representative or [contact us](mailto:support@merge.dev) for more information.

---

## Overview

For POST operations, Merge supports idempotency for safely retrying requests without accidentally performing the same operation twice. To perform an idempotent request, include an `Idempotency-Key` header in POST requests to ensure the same request is not processed more than once. It's recommended to use a V4 UUID, but any sufficiently unique string will work. The idempotency log is stored for 24 hours before it expires.

* If the key is unique, Merge will store a log of the request, including the hashed request body, status code, and response body
* If the same key is reused with identical parameters, Merge will return the previously stored response
* If the key is reused with different parameters, the API will return a 400 error indicating an invalid reuse

Retries on failed asynchronous requests will automatically follow the rate-limiting and retry mechanisms in the API. This approach allows for more resilient, scalable integrations, minimizing duplicate requests and supporting asynchronous processing for heavier tasks.