> For the complete documentation index, see [llms.txt](https://docs.podigee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podigee.com/documentation/start-here/ai-agents/make-changes-safely/prevent-duplicate-changes-with-idempotency-keys.md).

# Prevent duplicate changes with idempotency keys

Use one stable idempotency key to retry a Podigee change without creating duplicate work.

An idempotency key identifies one intended Podigee change. It lets a client retry after an interruption without creating another episode, import, submission, or other operation.

## How it works

The client chooses a stable key for one user intent. Podigee stores that key with the selected user, account, operation type, and request digest.

When the same client repeats the same semantic request with the same key, Podigee returns or continues the accepted work instead of creating a duplicate.

## Use one key for one intent

Keep the same key when:

* A network response was lost after Podigee may have accepted the request.
* The access token refreshed during the operation.
* The client disconnected and reconnected to the same user and account.
* You poll or recover the accepted workflow as its contract directs.

Use a new key when the user chooses a different target, value, publication mode, feed, or other meaningful request input.

## Conflict behavior

Reusing one key with different arguments returns `idempotency_conflict`. This is a safety result. Do not change the key only to force the second request through.

Review whether the new arguments represent a correction to the original intent or a separate change. Preview a separate change before you assign it a new key.

## Authorization boundary

Idempotency can survive token refresh and reauthorization for the same actor and tenant. It does not bypass current scopes, confirmation, resource access, or operation policy. A new authorization must obtain a new preview confirmation.

## Related tasks

* [Confirm a consequential change](/documentation/start-here/ai-agents/make-changes-safely/confirm-a-consequential-change.md)
* [Recover after a disconnect or reauthorization](/documentation/start-here/ai-agents/make-changes-safely/recover-after-a-disconnect-or-reauthorization.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.podigee.com/documentation/start-here/ai-agents/make-changes-safely/prevent-duplicate-changes-with-idempotency-keys.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
