> 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/work-safely/preview-and-confirm-changes.md). Agents can also search and read this documentation through its [MCP server](https://docs.podigee.com/~gitbook/mcp).

# Preview and confirm changes

Preview a change, confirm it after the person says yes, prevent duplicates, and verify the result.

An assistant reads Podigee data without asking. Before it changes data, it shows a preview and waits for your yes. This page tells you how the preview, the confirmation, and the idempotency key work, and how to verify a change.

## Read-only and write tools

Read-only tools only read data. Examples are `get_me`, `doctor`, `find_in_podigee`, `search_help`, `list_podcasts`, `list_episodes`, `get_episode`, `list_recent_work`, the Studio recording tools (`list_recordings`, `get_recording`, `get_recording_transcript`), the content tools, the analytics tools, `list_listeners`, `get_operation`, and the distribution status tools.

Write tools create, change, publish, submit, upload, resume, cancel, or delete something. Examples are `create_podcast`, `update_episode`, `duplicate_episode`, `delete_episode`, `publish_episode`, `import_podcast`, `create_upload`, `submit_to_platform`, `manage_feed_access`, and `cancel_operation`.

Each tool needs one or more scopes (permissions). The table of scopes is in [Authorization and scopes](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/authorization-and-scopes.md). Two rules are important:

* A connection without a write scope still sees the write tools in its tool list. A call then fails with `insufficient_scope`.
* The write tools disappear from the tool list only when writes are off for the account or for the server. A call then fails with `read_only` or `writes_disabled`.

Some tools tell the client that they are read-only, destructive, idempotent, or open to an external system. These labels help the client show the action. Podigee still checks the scopes, your access to the show, your plan, and the confirmation on the server.

## How a change works

A consequential change takes two calls, and you answer between them:

1. The assistant sends the change with `dry_run: true`. Podigee checks the request and returns a preview. Nothing changes.
2. The assistant tells you in plain words what will change. Then it stops and waits.
3. You say yes in a later message.
4. The assistant sends the same arguments again with `idempotency_key` and the `confirm` value from the preview. Podigee makes the change.

Your first request, also "do it now", is the reason for the preview. It never counts as the yes. Every preview that contains a `confirm` value also contains `next_step`, which tells the assistant to stop and wait for your yes in a later message.

## Preview a change

What you need:

* The connected account and show. If more than one show or episode can be meant, the assistant asks which one before it previews.
* The scopes of the tool.
* The exact values that you want to change.

Steps:

1. Tell the assistant what you want to change.
2. The assistant calls the tool with `dry_run: true`.
3. Read the action and the target in the preview, for example the podcast ID or the episode ID.
4. Read every value in the preview. Podigee shows the values as it will save them. For example, Markdown show notes also appear as the HTML that Podigee makes from them.
5. Read the warnings and the effects. For example, `what_happens` in an `update_podcast` preview tells you that a new subdomain moves every feed address.
6. Say yes, or tell the assistant what to correct.

Expected result: Podigee returns a preview, a `request_digest`, and a `confirm` value. The data does not change.

If the preview fails: read the error code and the message. Correct the value, the permission, the plan, or the target, then request a new preview. Do not let the assistant use another tool to avoid the preview. A `plan_limit_reached` error is not a temporary fault; it needs more allowance on the plan.

Next step: confirm the change.

## Confirm the change

What you need:

* A preview from the last 15 minutes.
* The same connected user, account, and authorization as the preview.
* One idempotency key for this change, when the tool takes one.

Steps:

1. Say yes to the preview in a new message.
2. The assistant sends the same arguments again. It sets `dry_run` to `false` or leaves it out.
3. The assistant adds `idempotency_key` and copies the `confirm` value unchanged.
4. The assistant sends the request one time.
5. Read the result. A long-running change returns an `operation_id`.

The `confirm` value is valid for 15 minutes, and you can use it one time only. It is bound to the action, the target, the user, the account, the authorization, and the request digest. Some tools return a short value that starts with `cfm_`; other tools return a longer value. The assistant copies either value exactly.

Expected result: Podigee makes the change that you saw in the preview. A direct change returns the new state. A publish, an import, or a listener password reset returns an operation. Follow it as [Follow and recover long-running operations](https://docs.podigee.com/documentation/start-here/ai-agents/work-safely/follow-and-recover-long-running-operations.md) tells you.

If the confirmation is refused with `confirmation_required`: the value expired, was used, was not copied exactly, or belongs to an older authorization. Or the arguments changed after the preview. Request a new preview with `dry_run: true`, read it, and confirm the new value. Do not send an old value again. After a new sign-in, always request a new preview.

Next step: [verify the change](#verify-the-change).

## Tools that work differently

| Tool                                                                                                                                                                                                                               | Preview                                                         | Apply                                                                       |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------------------- |
| Most write tools, for example `create_podcast`, `update_podcast`, `update_episode`, `bulk_update_episodes`, `publish_episode`, `import_podcast`, `submit_to_platform`, `create_listener`, `manage_feed_access`, `manage_workspace` | `dry_run: true` returns `confirm`                               | Same arguments with `idempotency_key` and `confirm`                         |
| `create_episode`, `duplicate_episode`                                                                                                                                                                                              | `dry_run: true` returns a preview without `confirm`             | Same arguments with `idempotency_key`; no `confirm`                         |
| `delete_episode`, `update_listener_status` with `delete`                                                                                                                                                                           | `dry_run: true`, or a call without `confirm`, returns `confirm` | `confirm` only, at least 15 seconds after the preview; no `idempotency_key` |
| `start_production`, `stop_production`, `resume_operation`, `cancel_operation`                                                                                                                                                      | `dry_run: true` returns `confirm`                               | `confirm`; no `idempotency_key`                                             |
| `update_listener_status` with `activate` or `deactivate`                                                                                                                                                                           | Optional                                                        | Applies at once; no `confirm`                                               |
| `create_upload`                                                                                                                                                                                                                    | None                                                            | `idempotency_key`; the file goes to storage, nothing is published           |

For `create_episode` and `duplicate_episode`, the assistant still shows you the preview and waits for your yes. The draft that these tools make is not live.

## Wait before you confirm a deletion

A deletion cannot be undone. For this reason, Podigee refuses a delete confirmation that arrives less than 15 seconds after its preview. This applies to `delete_episode` and to `update_listener_status` with the action `delete`.

1. The assistant shows you the preview and stops.
2. You read what will be deleted and say yes.
3. The assistant sends the `confirm` value.

If the confirmation came too soon, Podigee returns `confirmation_too_early`. Nothing was deleted, and the `confirm` value stays valid. If you did not answer yet, the assistant asks you. If you said yes, the assistant sends the same request again after the number of seconds in the message.

## Prevent duplicate changes with an idempotency key

An idempotency key identifies one change that you decided on. It lets the assistant send a request again after an interruption without a second episode, import, submission, or other change.

Podigee keeps the key with your user, the account, the type of change, and the arguments. When the same key arrives again with the same arguments, Podigee returns the result of the first request, or continues the first operation. It does not do the change a second time.

Use the same key when:

* The response was lost, and Podigee possibly accepted the request.
* The access token was refreshed.
* The connection broke, and you connected again with the same user and account.

Use a new key when you decide on a different change, for example another target, value, publication mode, or feed.

If a key arrives again with different arguments, Podigee returns `idempotency_conflict`. This protects the first change. Do not change the key only to make the second request pass. Decide if the new arguments correct the first change or are a new change. Preview a new change before you give it a new key.

A key does not replace the scopes, the confirmation, or your access to the show. After a new authorization, the assistant needs a new preview.

## Choose a reversible action before permanent deletion

When you only want to stop publication or processing, use a reversible action.

| Goal                                   | Reversible action                                                                                                                                                                                        | Permanent action to avoid                                    |
| -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| Take an episode offline                | `publish_episode` with publication mode `draft`. See [Manage episodes](https://docs.podigee.com/documentation/start-here/ai-agents/podcasts-and-episodes/manage-episodes.md).                            | `delete_episode`                                             |
| Stop long-running work                 | `cancel_operation`. See [Follow and recover long-running operations](https://docs.podigee.com/documentation/start-here/ai-agents/work-safely/follow-and-recover-long-running-operations.md).             | A second request that competes with the first                |
| Stop an upload that is not complete    | Do nothing. Podigee removes the upload session after 24 hours.                                                                                                                                           | Many new uploads of the same file                            |
| Stop access to a private feed          | Deactivate the listener. See [Manage private feeds and listeners](https://docs.podigee.com/documentation/start-here/ai-agents/content-analytics-and-distribution/manage-private-feeds-and-listeners.md). | Delete the listener                                          |
| Change chapter marks or the transcript | Read the episode, then send the complete merged set.                                                                                                                                                     | Send only the new entries: the set is replaced, not extended |

`delete_episode` removes the episode permanently and starts its removal from connected platforms. There is no restore tool. A deleted listener loses its record; a deactivated listener keeps it, and you can activate it again.

## Verify the change

What you need:

* The result or the `operation_id` of the change.
* Read access to the show.

Steps:

1. If Podigee returned an operation, follow it to a terminal state.
2. Read the target again, for example with `get_podcast` or `get_episode`.
3. Make sure that the ID is the ID of the target that you wanted.
4. Compare the values with the preview.
5. For a publish, compare `published_at` and the media state. `published_at_local` shows the time in your time zone.
6. For a distribution change, keep in mind that Podigee reports its own handoff. Only the external platform can confirm its own processing. See [Distribute a podcast](https://docs.podigee.com/documentation/start-here/ai-agents/content-analytics-and-distribution/distribute-a-podcast.md).
7. For an import, compare the imported episode IDs and the skipped items with what you expected.

Expected result: the data in Podigee agrees with the preview.

If the change succeeded but the result looks wrong: do not send the change again. Keep the operation ID, the result, and the IDs. Make sure that you used the correct account and target. Then correct the data with a new preview, or contact Podigee Support.

Next step: [Limits, errors, and recovery](https://docs.podigee.com/documentation/start-here/ai-agents/mcp-reference/limits-errors-and-recovery.md) lists every error code.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.podigee.com/documentation/start-here/ai-agents/work-safely/preview-and-confirm-changes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
