> 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/manage-episodes/replace-chapter-marks-keywords-or-transcript-data-safely.md).

# Replace chapter marks, keywords, or transcript data safely

Replace episode collection fields without losing entries that should remain.

Collection fields replace the current collection. They do not append one item to it.

## Before you start

* Read the current episode.
* Read the full current chapter, keyword, label, contributor, or transcript collection you will change.
* Prepare the complete intended replacement set.
* Prepare one stable idempotency key.

## Replace a collection

1. Copy every current item that should remain.
2. Add, edit, or remove the intended items locally.
3. For chapter marks, use `HH:MM:SS` with optional milliseconds such as `00:12:30.500`.
4. For transcript segments, preserve intended start, end, text, and speaker ID values.
5. Preview `update_episode` with the complete replacement collection.
6. Compare the full preview with the current collection.
7. Confirm the exact preview with the same idempotency key.
8. Read the episode or transcript again and verify the complete saved set.

An empty `chapter_marks` array clears the chapter marks. An empty `transcription` array does not change the stored transcript. Omit a field when you do not intend to change it.

## Expected result

The saved collection exactly matches the reviewed replacement set, with no accidental loss of entries that should remain.

## If the preview is incomplete

Do not confirm it. Read the current collection again, merge the intended change, and request a new preview.

## Next step

[Inspect an episode](/documentation/start-here/ai-agents/manage-episodes/inspect-an-episode.md) to verify the episode-level result.


---

# 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/manage-episodes/replace-chapter-marks-keywords-or-transcript-data-safely.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.
