Files
OpenArchiver/enterprise/retention-labels/api.html
2026-03-12 21:37:07 +00:00

92 lines
60 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Retention Labels: API Endpoints | Open Archiver Docs</title>
<meta name="description" content="Official documentation for the Open Archiver project.">
<meta name="generator" content="VitePress v1.6.4">
<link rel="preload stylesheet" href="/assets/style.BZzyQG4l.css" as="style">
<link rel="preload stylesheet" href="/vp-icons.css" as="style">
<script type="module" src="/assets/app.D4Oh3Q3i.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/theme.Bkbn0jhI.js">
<link rel="modulepreload" href="/assets/chunks/framework.S-Qvb3wi.js">
<link rel="modulepreload" href="/assets/enterprise_retention-labels_api.md.BJpAzeXZ.lean.js">
<script defer src="https://analytics.openarchiver.com/script.js" data-website-id="2c8b452e-eab5-4f82-8ead-902d8f8b976f"></script>
<link rel="icon" href="/logo-sq.svg">
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-6d457d7f><!--[--><!--]--><!--[--><span tabindex="-1" data-v-9f15b6e6></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-9f15b6e6>Skip to content</a><!--]--><!----><header class="VPNav" data-v-6d457d7f data-v-06aeb22c><div class="VPNavBar" data-v-06aeb22c data-v-9f44cfca><div class="wrapper" data-v-9f44cfca><div class="container" data-v-9f44cfca><div class="title" data-v-9f44cfca><div class="VPNavBarTitle has-sidebar" data-v-9f44cfca data-v-cea99ba2><a class="title" href="/" data-v-cea99ba2><!--[--><!--]--><!--[--><img class="VPImage logo" src="/logo-sq.svg" alt data-v-384abc6c><!--]--><span data-v-cea99ba2>Open Archiver Docs</span><!--[--><!--]--></a></div></div><div class="content" data-v-9f44cfca><div class="content-body" data-v-9f44cfca><!--[--><!--]--><div class="VPNavBarSearch search" data-v-9f44cfca><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-9f44cfca data-v-bc890e2b><span id="main-nav-aria-label" class="visually-hidden" data-v-bc890e2b> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/" tabindex="0" data-v-bc890e2b data-v-358f64d2><!--[--><span data-v-358f64d2>Home</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://github.com/LogicLabs-OU/OpenArchiver" target="_blank" rel="noreferrer" tabindex="0" data-v-bc890e2b data-v-358f64d2><!--[--><span data-v-358f64d2>Github</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://openarchiver.com/" target="_blank" rel="noreferrer" tabindex="0" data-v-bc890e2b data-v-358f64d2><!--[--><span data-v-358f64d2>Website</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://discord.gg/MTtD7BhuTQ" target="_blank" rel="noreferrer" tabindex="0" data-v-bc890e2b data-v-358f64d2><!--[--><span data-v-358f64d2>Discord</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-9f44cfca data-v-1a8fd632><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-1a8fd632 data-v-77125d61 data-v-44c0c9c3><span class="check" data-v-44c0c9c3><span class="icon" data-v-44c0c9c3><!--[--><span class="vpi-sun sun" data-v-77125d61></span><span class="vpi-moon moon" data-v-77125d61></span><!--]--></span></span></button></div><!----><div class="VPFlyout VPNavBarExtra extra" data-v-9f44cfca data-v-cb22ae83 data-v-ce17dc3c><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-ce17dc3c><span class="vpi-more-horizontal icon" data-v-ce17dc3c></span></button><div class="menu" data-v-ce17dc3c><div class="VPMenu" data-v-ce17dc3c data-v-a0929307><!----><!--[--><!--[--><!----><div class="group" data-v-cb22ae83><div class="item appearance" data-v-cb22ae83><p class="label" data-v-cb22ae83>Appearance</p><div class="appearance-action" data-v-cb22ae83><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-cb22ae83 data-v-77125d61 data-v-44c0c9c3><span class="check" data-v-44c0c9c3><span class="icon" data-v-44c0c9c3><!--[--><span class="vpi-sun sun" data-v-77125d61></span><span class="vpi-moon moon" data-v-77125d61></span><!--]--></span></span></button></div></div></div><!----><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-9f44cfca data-v-42f375ed><span class="container" data-v-42f375ed><span class="top" data-v-42f375ed></span><span class="middle" data-v-42f375ed></span><span class="bottom" data-v-42f375ed></span></span></button></div></div></div></div><div class="divider" data-v-9f44cfca><div class="divider-line" data-v-9f44cfca></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-6d457d7f data-v-e17e33c6><div class="container" data-v-e17e33c6><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-e17e33c6><span class="vpi-align-left menu-icon" data-v-e17e33c6></span><span class="menu-text" data-v-e17e33c6>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-e17e33c6 data-v-bab32157><button data-v-bab32157>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-6d457d7f data-v-91b447a8><div class="curtain" data-v-91b447a8></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-91b447a8><span class="visually-hidden" id="sidebar-aria-label" data-v-91b447a8> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-6b998b36><section class="VPSidebarItem level-0" data-v-6b998b36 data-v-5f79b55d><div class="item" role="button" tabindex="0" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><h2 class="text" data-v-5f79b55d>User Guides</h2><!----></div><div class="items" data-v-5f79b55d><!--[--><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Get Started</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/installation.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Installation</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/integrity-check.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Email Integrity Check</p><!--]--></a><!----></div><!----></div><section class="VPSidebarItem level-1 collapsible collapsed is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" tabindex="0" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/email-providers/" data-v-5f79b55d><!--[--><h3 class="text" data-v-5f79b55d>Email Providers</h3><!--]--></a><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-5f79b55d><span class="vpi-chevron-right caret-icon" data-v-5f79b55d></span></div></div><div class="items" data-v-5f79b55d><!--[--><div class="VPSidebarItem level-2 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/email-providers/imap.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Generic IMAP Server</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/email-providers/google-workspace.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Google Workspace</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/email-providers/microsoft-365.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Microsoft 365</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/email-providers/eml.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>EML Import</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/email-providers/pst.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>PST Import</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/email-providers/mbox.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Mbox Import</p><!--]--></a><!----></div><!----></div><!--]--></div></section><section class="VPSidebarItem level-1 collapsible collapsed" data-v-5f79b55d data-v-5f79b55d><div class="item" role="button" tabindex="0" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><h3 class="text" data-v-5f79b55d>Settings</h3><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-5f79b55d><span class="vpi-chevron-right caret-icon" data-v-5f79b55d></span></div></div><div class="items" data-v-5f79b55d><!--[--><div class="VPSidebarItem level-2 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/settings/system.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>System</p><!--]--></a><!----></div><!----></div><!--]--></div></section><section class="VPSidebarItem level-1 collapsible collapsed" data-v-5f79b55d data-v-5f79b55d><div class="item" role="button" tabindex="0" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><h3 class="text" data-v-5f79b55d>Upgrading and Migration</h3><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-5f79b55d><span class="vpi-chevron-right caret-icon" data-v-5f79b55d></span></div></div><div class="items" data-v-5f79b55d><!--[--><div class="VPSidebarItem level-2 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/upgrade-and-migration/upgrade.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Upgrading</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-2 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/user-guides/upgrade-and-migration/meilisearch-upgrade.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Meilisearch Upgrade</p><!--]--></a><!----></div><!----></div><!--]--></div></section><!--]--></div></section></div><div class="no-transition group" data-v-6b998b36><section class="VPSidebarItem level-0" data-v-6b998b36 data-v-5f79b55d><div class="item" role="button" tabindex="0" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><h2 class="text" data-v-5f79b55d>API Reference</h2><!----></div><div class="items" data-v-5f79b55d><!--[--><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/api/" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Overview</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/api/authentication.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Authentication</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/api/rate-limiting.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Rate Limiting</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/api/auth.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Auth</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/api/archived-email.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Archived Email</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/api/dashboard.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Dashboard</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/api/ingestion.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Ingestion</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/api/integrity.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Integrity Check</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/api/search.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Search</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/api/storage.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Storage</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/api/jobs.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Jobs</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-6b998b36><section class="VPSidebarItem level-0" data-v-6b998b36 data-v-5f79b55d><div class="item" role="button" tabindex="0" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><h2 class="text" data-v-5f79b55d>Services</h2><!----></div><div class="items" data-v-5f79b55d><!--[--><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/services/" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Overview</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/services/storage-service.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>Storage Service</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/services/ocr-service.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>OCR Service</p><!--]--></a><!----></div><!----></div><section class="VPSidebarItem level-1" data-v-5f79b55d data-v-5f79b55d><div class="item" role="button" tabindex="0" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><h3 class="text" data-v-5f79b55d>IAM Service</h3><!----></div><div class="items" data-v-5f79b55d><!--[--><div class="VPSidebarItem level-2 is-link" data-v-5f79b55d data-v-5f79b55d><div class="item" data-v-5f79b55d><div class="indicator" data-v-5f79b55d></div><a class="VPLink link link" href="/services/iam-service/iam-policy.html" data-v-5f79b55d><!--[--><p class="text" data-v-5f79b55d>IAM Policies</p><!--]--></a><!----></div><!----></div><!--]--></div></section><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-6d457d7f data-v-413f3f32><div class="VPDoc has-sidebar has-aside" data-v-413f3f32 data-v-29334b8c><!--[--><!--]--><div class="container" data-v-29334b8c><div class="aside" data-v-29334b8c><div class="aside-curtain" data-v-29334b8c></div><div class="aside-container" data-v-29334b8c><div class="aside-content" data-v-29334b8c><div class="VPDocAside" data-v-29334b8c data-v-0970baee><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-0970baee data-v-1cf7166c><div class="content" data-v-1cf7166c><div class="outline-marker" data-v-1cf7166c></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-1cf7166c>On this page</div><ul class="VPDocOutlineItem root" data-v-1cf7166c data-v-c6ed6775><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-0970baee></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-29334b8c><div class="content-container" data-v-29334b8c><!--[--><!--]--><main class="main" data-v-29334b8c><div style="position:relative;" class="vp-doc _enterprise_retention-labels_api" data-v-29334b8c><div><h1 id="retention-labels-api-endpoints" tabindex="-1">Retention Labels: API Endpoints <a class="header-anchor" href="#retention-labels-api-endpoints" aria-label="Permalink to &quot;Retention Labels: API Endpoints&quot;"></a></h1><p>The retention labels feature exposes a RESTful API for managing retention labels and applying them to individual archived emails. All endpoints require authentication and appropriate permissions as specified below.</p><p><strong>Base URL:</strong> <code>/api/v1/enterprise/retention-policy</code></p><p>All endpoints also require the <code>RETENTION_POLICY</code> feature to be enabled in the enterprise license.</p><hr><h2 id="label-management-endpoints" tabindex="-1">Label Management Endpoints <a class="header-anchor" href="#label-management-endpoints" aria-label="Permalink to &quot;Label Management Endpoints&quot;"></a></h2><h3 id="list-all-labels" tabindex="-1">List All Labels <a class="header-anchor" href="#list-all-labels" aria-label="Permalink to &quot;List All Labels&quot;"></a></h3><p>Retrieves all retention labels, ordered by creation date ascending.</p><ul><li><strong>Endpoint:</strong> <code>GET /labels</code></li><li><strong>Method:</strong> <code>GET</code></li><li><strong>Authentication:</strong> Required</li><li><strong>Permission:</strong> <code>manage:all</code></li></ul><h4 id="response-body" tabindex="-1">Response Body <a class="header-anchor" href="#response-body" aria-label="Permalink to &quot;Response Body&quot;"></a></h4><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;a1b2c3d4-e5f6-7890-abcd-ef1234567890&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Legal Hold - Litigation ABC&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;description&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Extended retention for emails related to litigation ABC vs Company&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;retentionPeriodDays&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2555</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;isDisabled&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;createdAt&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;2025-10-01T00:00:00.000Z&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;b2c3d4e5-f6a7-8901-bcde-f23456789012&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Executive Communications&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;description&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;retentionPeriodDays&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">3650</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;isDisabled&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;createdAt&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;2025-09-15T12:30:00.000Z&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span></code></pre></div><hr><h3 id="get-label-by-id" tabindex="-1">Get Label by ID <a class="header-anchor" href="#get-label-by-id" aria-label="Permalink to &quot;Get Label by ID&quot;"></a></h3><p>Retrieves a single retention label by its UUID.</p><ul><li><strong>Endpoint:</strong> <code>GET /labels/:id</code></li><li><strong>Method:</strong> <code>GET</code></li><li><strong>Authentication:</strong> Required</li><li><strong>Permission:</strong> <code>manage:all</code></li></ul><h4 id="path-parameters" tabindex="-1">Path Parameters <a class="header-anchor" href="#path-parameters" aria-label="Permalink to &quot;Path Parameters&quot;"></a></h4><table tabindex="0"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>uuid</code></td><td>The UUID of the label to get.</td></tr></tbody></table><h4 id="response-body-1" tabindex="-1">Response Body <a class="header-anchor" href="#response-body-1" aria-label="Permalink to &quot;Response Body&quot;"></a></h4><p>Returns a single label object (same shape as the list endpoint), or <code>404</code> if not found.</p><hr><h3 id="create-label" tabindex="-1">Create Label <a class="header-anchor" href="#create-label" aria-label="Permalink to &quot;Create Label&quot;"></a></h3><p>Creates a new retention label. The label name must be unique across the system.</p><ul><li><strong>Endpoint:</strong> <code>POST /labels</code></li><li><strong>Method:</strong> <code>POST</code></li><li><strong>Authentication:</strong> Required</li><li><strong>Permission:</strong> <code>manage:all</code></li></ul><h4 id="request-body" tabindex="-1">Request Body <a class="header-anchor" href="#request-body" aria-label="Permalink to &quot;Request Body&quot;"></a></h4><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>Yes</td><td>Unique label name. Max 255 characters.</td></tr><tr><td><code>description</code></td><td><code>string</code></td><td>No</td><td>Human-readable description. Max 1000 characters.</td></tr><tr><td><code>retentionPeriodDays</code></td><td><code>integer</code></td><td>Yes</td><td>Number of days to retain emails with this label. Minimum 1.</td></tr></tbody></table><h4 id="example-request" tabindex="-1">Example Request <a class="header-anchor" href="#example-request" aria-label="Permalink to &quot;Example Request&quot;"></a></h4><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Financial Records - Q4 2025&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;description&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Extended retention for Q4 2025 financial correspondence per regulatory requirements&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;retentionPeriodDays&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2555</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="response" tabindex="-1">Response <a class="header-anchor" href="#response" aria-label="Permalink to &quot;Response&quot;"></a></h4><ul><li><strong><code>201 Created</code></strong> — Returns the created label object.</li><li><strong><code>409 Conflict</code></strong> — A label with this name already exists.</li><li><strong><code>422 Unprocessable Entity</code></strong> — Validation errors.</li></ul><hr><h3 id="update-label" tabindex="-1">Update Label <a class="header-anchor" href="#update-label" aria-label="Permalink to &quot;Update Label&quot;"></a></h3><p>Updates an existing retention label. Only the fields included in the request body are modified.</p><ul><li><strong>Endpoint:</strong> <code>PUT /labels/:id</code></li><li><strong>Method:</strong> <code>PUT</code></li><li><strong>Authentication:</strong> Required</li><li><strong>Permission:</strong> <code>manage:all</code></li></ul><h4 id="path-parameters-1" tabindex="-1">Path Parameters <a class="header-anchor" href="#path-parameters-1" aria-label="Permalink to &quot;Path Parameters&quot;"></a></h4><table tabindex="0"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>uuid</code></td><td>The UUID of the label to update.</td></tr></tbody></table><h4 id="request-body-1" tabindex="-1">Request Body <a class="header-anchor" href="#request-body-1" aria-label="Permalink to &quot;Request Body&quot;"></a></h4><p>All fields from the create endpoint are accepted, and all are optional. Only provided fields are updated.</p><p><strong>Important:</strong> The <code>retentionPeriodDays</code> field cannot be modified if the label is currently applied to any emails. Attempting to do so will return a <code>409 Conflict</code> error.</p><h4 id="example-request-1" tabindex="-1">Example Request <a class="header-anchor" href="#example-request-1" aria-label="Permalink to &quot;Example Request&quot;"></a></h4><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Financial Records - Q4 2025 (Updated)&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;description&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Updated description for Q4 2025 financial records retention&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="response-1" tabindex="-1">Response <a class="header-anchor" href="#response-1" aria-label="Permalink to &quot;Response&quot;"></a></h4><ul><li><strong><code>200 OK</code></strong> — Returns the updated label object.</li><li><strong><code>404 Not Found</code></strong> — Label with the given ID does not exist.</li><li><strong><code>409 Conflict</code></strong> — Attempted to modify retention period while label is applied to emails.</li><li><strong><code>422 Unprocessable Entity</code></strong> — Validation errors.</li></ul><hr><h3 id="delete-label" tabindex="-1">Delete Label <a class="header-anchor" href="#delete-label" aria-label="Permalink to &quot;Delete Label&quot;"></a></h3><p>Deletes or disables a retention label depending on its usage status.</p><ul><li><strong>Endpoint:</strong> <code>DELETE /labels/:id</code></li><li><strong>Method:</strong> <code>DELETE</code></li><li><strong>Authentication:</strong> Required</li><li><strong>Permission:</strong> <code>manage:all</code></li></ul><h4 id="path-parameters-2" tabindex="-1">Path Parameters <a class="header-anchor" href="#path-parameters-2" aria-label="Permalink to &quot;Path Parameters&quot;"></a></h4><table tabindex="0"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>uuid</code></td><td>The UUID of the label to delete.</td></tr></tbody></table><h4 id="deletion-logic" tabindex="-1">Deletion Logic <a class="header-anchor" href="#deletion-logic" aria-label="Permalink to &quot;Deletion Logic&quot;"></a></h4><ul><li><strong>Hard Delete</strong>: If the label has never been applied to any emails, it is permanently removed.</li><li><strong>Soft Disable</strong>: If the label is currently applied to one or more emails, it is marked as <code>isDisabled = true</code> instead of being deleted. This preserves the retention clock for tagged emails while preventing new applications.</li></ul><h4 id="response-body-2" tabindex="-1">Response Body <a class="header-anchor" href="#response-body-2" aria-label="Permalink to &quot;Response Body&quot;"></a></h4><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;action&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;deleted&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>or</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;action&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;disabled&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="response-codes" tabindex="-1">Response Codes <a class="header-anchor" href="#response-codes" aria-label="Permalink to &quot;Response Codes&quot;"></a></h4><ul><li><strong><code>200 OK</code></strong> — Label successfully deleted or disabled. Check the <code>action</code> field in the response body.</li><li><strong><code>404 Not Found</code></strong> — Label with the given ID does not exist.</li></ul><hr><h2 id="email-label-endpoints" tabindex="-1">Email Label Endpoints <a class="header-anchor" href="#email-label-endpoints" aria-label="Permalink to &quot;Email Label Endpoints&quot;"></a></h2><h3 id="get-email-s-label" tabindex="-1">Get Email&#39;s Label <a class="header-anchor" href="#get-email-s-label" aria-label="Permalink to &quot;Get Email&#39;s Label&quot;"></a></h3><p>Retrieves the retention label currently applied to a specific archived email.</p><ul><li><strong>Endpoint:</strong> <code>GET /email/:emailId/label</code></li><li><strong>Method:</strong> <code>GET</code></li><li><strong>Authentication:</strong> Required</li><li><strong>Permission:</strong> <code>read:archive</code></li></ul><h4 id="path-parameters-3" tabindex="-1">Path Parameters <a class="header-anchor" href="#path-parameters-3" aria-label="Permalink to &quot;Path Parameters&quot;"></a></h4><table tabindex="0"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>emailId</code></td><td><code>uuid</code></td><td>The UUID of the archived email.</td></tr></tbody></table><h4 id="response-body-3" tabindex="-1">Response Body <a class="header-anchor" href="#response-body-3" aria-label="Permalink to &quot;Response Body&quot;"></a></h4><p>Returns <code>null</code> if no label is applied:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">null</span></span></code></pre></div><p>Or the label information if a label is applied:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;labelId&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;a1b2c3d4-e5f6-7890-abcd-ef1234567890&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;labelName&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Legal Hold - Litigation ABC&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;retentionPeriodDays&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2555</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;appliedAt&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;2025-10-15T14:30:00.000Z&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;appliedByUserId&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;user123&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="response-codes-1" tabindex="-1">Response Codes <a class="header-anchor" href="#response-codes-1" aria-label="Permalink to &quot;Response Codes&quot;"></a></h4><ul><li><strong><code>200 OK</code></strong> — Returns label information or <code>null</code>.</li><li><strong><code>500 Internal Server Error</code></strong> — Server error during processing.</li></ul><hr><h3 id="apply-label-to-email" tabindex="-1">Apply Label to Email <a class="header-anchor" href="#apply-label-to-email" aria-label="Permalink to &quot;Apply Label to Email&quot;"></a></h3><p>Applies a retention label to an archived email. If the email already has a label, the existing label is replaced.</p><ul><li><strong>Endpoint:</strong> <code>POST /email/:emailId/label</code></li><li><strong>Method:</strong> <code>POST</code></li><li><strong>Authentication:</strong> Required</li><li><strong>Permission:</strong> <code>delete:archive</code></li></ul><h4 id="path-parameters-4" tabindex="-1">Path Parameters <a class="header-anchor" href="#path-parameters-4" aria-label="Permalink to &quot;Path Parameters&quot;"></a></h4><table tabindex="0"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>emailId</code></td><td><code>uuid</code></td><td>The UUID of the archived email.</td></tr></tbody></table><h4 id="request-body-2" tabindex="-1">Request Body <a class="header-anchor" href="#request-body-2" aria-label="Permalink to &quot;Request Body&quot;"></a></h4><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Required</th><th>Description</th></tr></thead><tbody><tr><td><code>labelId</code></td><td><code>uuid</code></td><td>Yes</td><td>The UUID of the label to apply.</td></tr></tbody></table><h4 id="example-request-2" tabindex="-1">Example Request <a class="header-anchor" href="#example-request-2" aria-label="Permalink to &quot;Example Request&quot;"></a></h4><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;labelId&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;a1b2c3d4-e5f6-7890-abcd-ef1234567890&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="response-body-4" tabindex="-1">Response Body <a class="header-anchor" href="#response-body-4" aria-label="Permalink to &quot;Response Body&quot;"></a></h4><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;labelId&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;a1b2c3d4-e5f6-7890-abcd-ef1234567890&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;labelName&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Legal Hold - Litigation ABC&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;retentionPeriodDays&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">2555</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;appliedAt&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;2025-10-15T14:30:00.000Z&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;appliedByUserId&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;user123&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="response-codes-2" tabindex="-1">Response Codes <a class="header-anchor" href="#response-codes-2" aria-label="Permalink to &quot;Response Codes&quot;"></a></h4><ul><li><strong><code>200 OK</code></strong> — Label successfully applied.</li><li><strong><code>404 Not Found</code></strong> — Email or label not found.</li><li><strong><code>409 Conflict</code></strong> — Attempted to apply a disabled label.</li><li><strong><code>422 Unprocessable Entity</code></strong> — Invalid request body.</li></ul><hr><h3 id="remove-label-from-email" tabindex="-1">Remove Label from Email <a class="header-anchor" href="#remove-label-from-email" aria-label="Permalink to &quot;Remove Label from Email&quot;"></a></h3><p>Removes the retention label from an archived email if one is applied.</p><ul><li><strong>Endpoint:</strong> <code>DELETE /email/:emailId/label</code></li><li><strong>Method:</strong> <code>DELETE</code></li><li><strong>Authentication:</strong> Required</li><li><strong>Permission:</strong> <code>delete:archive</code></li></ul><h4 id="path-parameters-5" tabindex="-1">Path Parameters <a class="header-anchor" href="#path-parameters-5" aria-label="Permalink to &quot;Path Parameters&quot;"></a></h4><table tabindex="0"><thead><tr><th>Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>emailId</code></td><td><code>uuid</code></td><td>The UUID of the archived email.</td></tr></tbody></table><h4 id="response-body-5" tabindex="-1">Response Body <a class="header-anchor" href="#response-body-5" aria-label="Permalink to &quot;Response Body&quot;"></a></h4><p>If a label was removed:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Label removed successfully.&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>If no label was applied:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;No label was applied to this email.&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="response-codes-3" tabindex="-1">Response Codes <a class="header-anchor" href="#response-codes-3" aria-label="Permalink to &quot;Response Codes&quot;"></a></h4><ul><li><strong><code>200 OK</code></strong> — Operation completed (regardless of whether a label was actually removed).</li><li><strong><code>500 Internal Server Error</code></strong> — Server error during processing.</li></ul><hr><h2 id="error-responses" tabindex="-1">Error Responses <a class="header-anchor" href="#error-responses" aria-label="Permalink to &quot;Error Responses&quot;"></a></h2><p>All endpoints use the standard error response format:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;status&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;error&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;statusCode&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">404</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;The requested resource could not be found.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;errors&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">null</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>For validation errors (<code>422 Unprocessable Entity</code>):</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;status&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;error&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;statusCode&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">422</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Invalid input provided.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;errors&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;field&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Name is required.&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;field&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;retentionPeriodDays&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Retention period must be at least 1 day.&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="validation-constraints" tabindex="-1">Validation Constraints <a class="header-anchor" href="#validation-constraints" aria-label="Permalink to &quot;Validation Constraints&quot;"></a></h2><table tabindex="0"><thead><tr><th>Field</th><th>Constraint</th></tr></thead><tbody><tr><td>Label name</td><td>1255 characters, must be unique.</td></tr><tr><td>Description</td><td>Max 1000 characters.</td></tr><tr><td>Retention period</td><td>Positive integer (≥ 1 day).</td></tr><tr><td>Label ID (UUID)</td><td>Must be a valid UUID format.</td></tr><tr><td>Email ID (UUID)</td><td>Must be a valid UUID format.</td></tr></tbody></table></div></div></main><footer class="VPDocFooter" data-v-29334b8c data-v-a014c1de><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-a014c1de><span class="visually-hidden" id="doc-footer-aria-label" data-v-a014c1de>Pager</span><div class="pager" data-v-a014c1de><!----></div><div class="pager" data-v-a014c1de><a class="VPLink link pager-link next" href="/" data-v-a014c1de><!--[--><span class="desc" data-v-a014c1de>Next page</span><span class="title" data-v-a014c1de>Get Started</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api_archived-email.md\":\"rYKCgF6R\",\"api_auth.md\":\"BqZ6wN0q\",\"api_authentication.md\":\"CyDXtQYg\",\"api_dashboard.md\":\"lu70c-Pf\",\"api_index.md\":\"DFnFK07E\",\"api_ingestion.md\":\"DEg9uMNX\",\"api_integrity.md\":\"CTx79Yjz\",\"api_jobs.md\":\"1HdD59Aa\",\"api_rate-limiting.md\":\"a1m1O0N8\",\"api_search.md\":\"B8tLtEbg\",\"api_storage.md\":\"DKUKvFrO\",\"enterprise_audit-log_api.md\":\"BVTisviS\",\"enterprise_audit-log_audit-service.md\":\"BSa897FH\",\"enterprise_audit-log_guide.md\":\"CV4dRt8z\",\"enterprise_audit-log_index.md\":\"D4TEa94R\",\"enterprise_legal-holds_api.md\":\"xP6l7CQu\",\"enterprise_legal-holds_guide.md\":\"DsFki0Hn\",\"enterprise_legal-holds_index.md\":\"CWzflEHq\",\"enterprise_retention-labels_api.md\":\"BJpAzeXZ\",\"enterprise_retention-labels_automated-tagging.md\":\"De51IDZa\",\"enterprise_retention-labels_guide.md\":\"B4l24_mE\",\"enterprise_retention-labels_index.md\":\"CEHW4ZzV\",\"enterprise_retention-policy_api.md\":\"Ckr2NfZT\",\"enterprise_retention-policy_guide.md\":\"8Z2IHE7k\",\"enterprise_retention-policy_index.md\":\"DhRhhJdZ\",\"enterprise_retention-policy_lifecycle-worker.md\":\"aIiHTLTp\",\"enterprise_retention-policy_retention-service.md\":\"CBFDkw6M\",\"index.md\":\"9PKJf5H1\",\"services_iam-service_iam-policy.md\":\"BMP46V9x\",\"services_index.md\":\"BLn224J3\",\"services_ocr-service.md\":\"aPypYfme\",\"services_storage-service.md\":\"Bgos1Y2E\",\"summary.md\":\"5seSND4L\",\"user-guides_email-providers_eml.md\":\"B7fhAxfE\",\"user-guides_email-providers_google-workspace.md\":\"BWo_12De\",\"user-guides_email-providers_imap.md\":\"DnuaRv-0\",\"user-guides_email-providers_index.md\":\"C3XNPTNj\",\"user-guides_email-providers_mbox.md\":\"C-4WurAJ\",\"user-guides_email-providers_microsoft-365.md\":\"QHHVfYxW\",\"user-guides_email-providers_pst.md\":\"DlBC8Tw1\",\"user-guides_installation.md\":\"CEe87Twk\",\"user-guides_integrity-check.md\":\"v2rGD4e_\",\"user-guides_settings_system.md\":\"DZw4puzm\",\"user-guides_troubleshooting_cors-errors.md\":\"DJT7M9F5\",\"user-guides_upgrade-and-migration_meilisearch-upgrade.md\":\"Cz8MshqK\",\"user-guides_upgrade-and-migration_upgrade.md\":\"DieppEdN\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Open Archiver Docs\",\"description\":\"Official documentation for the Open Archiver project.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"search\":{\"provider\":\"local\"},\"logo\":{\"src\":\"/logo-sq.svg\"},\"nav\":[{\"text\":\"Home\",\"link\":\"/\"},{\"text\":\"Github\",\"link\":\"https://github.com/LogicLabs-OU/OpenArchiver\"},{\"text\":\"Website\",\"link\":\"https://openarchiver.com/\"},{\"text\":\"Discord\",\"link\":\"https://discord.gg/MTtD7BhuTQ\"}],\"sidebar\":[{\"text\":\"User Guides\",\"items\":[{\"text\":\"Get Started\",\"link\":\"/\"},{\"text\":\"Installation\",\"link\":\"/user-guides/installation\"},{\"text\":\"Email Integrity Check\",\"link\":\"/user-guides/integrity-check\"},{\"text\":\"Email Providers\",\"link\":\"/user-guides/email-providers/\",\"collapsed\":true,\"items\":[{\"text\":\"Generic IMAP Server\",\"link\":\"/user-guides/email-providers/imap\"},{\"text\":\"Google Workspace\",\"link\":\"/user-guides/email-providers/google-workspace\"},{\"text\":\"Microsoft 365\",\"link\":\"/user-guides/email-providers/microsoft-365\"},{\"text\":\"EML Import\",\"link\":\"/user-guides/email-providers/eml\"},{\"text\":\"PST Import\",\"link\":\"/user-guides/email-providers/pst\"},{\"text\":\"Mbox Import\",\"link\":\"/user-guides/email-providers/mbox\"}]},{\"text\":\"Settings\",\"collapsed\":true,\"items\":[{\"text\":\"System\",\"link\":\"/user-guides/settings/system\"}]},{\"text\":\"Upgrading and Migration\",\"collapsed\":true,\"items\":[{\"text\":\"Upgrading\",\"link\":\"/user-guides/upgrade-and-migration/upgrade\"},{\"text\":\"Meilisearch Upgrade\",\"link\":\"/user-guides/upgrade-and-migration/meilisearch-upgrade\"}]}]},{\"text\":\"API Reference\",\"items\":[{\"text\":\"Overview\",\"link\":\"/api/\"},{\"text\":\"Authentication\",\"link\":\"/api/authentication\"},{\"text\":\"Rate Limiting\",\"link\":\"/api/rate-limiting\"},{\"text\":\"Auth\",\"link\":\"/api/auth\"},{\"text\":\"Archived Email\",\"link\":\"/api/archived-email\"},{\"text\":\"Dashboard\",\"link\":\"/api/dashboard\"},{\"text\":\"Ingestion\",\"link\":\"/api/ingestion\"},{\"text\":\"Integrity Check\",\"link\":\"/api/integrity\"},{\"text\":\"Search\",\"link\":\"/api/search\"},{\"text\":\"Storage\",\"link\":\"/api/storage\"},{\"text\":\"Jobs\",\"link\":\"/api/jobs\"}]},{\"text\":\"Services\",\"items\":[{\"text\":\"Overview\",\"link\":\"/services/\"},{\"text\":\"Storage Service\",\"link\":\"/services/storage-service\"},{\"text\":\"OCR Service\",\"link\":\"/services/ocr-service\"},{\"text\":\"IAM Service\",\"items\":[{\"text\":\"IAM Policies\",\"link\":\"/services/iam-service/iam-policy\"}]}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
</body>
</html>