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

# Idempotency

> Retry a Dropbox Sign POST or PUT safely with an Idempotency-Key header.

# Idempotency

The API can safely retry a `POST` or `PUT` without performing that operation twice. Send an `Idempotency-Key` header when you create or update a resource. If the connection fails before you receive a response, repeat the same request with the same key.

The header is not an operation parameter. Send it with the other headers for that request, alongside `Authorization`. Do not set one key as a default on an SDK client. Each logical operation needs its own key, and a retry must send that same key again.

The key is scoped to the authenticated account. Calls made with an API app are also scoped to that app.

## Sending a key

Generate the key in your integration. It must be 1 to 255 characters, and unique for a single operation on that account for 24 hours. Use a version 4 UUID. Another random string is fine when it has enough entropy to avoid collisions. You can also derive the key from your own object id, such as an internal order id, when that id already identifies one submission.

Do not put sensitive data in the key. Email addresses and other personal identifiers are not keys.

A missing header means the request is not idempotent. An empty value or a value longer than 255 characters returns `400` `bad_request`.

`GET` and `DELETE` are safe to retry without this header. Do not send `Idempotency-Key` on those methods. The API ignores it.

```shell
curl "https://api.hellosign.com/v3/signature_request/send" \
  -u "YOUR_API_KEY:" \
  -H "Idempotency-Key: 8f14e45f-ceea-467f-8644-0c0e1c6f0c0d" \
  -F "title=Example NDA" \
  -F "subject=Please sign" \
  -F "signers[0][email_address]=signer@example.com" \
  -F "signers[0][name]=Example Signer" \
  -F "files[0]=@example-nda.pdf"
```

In the official SDKs, send `Idempotency-Key` with that single call. Generate the UUID once, then reuse it if you retry. Python, Node, and Ruby accept the header on the method. C#, Java, and PHP read extra headers from the client configuration, so set the key immediately before the call and clear it immediately after. A key left on the client is sent again with the next request.

**`Python`**

```python Python
import uuid

idempotency_key = str(uuid.uuid4())

signature_request_api.signature_request_send(
    signature_request_send_request,
    _headers={"Idempotency-Key": idempotency_key},
)
```

**`Node`**

```javascript Node
await signatureRequestApi.signatureRequestSend(signatureRequestSendRequest, {
  headers: { "Idempotency-Key": idempotencyKey },
});
```

**`Ruby`**

```ruby Ruby
signature_request_api.signature_request_send(
  signature_request_send_request,
  header_params: { "Idempotency-Key" => idempotency_key }
)
```

**`PHP`**

```php PHP
$idempotency_key = '8f14e45f-ceea-467f-8644-0c0e1c6f0c0d';

$config = $signature_request_api->getConfig();
$previous_options = $config->getOptions();
$options = $previous_options;
$options['headers'] = $previous_options['headers'] ?? [];
$options['headers']['Idempotency-Key'] = $idempotency_key;
$config->setOptions($options);

try {
    $signature_request_api->signatureRequestSend($signature_request_send_request);
} finally {
    $config->setOptions($previous_options);
}
```

**`C#`**

```csharp C#
var idempotencyKey = System.Guid.NewGuid().ToString();

signatureRequestApi.Configuration.DefaultHeaders["Idempotency-Key"] = idempotencyKey;
try
{
    signatureRequestApi.SignatureRequestSend(signatureRequestSendRequest);
}
finally
{
    signatureRequestApi.Configuration.DefaultHeaders.Remove("Idempotency-Key");
}
```

**`Java`**

```java Java
String idempotencyKey = java.util.UUID.randomUUID().toString();

com.dropbox.sign.ApiClient apiClient = signatureRequestApi.getApiClient();
apiClient.addDefaultHeader("Idempotency-Key", idempotencyKey);
try {
    signatureRequestApi.signatureRequestSend(signatureRequestSendRequest);
} finally {
    // A null value is omitted, which clears the header for later calls.
    apiClient.addDefaultHeader("Idempotency-Key", null);
}
```

## Retries

Retry with the same key and the same parameters when you never received a response, such as a timeout or a dropped connection. The API keeps the result for 24 hours. Retry with that key only inside that window. After it expires, the same key starts a new request. Check the resource or wait for a callback before sending the operation again.

A request matches when the HTTP method, path, query, parameters, and uploaded file contents match. Key order inside JSON objects does not make the request different.

## Replayed responses

The first completed result for a key is saved, including a `4xx` or `500` from a request that ran. A later call with the same key and the same parameters returns that status code and body. Any response to a request that included `Idempotency-Key` includes `Idempotent-Replayed`. The first response uses `false`. A stored response uses `true`:

```
Idempotent-Replayed: false
```

```
Idempotent-Replayed: true
```

The result is saved once the operation has started. These responses are not saved, so you can retry them with the same key:

* `401` or another failure that happens before the operation starts
* `409` while the original request with that key is still in progress

Wait briefly, then retry an in-progress `409` with the same key and the same parameters.

## When to use a new key

Send a new key when the request itself changed. Reusing a key with different parameters returns `409` `conflict` and does not replace the saved result.

For a completed `4xx`, generate a new key after you correct the request. Treat a completed `500` as indeterminate: the original request may already have created or changed a resource. Prefer the saved result, or check the resource and listen for a callback, instead of sending a new key to force the operation through again.

A `409` can also mean the target resource cannot accept the request yet, such as a signature request that is still being set up. See [Warnings and Errors](/api/manual-reference-pages/warnings-and-errors).