> ## Documentation Index
> Fetch the complete documentation index at: https://docs.youka.io/llms.txt
> Use this file to discover all available pages before exploring further.

# आइडेम्पोटेंसी

> write requests पर स्थिर Idempotency-Key headers का उपयोग करें ताकि retries सुरक्षित रहें और deduplicated हों।

# आइडेम्पोटेंसी

सभी `POST` और `PATCH` mutation endpoints एक वैकल्पिक `Idempotency-Key` header स्वीकार करते हैं।

## इसे कब भेजें

आइडेम्पोटेंसी key का उपयोग तब करें जब:

* कोई client transport failure के बाद retry कर सकता हो।
* कोई queue worker एक ही logical operation को एक से अधिक बार dispatch कर सकता हो।
* कोई AI agent partial progress या tool retries के बाद mutation को फिर से चला सकता हो।

## अनुशंसित पैटर्न

* प्रति logical mutation एक स्थिर key जनरेट करें।
* उस mutation के retries के लिए वही key पुनः उपयोग करें।
* जब intended mutation बदल जाए, तो key बदल दें।

## उदाहरण

```http theme={null}
Idempotency-Key: create-project-song-1
```

```http theme={null}
Idempotency-Key: export-song-1
```

## अच्छी सीमाएँ

* किसी project को बनाने के लिए एक key।
* उसी project को export करने के लिए अलग key।
* project settings को अपडेट करने के लिए फिर से एक अलग key।

यह unrelated काम को गलती से deduplicate किए बिना retries को सुरक्षित रखता है।
