> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xsoar-8-on-prem/8.13/investigate-and-respond-to-threats/incidents-and-indicators-investigation/investigate-an-incident/retain-incidents.md).

# Retain incidents

You can mark up to 1000 incidents for permanent retention so that any important incidents can't be inadvertently deleted manually, or by an API call. Retained incidents are never deleted. If you reach 1000 retained incidents, you won't be able to add additional incidents, unless you disable incident retention for some or all of your existing retained incidents.

Only user roles that have the **Retain** incident permissions, can retain or undo incident retention. For more information, see [Role-based permissions](/cortex-xsoar-8-on-prem/8.13/configure-cortex-xsoar/users-and-roles-management/roles-management/role-based-permissions.md).

<details>

<summary>Retain an incident</summary>

1. On the **Incidents** page, click the incident you want to retain.
2. From the **Actions** dropdown button in the selected incident's page, select **Retain Incident**.

To disable retention for an incident, select **Undo Retain Incident** from the **Actions** menu.

</details>

<details>

<summary>Bulk retain incidents</summary>

1. From the **Incidents** page, select the incidents to retain.
2. Click **Retention** → **Retain**.

To disable retention for a group of incidents, select the incidents in the Incidents page and click **Retention** → **Undo Retain**.

</details>

<details>

<summary>Search for retained incidents</summary>

To search for retained incidents in the Incidents search bar, use the `retained` field, with `T` (True) or `F` (False). You can also add the **Retain Incident** field to the Incidents table to easily view which incidents are retained.

</details>


---

# 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://cortex-docs.paloaltonetworks.com/cortex-xsoar-8-on-prem/8.13/investigate-and-respond-to-threats/incidents-and-indicators-investigation/investigate-an-incident/retain-incidents.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.
