Cipher keys encrypt the fields that streams mark as encrypted. Every key is a 32-byte AES-256-GCM key. MoleSignal wraps the key material with the root key from MS_CIPHER_KEY and never returns it. See Security.New encrypted values always use the latest version of the default key __field_default__, which MoleSignal creates when a stream first needs it. Other named keys, and the earlier versions of every key, keep decrypting the values written with those keys.
The list, get, create, and rotate calls return the metadata of key versions. The list returns every version of every key, newest version first within a name.
The body holds key_material_b64, as in the create call. The call adds a version with the new material and keeps the earlier versions for decryption. Rotating a name that does not exist answers 404. Create the key first with the create call.
Deletes every version of the named key and answers {"deleted": true}. A name that does not exist answers 404. The call does not check whether stored data still depends on the key.
Values that were encrypted with a deleted key cannot be decrypted again. Check the encrypted
fields that depend on a key before deleting it.
Generates new key material on the server, adds a new version of __field_default__, and refreshes the decryption cache right away. New writes use the new version, and existing values stay readable. When the organization has no default key yet, the call creates it as version 1. The body is empty, and the response holds the identifier and the version of the new key:
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MoleSignal Docs","colors":{"primary":"#4F60E0","light":"#7682EB","dark":"#4F60E0"},"logo":{"light":"https://mintcdn.com/molesignal/UnXfA35CHCHELzmM/logo/light.svg?fit=max\u0026auto=format\u0026n=UnXfA35CHCHELzmM\u0026q=85\u0026s=6e3e3e0f3b8ba46e45ee5745c25f2cc8","dark":"https://mintcdn.com/molesignal/UnXfA35CHCHELzmM/logo/dark.svg?fit=max\u0026auto=format\u0026n=UnXfA35CHCHELzmM\u0026q=85\u0026s=376388c184d497ee9fbc624ff3e9ac9c"},"favicon":"https://mintcdn.com/molesignal/UnXfA35CHCHELzmM/favicon.svg?fit=max\u0026auto=format\u0026n=UnXfA35CHCHELzmM\u0026q=85\u0026s=9fab08b2e902e6a0498d1adc065db457","navbar":{"links":[{"href":"https://www.molesignal.com","label":"MoleSignal"}],"primary":{"type":"button","label":"MoleSignal Cloud","href":"https://www.molesignal.com/cloud"}},"errors":{"404":{"redirect":false,"title":"Page not found · 页面未找到","description":"The page does not exist or has moved. Press Cmd/Ctrl + K to search, or start from one of these pages.\u003cbr />该页面不存在或已移动。按 Cmd/Ctrl + K 搜索,或从下面的页面开始。\n\n\u003cCardGroup cols={2}>\n \u003cCard title=\"Quickstart\" icon=\"rocket\" href=\"/en-US/quickstart\">Run MoleSignal locally.\u003c/Card>\n \u003cCard title=\"快速开始\" icon=\"rocket\" href=\"/zh-Hans/quickstart\">在本地运行 MoleSignal。\u003c/Card>\n \u003cCard title=\"Documentation home\" icon=\"book\" href=\"/en-US\">Browse every guide.\u003c/Card>\n \u003cCard title=\"文档首页\" icon=\"book\" href=\"/zh-Hans\">浏览全部指南。\u003c/Card>\n\u003c/CardGroup>"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"footer":{"socials":{"github":"https://github.com/molesignal/molesignal","discord":"https://discord.gg/JXG98xA6FH"},"links":[{"header":"Product","items":[{"label":"Quickstart","href":"/en-US/quickstart"},{"label":"Core concepts","href":"/en-US/concepts"},{"label":"Open source edition","href":"/en-US/editions/open-source"},{"label":"Enterprise","href":"/en-US/editions/enterprise"},{"label":"MoleSignal Cloud","href":"/en-US/editions/cloud"}]},{"header":"Developers","items":[{"label":"API reference","href":"/en-US/api-reference"},{"label":"Inbound MCP","href":"/en-US/inbound-mcp"},{"label":"Changelog","href":"/en-US/changelog"},{"label":"Releases","href":"https://github.com/molesignal/molesignal/releases"}]},{"header":"Support","items":[{"label":"Contact support","href":"mailto:[email protected]"},{"label":"Discord","href":"https://discord.gg/JXG98xA6FH"},{"label":"Report an issue","href":"https://github.com/molesignal/molesignal/issues"}]}]},"href":"en-US"},{"language":"zh-Hans","footer":{"socials":{"github":"https://github.com/molesignal/molesignal","discord":"https://discord.gg/JXG98xA6FH"},"links":[{"header":"产品","items":[{"label":"快速开始","href":"/zh-Hans/quickstart"},{"label":"核心概念","href":"/zh-Hans/concepts"},{"label":"开源版","href":"/zh-Hans/editions/open-source"},{"label":"Enterprise","href":"/zh-Hans/editions/enterprise"},{"label":"MoleSignal Cloud","href":"/zh-Hans/editions/cloud"}]},{"header":"开发者","items":[{"label":"API 参考","href":"/zh-Hans/api-reference"},{"label":"Inbound MCP","href":"/zh-Hans/inbound-mcp"},{"label":"更新日志","href":"/zh-Hans/changelog"},{"label":"版本发布","href":"https://github.com/molesignal/molesignal/releases"}]},{"header":"支持","items":[{"label":"联系支持","href":"mailto:[email protected]"},{"label":"Discord 社区","href":"https://discord.gg/JXG98xA6FH"},{"label":"反馈问题","href":"https://github.com/molesignal/molesignal/issues"}]}]},"href":"zh-Hans"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"molesignal","hasAudioNarration":false,"actualSubdomain":"molesignal","customDomains":["docs.molesignal.com"],"gitSource":{"type":"github","owner":"molesignal","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"collectionId":"ca1231ce-d240-4fce-b734-c1746886e3d6","liveDeploymentHistoryId":"6ae21e2426f5cd559eccf85f","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae21e2426f5cd559eccf85f"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae21e2426f5cd559eccf85f","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"en","tag":"User manual","count":93},{"language":"zh-Hans","tag":"用户手册","count":93},{"language":"en","tag":"API Reference","count":61},{"language":"zh-Hans","tag":"API 参考","count":61},{"language":"en","tag":"Observe","count":25},{"language":"zh-Hans","tag":"观察","count":25},{"language":"zh-Hans","tag":"告警","count":17},{"language":"en","tag":"RUM","count":16},{"language":"zh-Hans","tag":"用户体验","count":16},{"language":"en","tag":"Alerting","count":13},{"language":"en","tag":"Intake","count":11},{"language":"en","tag":"Best practices","count":11},{"language":"zh-Hans","tag":"数据采集","count":11},{"language":"zh-Hans","tag":"最佳实践","count":11},{"language":"en","tag":"Admin","count":10},{"language":"zh-Hans","tag":"管理","count":10},{"language":"zh-Hans","tag":"查询","count":10},{"language":"en","tag":"Get started","count":9},{"language":"en","tag":"Deploy \u0026 operate","count":9},{"language":"zh-Hans","tag":"部署与运维","count":9}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".method-nav-pill{width:auto!important;flex-shrink:0}.method-nav-pill>span{white-space:nowrap}@media (min-width:1024px){#sidebar{width:22rem!important}#content-area[class*=\"lg:pl-[23.7rem]\"]{padding-left:27.7rem!important}}#content>.card-group:last-child:has(>.card[role=link]){column-gap:2rem!important;row-gap:0!important;margin-top:1.5rem;padding-top:.75rem;border-top:1px solid rgb(var(--gray-200))}.dark #content>.card-group:last-child:has(>.card[role=link]){border-top-color:rgb(var(--gray-800))}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n){margin:0!important;border:0!important;border-radius:.5rem!important;background:0 0!important;box-shadow:none!important;overflow:visible}#content>.card[role=link]:last-child{margin-top:1rem!important}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ) [data-component-part=card-content-container]{padding:.75rem .5rem!important}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ) [data-component-part=card-icon]{display:none}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ) [data-component-part=card-title]{display:inline-flex;align-items:center;gap:.35rem;margin-top:0!important;color:rgb(var(--primary));font-size:.95rem;line-height:1.4}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ) [data-component-part=card-title]::after{content:\"→\";font-weight:400;transition:transform .15s ease}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ) [data-component-part=card-content]{margin-top:.15rem!important;font-size:.875rem;line-height:1.45}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n):hover{border-color:transparent!important;background:rgb(var(--primary)/.055)!important}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ):hover [data-component-part=card-title]{text-decoration:underline;text-underline-offset:.2em}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n ):hover [data-component-part=card-title]::after{transform:translateX(.15rem)}:is(\n #content > .card-group:last-child > .card[role=\"link\"],\n #content > .card[role=\"link\"]:last-child\n):focus-visible{outline:0!important;background:rgb(var(--primary)/.09)!important}@media (min-width:1280px){#content-area[class*=\"lg:pl-[23.7rem]\"]{width:calc(100% - 32rem)!important}:root{--ms-doc-width:108rem}[class*=\"peer-[.is-not-center]:max-w-8xl\"],[class~=max-w-8xl]{max-width:var(--ms-doc-width)!important}}#ms-sidebar-toggle{display:none}@media (min-width:1024px){#ms-sidebar-toggle{position:fixed;top:8rem;left:21rem;z-index:31;display:flex;align-items:center;justify-content:center;width:1.6rem;height:1.6rem;padding:0;border:1px solid rgba(0,0,0,.12);border-radius:9999px;background:var(--background-light, #ffffff);color:#475569;cursor:pointer;opacity:.45;transition:opacity .15s ease,background .15s ease,color .15s ease}#ms-sidebar-toggle:hover,html.ms-sb-hover #ms-sidebar-toggle{opacity:1}#ms-sidebar-toggle:hover{color:#1e293b;border-color:rgba(0,0,0,.22)}html.dark #ms-sidebar-toggle{background:#0f172a;border-color:rgba(255,255,255,.16);color:#94a3b8}html.dark #ms-sidebar-toggle:hover{color:#e2e8f0;border-color:rgba(255,255,255,.3)}#ms-sidebar-toggle svg,html.ms-sb-animating #sidebar{transition:transform .2s ease}html.ms-sb-animating #content-area{transition:padding-left .2s ease,width .2s ease}html.ms-sb-animating #ms-sidebar-toggle{transition:opacity .15s ease,left .2s ease,background .15s ease,color .15s ease}#navbar{transform:none!important;transition:none!important}html.ms-sidebar-collapsed #sidebar{transform:translateX(calc(-1*var(--ms-sb-shift, 26rem)))}html.ms-sidebar-collapsed #ms-sidebar-toggle{left:.4rem!important}html.ms-sidebar-collapsed #ms-sidebar-toggle svg{transform:rotate(180deg)}html.ms-sidebar-collapsed #content-area{padding-left:2.75rem!important;width:100%!important}}#navbar div:has(>#theme-preference-menu-trigger){display:none}#navbar nav li.navbar-link>a{padding:.5rem .75rem;border-radius:.75rem;box-shadow:inset 0 0 0 1px rgb(var(--gray-400)/.3);transition:background-color .15s ease}#navbar nav li.navbar-link>a:hover{background:rgb(var(--gray-400)/.12)}html.dark #navbar nav li.navbar-link>a{box-shadow:inset 0 0 0 1px rgb(255 255 255/.16)}html.dark #navbar nav li.navbar-link>a:hover{background:rgb(255 255 255/.06)}.nav-tag-pill:has(>[data-nav-tag~=cloud]),.nav-tag-pill:has(>[data-nav-tag~=enterprise]){gap:.25rem}.nav-tag-pill>[data-nav-tag~=cloud],.nav-tag-pill>[data-nav-tag~=enterprise]{display:none}.nav-tag-pill:has(>[data-nav-tag~=cloud])::after,.nav-tag-pill:has(>[data-nav-tag~=enterprise])::before{padding:.125rem .5rem;border-radius:9999px;background-color:rgb(var(--primary)/.1);color:rgb(var(--primary));font-size:.65rem;font-weight:700;line-height:.8125rem}html.dark .nav-tag-pill:has(>[data-nav-tag~=cloud])::after,html.dark .nav-tag-pill:has(>[data-nav-tag~=enterprise])::before{color:rgb(var(--primary-light))}.nav-tag-pill:has(>[data-nav-tag~=enterprise])::before{content:\"enterprise\"}.nav-tag-pill:has(>[data-nav-tag~=cloud])::after{content:\"cloud\"}"}],"page":{"pagePath":"en-US/api/admin/cipher-keys","slug":"/en-US/api/admin/cipher-keys","pageMetadata":{"title":"Cipher keys","description":"List, create, rotate, and delete the field-encryption keys of an organization.","zh-Hans_link":"/zh-Hans/api/admin/cipher-keys","href":"/en-US/api/admin/cipher-keys"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"List, create, rotate, and delete the field-encryption keys of an organization.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Cipher keys encrypt the fields that streams mark as encrypted. Every key is a 32-byte AES-256-GCM key. MoleSignal wraps the key material with the root key from `,_jsx(_components.code,{children:`MS_CIPHER_KEY`}),` and never returns it. See `,_jsx(_components.a,{href:`/en-US/security#field-level-encryption`,children:`Security`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`New encrypted values always use the latest version of the default key `,_jsx(_components.code,{children:`__field_default__`}),`, which MoleSignal creates when a stream first needs it. Other named keys, and the earlier versions of every key, keep decrypting the values written with those keys.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Operation`}),_jsx(_components.th,{children:`Endpoint`}),_jsx(_components.th,{children:`Permission`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`List keys`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/v1/cipher_keys`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.read`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Get a key`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/v1/cipher_keys/{name}`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.read`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Create a key`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /api/v1/cipher_keys`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.manage`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Rotate a key`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /api/v1/cipher_keys/{name}/rotate`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.manage`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Delete a key`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`DELETE /api/v1/cipher_keys/{name}`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.manage`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Rotate the default key`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /api/v1/field_encryption/rotate`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.manage`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`key-metadata`,children:`Key metadata`}),`\n`,_jsx(_components.p,{children:`The list, get, create, and rotate calls return the metadata of key versions. The list returns every version of every key, newest version first within a name.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3KEZizkQsvBwoWQihNO6OdxRiSf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"payments-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"alg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aes-256-gcm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at_micros\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1790000000000000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rotated_at_micros\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`rotated_at_micros`}),` is `,_jsx(_components.code,{children:`null`}),` for a key that was never rotated. The get call returns the latest version.`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-key`,children:`Create a key`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/cipher_keys`})]}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`name`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`The key name. A name that already exists answers `,_jsx(_components.code,{children:`409`}),`, and the message points to the rotate call.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`key_material_b64`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`32 random bytes in standard base64 with padding.`})]})]})]}),`\n`,`\n`,_jsx(_components.p,{children:`The response is the key metadata shown above.`}),`\n`,_jsx(Heading,{level:`2`,id:`rotate-a-key`,children:`Rotate a key`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/cipher_keys/{name}/rotate`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The body holds `,_jsx(_components.code,{children:`key_material_b64`}),`, as in the create call. The call adds a version with the new material and keeps the earlier versions for decryption. Rotating a name that does not exist answers `,_jsx(_components.code,{children:`404`}),`. Create the key first with the create call.`]}),`\n`,_jsx(Heading,{level:`2`,id:`delete-a-key`,children:`Delete a key`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`DELETE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/cipher_keys/{name}`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Deletes every version of the named key and answers `,_jsx(_components.code,{children:`{\"deleted\": true}`}),`. A name that does not exist answers `,_jsx(_components.code,{children:`404`}),`. The call does not check whether stored data still depends on the key.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Values that were encrypted with a deleted key cannot be decrypted again. Check the encrypted\nfields that depend on a key before deleting it.`})}),`\n`,_jsx(Heading,{level:`2`,id:`rotate-the-default-key`,children:`Rotate the default key`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/field_encryption/rotate`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Generates new key material on the server, adds a new version of `,_jsx(_components.code,{children:`__field_default__`}),`, and refreshes the decryption cache right away. New writes use the new version, and existing values stay readable. When the organization has no default key yet, the call creates it as version 1. The body is empty, and the response holds the identifier and the version of the new key:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"key_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3KEZj3uxMx5OOFX6NiYv3VFnfmD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Errors`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`key_material_b64`}),` is not valid base64 or does not decode to exactly 32 bytes (`,_jsx(_components.code,{children:`key_material must be 32 bytes, got 5`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`The token lacks the permission of the call.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:`The get, rotate, or delete call found no key with that name.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:`A key with that name already exists.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:`A required field is missing. The response is plain text.`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Cipher keys","description":"List, create, rotate, and delete the field-encryption keys of an organization.","zh-Hans_link":"/zh-Hans/api/admin/cipher-keys","href":"/en-US/api/admin/cipher-keys"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,RequestExample,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Cipher keys encrypt the fields that streams mark as encrypted. Every key is a 32-byte AES-256-GCM key. MoleSignal wraps the key material with the root key from `,_jsx(_components.code,{children:`MS_CIPHER_KEY`}),` and never returns it. See `,_jsx(_components.a,{href:`/en-US/security#field-level-encryption`,children:`Security`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`New encrypted values always use the latest version of the default key `,_jsx(_components.code,{children:`__field_default__`}),`, which MoleSignal creates when a stream first needs it. Other named keys, and the earlier versions of every key, keep decrypting the values written with those keys.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Operation`}),_jsx(_components.th,{children:`Endpoint`}),_jsx(_components.th,{children:`Permission`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`List keys`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/v1/cipher_keys`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.read`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Get a key`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/v1/cipher_keys/{name}`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.read`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Create a key`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /api/v1/cipher_keys`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.manage`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Rotate a key`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /api/v1/cipher_keys/{name}/rotate`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.manage`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Delete a key`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`DELETE /api/v1/cipher_keys/{name}`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.manage`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Rotate the default key`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /api/v1/field_encryption/rotate`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`org.settings.manage`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`key-metadata`,children:`Key metadata`}),`\n`,_jsx(_components.p,{children:`The list, get, create, and rotate calls return the metadata of key versions. The list returns every version of every key, newest version first within a name.`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3KEZizkQsvBwoWQihNO6OdxRiSf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"payments-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"alg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"aes-256-gcm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at_micros\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1790000000000000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rotated_at_micros\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`rotated_at_micros`}),` is `,_jsx(_components.code,{children:`null`}),` for a key that was never rotated. The get call returns the latest version.`]}),`\n`,_jsx(Heading,{level:`2`,id:`create-a-key`,children:`Create a key`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/cipher_keys`})]}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Notes`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`name`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`The key name. A name that already exists answers `,_jsx(_components.code,{children:`409`}),`, and the message points to the rotate call.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`key_material_b64`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:`32 random bytes in standard base64 with padding.`})]})]})]}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` http://localhost:5080/api/v1/cipher_keys`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MS_JWT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'content-type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`payments-key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`key_material_b64`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rand `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`-base64`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 32`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}\"`})]}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`The response is the key metadata shown above.`}),`\n`,_jsx(Heading,{level:`2`,id:`rotate-a-key`,children:`Rotate a key`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/cipher_keys/{name}/rotate`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The body holds `,_jsx(_components.code,{children:`key_material_b64`}),`, as in the create call. The call adds a version with the new material and keeps the earlier versions for decryption. Rotating a name that does not exist answers `,_jsx(_components.code,{children:`404`}),`. Create the key first with the create call.`]}),`\n`,_jsx(Heading,{level:`2`,id:`delete-a-key`,children:`Delete a key`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`DELETE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/cipher_keys/{name}`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Deletes every version of the named key and answers `,_jsx(_components.code,{children:`{\"deleted\": true}`}),`. A name that does not exist answers `,_jsx(_components.code,{children:`404`}),`. The call does not check whether stored data still depends on the key.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Values that were encrypted with a deleted key cannot be decrypted again. Check the encrypted\nfields that depend on a key before deleting it.`})}),`\n`,_jsx(Heading,{level:`2`,id:`rotate-the-default-key`,children:`Rotate the default key`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /api/v1/field_encryption/rotate`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Generates new key material on the server, adds a new version of `,_jsx(_components.code,{children:`__field_default__`}),`, and refreshes the decryption cache right away. New writes use the new version, and existing values stay readable. When the organization has no default key yet, the call creates it as version 1. The body is empty, and the response holds the identifier and the version of the new key:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"key_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3KEZj3uxMx5OOFX6NiYv3VFnfmD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Errors`})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Cause`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`key_material_b64`}),` is not valid base64 or does not decode to exactly 32 bytes (`,_jsx(_components.code,{children:`key_material must be 32 bytes, got 5`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`The token lacks the permission of the call.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`404`})}),_jsx(_components.td,{children:`The get, rotate, or delete call found no key with that name.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`409`})}),_jsx(_components.td,{children:`A key with that name already exists.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`422`})}),_jsx(_components.td,{children:`A required field is missing. The response is plain text.`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Cipher keys","description":"List, create, rotate, and delete the field-encryption keys of an organization.","zh-Hans_link":"/zh-Hans/api/admin/cipher-keys","href":"/en-US/api/admin/cipher-keys"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Key metadata","slug":"key-metadata","depth":2,"children":[]},{"title":"Create a key","slug":"create-a-key","depth":2,"children":[]},{"title":"Rotate a key","slug":"rotate-a-key","depth":2,"children":[]},{"title":"Delete a key","slug":"delete-a-key","depth":2,"children":[]},{"title":"Rotate the default key","slug":"rotate-the-default-key","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> http://localhost:5080/api/v1/cipher_keys\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"authorization: Bearer \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$MS_JWT\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'content-type: application/json'\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"{\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\">\\\"\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">name\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\">\\\"\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">: \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\">\\\"\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">payments-key\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\">\\\"\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">, \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\">\\\"\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">key_material_b64\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\">\\\"\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">: \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\">\\\"\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">$(\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">openssl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> rand \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">-base64\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 32\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">)\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\">\\\"\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">}\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":["/_mintlify/custom/molesignal/088d4254bf118609/sidebar-toggle.js","/_mintlify/custom/molesignal/9aa78e29f544e029/changelog.js"],"subdomain":"molesignal","siteName":"MoleSignal Docs","title":"Cipher keys - MoleSignal Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/en-US/api/admin/cipher-keys","matchLevel":0},"zh-Hans":{"href":"/zh-Hans","matchLevel":4}}},"lastModified":"2026-10-09T12:43:49.221Z","gitLastModified":"2026-10-09T12:43:20.000Z","originalFileLocation":"en-US/api/admin/cipher-keys.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"List, create, rotate, and delete the field-encryption keys of an organization.\">\u003cmeta data-mint-head name=\"application-name\" content=\"MoleSignal Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cipher keys - MoleSignal Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"List, create, rotate, and delete the field-encryption keys of an organization.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MoleSignal Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.molesignal.com/en-US/api/admin/cipher-keys\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://molesignal.mintlify.app/_mintlify/api/og/v2?division=Platform+%26+Administration\u0026amp;title=Cipher+keys\u0026amp;description=List%2C+create%2C+rotate%2C+and+delete+the+field-encryption+keys+of+an+organization.\u0026amp;theme=9d4f83486269bebf1dbda005\u0026amp;signature=50750a5fdee0286fa7aab770f4f0457cdc2deec732d777b02632022a3d748c94\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Cipher keys - MoleSignal Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"List, create, rotate, and delete the field-encryption keys of an organization.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://molesignal.mintlify.app/_mintlify/api/og/v2?division=Platform+%26+Administration\u0026amp;title=Cipher+keys\u0026amp;description=List%2C+create%2C+rotate%2C+and+delete+the+field-encryption+keys+of+an+organization.\u0026amp;theme=9d4f83486269bebf1dbda005\u0026amp;signature=50750a5fdee0286fa7aab770f4f0457cdc2deec732d777b02632022a3d748c94\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/molesignal/_EFYdYuW8og8mB-1/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MoleSignal Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4F60E0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.molesignal.com/en-US/api/admin/cipher-keys\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en-US/api/admin/cipher-keys.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.molesignal.com/en-US/api/admin/cipher-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://docs.molesignal.com/zh-Hans/api/admin/cipher-keys\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.molesignal.com/en-US/api/admin/cipher-keys\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.molesignal.com/#organization\",\"name\":\"MoleSignal Docs\",\"url\":\"https://docs.molesignal.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/molesignal/UnXfA35CHCHELzmM/logo/light.svg?fit=max\u0026auto=format\u0026n=UnXfA35CHCHELzmM\u0026q=85\u0026s=6e3e3e0f3b8ba46e45ee5745c25f2cc8\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.molesignal.com#website\",\"name\":\"MoleSignal Docs\",\"url\":\"https://docs.molesignal.com\",\"publisher\":{\"@id\":\"https://docs.molesignal.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.molesignal.com/en-US/api/admin/cipher-keys#webpage\",\"url\":\"https://docs.molesignal.com/en-US/api/admin/cipher-keys\",\"name\":\"Cipher keys\",\"description\":\"List, create, rotate, and delete the field-encryption keys of an organization.\",\"dateModified\":\"2026-10-09T12:43:20.000Z\",\"isPartOf\":{\"@id\":\"https://docs.molesignal.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.molesignal.com/en-US/api/admin/cipher-keys#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.molesignal.com/en-US/api/admin/cipher-keys#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Platform \u0026 Administration\",\"item\":\"https://docs.molesignal.com/en-US/api/admin/audit\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cipher keys\",\"item\":\"https://docs.molesignal.com/en-US/api/admin/cipher-keys\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.molesignal.com/en-US/api/admin/cipher-keys#article\",\"headline\":\"Cipher keys\",\"name\":\"Cipher keys\",\"description\":\"List, create, rotate, and delete the field-encryption keys of an organization.\",\"url\":\"https://docs.molesignal.com/en-US/api/admin/cipher-keys\",\"mainEntityOfPage\":{\"@id\":\"https://docs.molesignal.com/en-US/api/admin/cipher-keys#webpage\"},\"dateModified\":\"2026-10-09T12:43:20.000Z\",\"publisher\":{\"@id\":\"https://docs.molesignal.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.molesignal.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"MoleSignal Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"MoleSignal Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"footer":{"socials":{"github":"https://github.com/molesignal/molesignal","discord":"https://discord.gg/JXG98xA6FH"},"links":[{"header":"Product","items":[{"label":"Quickstart","href":"/en-US/quickstart"},{"label":"Core concepts","href":"/en-US/concepts"},{"label":"Open source edition","href":"/en-US/editions/open-source"},{"label":"Enterprise","href":"/en-US/editions/enterprise"},{"label":"MoleSignal Cloud","href":"/en-US/editions/cloud"}]},{"header":"Developers","items":[{"label":"API reference","href":"/en-US/api-reference"},{"label":"Inbound MCP","href":"/en-US/inbound-mcp"},{"label":"Changelog","href":"/en-US/changelog"},{"label":"Releases","href":"https://github.com/molesignal/molesignal/releases"}]},{"header":"Support","items":[{"label":"Contact support","href":"mailto:[email protected]"},{"label":"Discord","href":"https://discord.gg/JXG98xA6FH"},{"label":"Report an issue","href":"https://github.com/molesignal/molesignal/issues"}]}]},"tabs":[{"tab":"User manual","pages":[{"title":"User manual","href":"/en-US"}]},{"tab":"Enterprise \u0026 Cloud","pages":[{"title":"Enterprise \u0026 Cloud","href":"/en-US/editions/iceberg-rest-catalog"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/en-US/cli"}]},{"tab":"API Reference","groups":[{"group":"Overview","pages":[{"title":"API introduction","href":"/en-US/api-reference"},{"title":"API catalog","href":"/en-US/api/catalog"}]},{"group":"Authentication","pages":[{"title":"Log in","href":"/en-US/api/auth/login"},{"title":"Select a workspace","href":"/en-US/api/auth/select-organization"},{"title":"Issue an API token","href":"/en-US/api/auth/issue-token"},{"title":"List API tokens","href":"/en-US/api/auth/list-tokens"},{"title":"Revoke an API token","href":"/en-US/api/auth/revoke-token"},{"title":"Default intake token","href":"/en-US/api/auth/default-token"},{"title":"RUM client token","href":"/en-US/api/auth/rum-token"},{"title":"Rotate JWT signing keys","href":"/en-US/api/auth/rotate-jwt"}]},{"group":"Intake","pages":[{"title":"Native JSON intake","href":"/en-US/api/intake/native-json"},{"title":"OpenTelemetry (OTLP)","href":"/en-US/api/intake/otlp"},{"title":"Prometheus remote_write","href":"/en-US/api/intake/prometheus"},{"title":"Elasticsearch _bulk","href":"/en-US/api/intake/elasticsearch"},{"title":"Loki push","href":"/en-US/api/intake/loki"},{"title":"Kinesis Firehose","href":"/en-US/api/intake/kinesis"},{"title":"Cloudflare Logpush","href":"/en-US/api/intake/cloudflare"},{"title":"Heroku log drain","href":"/en-US/api/intake/heroku"},{"title":"Create a function","href":"/en-US/api/intake/create-function"},{"title":"Create a pipeline","href":"/en-US/api/intake/create-pipeline"},{"title":"Manage pipelines","href":"/en-US/api/intake/scheduled-pipelines"}]},{"group":"Query","pages":[{"title":"Execute a query","href":"/en-US/api/query/execute"},{"title":"Streamed query","href":"/en-US/api/query/streamed"},{"title":"Search around an event","href":"/en-US/api/query/search-around"},{"title":"List saved views","href":"/en-US/api/query/list-saved-views"},{"title":"Create a saved view","href":"/en-US/api/query/create-saved-view"},{"title":"Run a saved view","href":"/en-US/api/query/run-saved-view"},{"title":"Create a dashboard","href":"/en-US/api/query/create-dashboard"},{"title":"Create a folder","href":"/en-US/api/query/create-folder"}]},{"group":"APM","pages":[{"title":"APM API","href":"/en-US/api/apm"}]},{"group":"RUM","pages":[{"title":"RUM API","href":"/en-US/api/rum"}]},{"group":"Streams","pages":[{"title":"List streams","href":"/en-US/api/streams/list"},{"title":"Create a stream","href":"/en-US/api/streams/create"},{"title":"Get a stream","href":"/en-US/api/streams/get"},{"title":"Delete a stream","href":"/en-US/api/streams/delete"},{"title":"Configure field indexes","href":"/en-US/api/streams/edit-schema"},{"title":"Edit retention and settings","href":"/en-US/api/streams/edit-retention"},{"title":"Stream runtime","href":"/en-US/api/streams/runtime"}]},{"group":"Alerting","pages":[{"title":"List rules","href":"/en-US/api/alerting/list-rules"},{"title":"Create a rule","href":"/en-US/api/alerting/create-rule"},{"title":"Update a rule","href":"/en-US/api/alerting/update-rule"},{"title":"Delete a rule","href":"/en-US/api/alerting/delete-rule"},{"title":"Test a rule","href":"/en-US/api/alerting/test-rule"},{"title":"Trigger a rule","href":"/en-US/api/alerting/trigger-rule"},{"title":"Create an escalation policy","href":"/en-US/api/alerting/create-escalation"},{"title":"Manage notification connectors","href":"/en-US/api/alerting/create-channel"},{"title":"List incidents","href":"/en-US/api/alerting/list-incidents"},{"title":"Acknowledge an incident","href":"/en-US/api/alerting/ack-incident"},{"title":"Resolve an incident","href":"/en-US/api/alerting/resolve-incident"},{"title":"Root cause analysis","href":"/en-US/api/alerting/incident-rca"},{"title":"Incident insights","href":"/en-US/api/alerting/insights"}]},{"group":"Correlation \u0026 Web","pages":[{"title":"Cross-signal correlation","href":"/en-US/api/web/correlation"},{"title":"Command palette search","href":"/en-US/api/web/search"},{"title":"Service topology","href":"/en-US/api/web/topology"},{"title":"Service graph edges","href":"/en-US/api/web/service-graph"},{"title":"Trace list and details","href":"/en-US/api/web/trace"},{"title":"Store investigation stack","href":"/en-US/api/web/store-investigation"},{"title":"Fetch investigation stack","href":"/en-US/api/web/fetch-investigation"}]},{"group":"Platform \u0026 Administration","pages":[{"title":"Audit log","description":"Query the audit trail of sensitive operations.","href":"/en-US/api/admin/audit"},{"title":"Cipher keys","href":"/en-US/api/admin/cipher-keys"},{"title":"Health \u0026 metrics","description":"Liveness, readiness, version, and Prometheus metrics endpoints.","href":"/en-US/api/admin/health"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/en-US/changelog"}]}]},{"language":"zh-Hans","footer":{"socials":{"github":"https://github.com/molesignal/molesignal","discord":"https://discord.gg/JXG98xA6FH"},"links":[{"header":"产品","items":[{"label":"快速开始","href":"/zh-Hans/quickstart"},{"label":"核心概念","href":"/zh-Hans/concepts"},{"label":"开源版","href":"/zh-Hans/editions/open-source"},{"label":"Enterprise","href":"/zh-Hans/editions/enterprise"},{"label":"MoleSignal Cloud","href":"/zh-Hans/editions/cloud"}]},{"header":"开发者","items":[{"label":"API 参考","href":"/zh-Hans/api-reference"},{"label":"Inbound MCP","href":"/zh-Hans/inbound-mcp"},{"label":"更新日志","href":"/zh-Hans/changelog"},{"label":"版本发布","href":"https://github.com/molesignal/molesignal/releases"}]},{"header":"支持","items":[{"label":"联系支持","href":"mailto:[email protected]"},{"label":"Discord 社区","href":"https://discord.gg/JXG98xA6FH"},{"label":"反馈问题","href":"https://github.com/molesignal/molesignal/issues"}]}]},"pages":[{"title":"zh-Hans","href":"/zh-Hans"}]}]},"title":"Cipher keys - MoleSignal Docs","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":["2b790eda92"],"chunks":["ApiExamples-CgXVLxUC.js","utils-BHQqGGOd.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","cloneDeep-izs3Hzxb.js","utils-CD-E4BIt.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BF8I5oUf.js","shallow-Byd0lWnC.js","snippetPresets-C4xAVCFP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","getApiPlaygroundDisplay-BGOZG1OK.js","CodeSnippet-CpvQL0CY.js","CodeSnippets-B8wkBKXa.js"]}