CINXE.COM
Lexicon - AT Protocol
<!DOCTYPE html><html lang="en" class="h-full"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/786ca9324488b5df.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-496a37b6c26ccd6a.js"/><script src="/_next/static/chunks/fd9d1056-ae1d3d1d803e2e5a.js" async=""></script><script src="/_next/static/chunks/117-545f1187d7f142b2.js" async=""></script><script src="/_next/static/chunks/main-app-3122dc718821276f.js" async=""></script><script src="/_next/static/chunks/972-f3553dcbba031b91.js" async=""></script><script src="/_next/static/chunks/135-8f28b0a70a96c388.js" async=""></script><script src="/_next/static/chunks/212-67e821188dcd5fb8.js" async=""></script><script src="/_next/static/chunks/app/%5Blocale%5D/specs/lexicon/page-16a586175a6aa53a.js" async=""></script><script src="/_next/static/chunks/28-313384c6289a00c0.js" async=""></script><script src="/_next/static/chunks/369-a583bbb81b96a7d8.js" async=""></script><script src="/_next/static/chunks/60-3e1824554a9cf3f8.js" async=""></script><script src="/_next/static/chunks/app/%5Blocale%5D/layout-8706067c5d993875.js" async=""></script><title>Lexicon - AT Protocol</title><meta name="description" content="A schema definition language."/><meta property="og:title" content="Lexicon - AT Protocol"/><meta property="og:description" content="A schema definition language."/><meta property="og:url" content="https://atproto.com/"/><meta property="og:site_name" content="AT Protocol"/><meta property="og:image" content="https://atproto.com/default-social-card.png"/><meta property="og:image:secure_url" content="https://atproto.com/default-social-card.png"/><meta property="og:image:width" content="1200"/><meta property="og:image:height" content="630"/><meta property="og:type" content="website"/><meta name="twitter:card" content="summary_large_image"/><meta name="twitter:title" content="Lexicon - AT Protocol"/><meta name="twitter:description" content="A schema definition language."/><meta name="twitter:image" content="https://atproto.com/default-social-card.png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="flex min-h-full bg-white antialiased dark:bg-zinc-900"><script>!function(){try{var d=document.documentElement,c=d.classList;c.remove('light','dark');var e=localStorage.getItem('theme');if('system'===e||(!e&&true)){var t='(prefers-color-scheme: dark)',m=window.matchMedia(t);if(m.media!==t||m.matches){d.style.colorScheme = 'dark';c.add('dark')}else{d.style.colorScheme = 'light';c.add('light')}}else if(e){c.add(e|| '')}if(e==='light'||e==='dark')d.style.colorScheme=e}catch(e){}}()</script><div class="w-full"><div class="h-full lg:ml-72 xl:ml-80"><header class="contents lg:pointer-events-none lg:fixed lg:inset-0 lg:z-40 lg:flex"><div class="contents lg:pointer-events-auto lg:block lg:w-72 lg:overflow-y-auto lg:border-r lg:border-zinc-900/10 lg:px-6 lg:pb-8 lg:pt-4 xl:w-80 lg:dark:border-white/10"><div class="hidden lg:flex"><a aria-label="Home" href="/"><svg viewBox="0 0 162 28" aria-hidden="true" class="h-6"><path class="fill-blue-500" d="M14.362 27.78c-1.956 0-3.756-.324-5.4-.972-1.644-.648-3.072-1.566-4.284-2.754a12.247 12.247 0 0 1-2.808-4.158c-.66-1.596-.99-3.33-.99-5.202 0-2.232.342-4.212 1.026-5.94.696-1.728 1.656-3.18 2.88-4.356a12.48 12.48 0 0 1 4.284-2.7c1.632-.612 3.378-.918 5.238-.918 2.28 0 4.278.354 5.994 1.062 1.716.708 3.144 1.668 4.284 2.88a11.706 11.706 0 0 1 2.538 4.158c.552 1.548.804 3.168.756 4.86-.06 2.328-.546 4.116-1.458 5.364-.912 1.236-2.328 1.854-4.248 1.854a5.839 5.839 0 0 1-2.826-.702 3.703 3.703 0 0 1-1.764-2.07l1.044.054c-.492.924-1.164 1.572-2.016 1.944a6.464 6.464 0 0 1-2.61.558c-1.212 0-2.28-.258-3.204-.774a5.682 5.682 0 0 1-2.178-2.214c-.528-.948-.792-2.046-.792-3.294 0-1.284.276-2.394.828-3.33a5.77 5.77 0 0 1 2.232-2.196c.936-.516 1.992-.774 3.168-.774.78 0 1.59.162 2.43.486.852.324 1.512.78 1.98 1.368l-.738.936V8.664h2.412l-.054 6.462c0 .924.18 1.62.54 2.088.36.468.894.702 1.602.702.624 0 1.104-.174 1.44-.522.348-.36.588-.846.72-1.458a10.66 10.66 0 0 0 .252-2.106c.036-1.86-.24-3.426-.828-4.698-.588-1.272-1.386-2.298-2.394-3.078a9.499 9.499 0 0 0-3.294-1.71c-1.2-.36-2.394-.54-3.582-.54-1.68 0-3.174.27-4.482.81-1.308.528-2.412 1.278-3.312 2.25-.888.96-1.56 2.1-2.016 3.42-.444 1.308-.654 2.748-.63 4.32.048 1.56.33 2.964.846 4.212a9.324 9.324 0 0 0 2.16 3.204 9.38 9.38 0 0 0 3.276 2.034c1.26.468 2.64.702 4.14.702.84 0 1.674-.096 2.502-.288.84-.18 1.608-.438 2.304-.774l1.026 2.808c-.924.432-1.896.75-2.916.954a14.649 14.649 0 0 1-3.078.324Zm-.144-10.098c.852 0 1.566-.246 2.142-.738.576-.492.864-1.326.864-2.502 0-1.068-.258-1.872-.774-2.412-.504-.552-1.218-.828-2.142-.828-1.092 0-1.908.288-2.448.864-.54.576-.81 1.368-.81 2.376 0 1.032.276 1.83.828 2.394.564.564 1.344.846 2.34.846Z"></path><path class="fill-blue-600 dark:fill-blue-500" d="M51.799 7.813V5.545h13.509v2.268H59.86V23h-2.624V7.812h-5.438ZM39.392 23h-2.795l6.28-17.455h3.043L52.203 23h-2.796L44.472 8.716h-.137L39.392 23Zm.469-6.835h9.068v2.216h-9.068v-2.216Z"></path><path class="fill-zinc-700 dark:fill-zinc-400" d="M161.144 5.545V23h-2.548V5.545h2.548ZM149.649 23.264c-1.227 0-2.298-.281-3.213-.843-.915-.563-1.625-1.35-2.131-2.361-.505-1.012-.758-2.194-.758-3.546 0-1.358.253-2.545.758-3.562.506-1.017 1.216-1.807 2.131-2.37.915-.562 1.986-.843 3.213-.843s2.298.28 3.213.843 1.625 1.353 2.131 2.37c.506 1.017.758 2.204.758 3.562 0 1.352-.252 2.534-.758 3.546-.506 1.011-1.216 1.798-2.131 2.36-.915.563-1.986.844-3.213.844Zm.009-2.139c.795 0 1.454-.21 1.977-.63.523-.421.909-.98 1.159-1.68.256-.699.384-1.468.384-2.31 0-.834-.128-1.602-.384-2.3-.25-.705-.636-1.27-1.159-1.697-.523-.426-1.182-.639-1.977-.639-.801 0-1.466.213-1.995.64-.522.426-.912.991-1.167 1.695a6.789 6.789 0 0 0-.375 2.302c0 .84.125 1.61.375 2.31.255.698.645 1.258 1.167 1.678.529.42 1.194.631 1.995.631ZM136.032 23.264c-1.267 0-2.358-.287-3.273-.86-.909-.58-1.608-1.378-2.096-2.395-.489-1.018-.733-2.182-.733-3.495 0-1.33.25-2.503.75-3.52.5-1.022 1.204-1.82 2.113-2.395.909-.573 1.98-.86 3.213-.86.995 0 1.881.184 2.659.554a4.764 4.764 0 0 1 1.884 1.534c.483.659.77 1.429.861 2.31h-2.48a2.974 2.974 0 0 0-.938-1.586c-.483-.443-1.13-.665-1.943-.665-.71 0-1.332.188-1.866.563-.529.37-.941.898-1.236 1.585-.296.682-.443 1.489-.443 2.42 0 .955.144 1.779.434 2.472.29.693.699 1.23 1.227 1.61.535.382 1.162.572 1.884.572.483 0 .92-.088 1.313-.264.397-.182.73-.44.997-.776.272-.335.463-.739.571-1.21h2.48a4.823 4.823 0 0 1-.827 2.267 4.76 4.76 0 0 1-1.849 1.568c-.767.38-1.668.571-2.702.571ZM121.571 23.264c-1.227 0-2.298-.281-3.213-.843-.915-.563-1.625-1.35-2.131-2.361-.505-1.012-.758-2.194-.758-3.546 0-1.358.253-2.545.758-3.562.506-1.017 1.216-1.807 2.131-2.37.915-.562 1.986-.843 3.213-.843s2.298.28 3.213.843 1.625 1.353 2.131 2.37c.505 1.017.758 2.204.758 3.562 0 1.352-.253 2.534-.758 3.546-.506 1.011-1.216 1.798-2.131 2.36-.915.563-1.986.844-3.213.844Zm.009-2.139c.795 0 1.454-.21 1.977-.63.523-.421.909-.98 1.159-1.68.256-.699.383-1.468.383-2.31 0-.834-.127-1.602-.383-2.3-.25-.705-.636-1.27-1.159-1.697-.523-.426-1.182-.639-1.977-.639-.802 0-1.466.213-1.995.64-.522.426-.912.991-1.167 1.695a6.789 6.789 0 0 0-.375 2.302c0 .84.125 1.61.375 2.31.255.698.645 1.258 1.167 1.678.529.42 1.193.631 1.995.631ZM113.379 9.91v2.044h-7.151V9.91h7.151Zm-5.233-3.137h2.548v12.383c0 .495.074.867.221 1.117.148.244.339.412.572.503.238.085.497.127.775.127.205 0 .384-.014.537-.042l.358-.068.46 2.105a4.307 4.307 0 0 1-.63.17 4.992 4.992 0 0 1-1.023.102 4.483 4.483 0 0 1-1.875-.358 3.208 3.208 0 0 1-1.406-1.159c-.358-.522-.537-1.179-.537-1.968V6.773ZM98.321 23.264c-1.227 0-2.298-.281-3.213-.843-.915-.563-1.625-1.35-2.13-2.361-.506-1.012-.76-2.194-.76-3.546 0-1.358.254-2.545.76-3.562.505-1.017 1.215-1.807 2.13-2.37.915-.562 1.986-.843 3.213-.843s2.298.28 3.213.843 1.625 1.353 2.131 2.37c.505 1.017.758 2.204.758 3.562 0 1.352-.253 2.534-.758 3.546-.506 1.011-1.216 1.798-2.131 2.36-.915.563-1.986.844-3.213.844Zm.008-2.139c.796 0 1.455-.21 1.978-.63.523-.421.909-.98 1.159-1.68.256-.699.383-1.468.383-2.31 0-.834-.127-1.602-.383-2.3-.25-.705-.636-1.27-1.159-1.697-.523-.426-1.182-.639-1.978-.639-.8 0-1.465.213-1.994.64-.522.426-.912.991-1.167 1.695a6.789 6.789 0 0 0-.375 2.302c0 .84.125 1.61.375 2.31.255.698.644 1.258 1.167 1.678.529.42 1.193.631 1.995.631ZM84.065 23V9.91h2.463v2.079h.136a3.164 3.164 0 0 1 1.261-1.662 3.61 3.61 0 0 1 2.063-.614 10.896 10.896 0 0 1 1.082.06v2.437a4.577 4.577 0 0 0-.545-.094 5.202 5.202 0 0 0-.784-.06c-.603 0-1.14.129-1.611.384a2.85 2.85 0 0 0-1.517 2.566V23h-2.548ZM68.918 23V5.545h6.221c1.358 0 2.483.248 3.375.742.892.494 1.56 1.17 2.003 2.028.443.853.665 1.813.665 2.881 0 1.074-.225 2.04-.674 2.898-.443.852-1.113 1.528-2.01 2.028-.893.494-2.015.742-3.367.742h-4.279V14.63h4.04c.858 0 1.554-.148 2.088-.444.534-.3.926-.71 1.176-1.227.25-.517.375-1.105.375-1.764 0-.66-.125-1.244-.375-1.756-.25-.511-.645-.912-1.184-1.201-.534-.29-1.239-.435-2.114-.435h-3.307V23h-2.633Z"></path></svg></a></div><div class="fixed inset-x-0 top-0 z-50 flex h-14 items-center justify-between gap-12 px-4 transition sm:px-6 lg:left-72 lg:z-30 lg:px-8 xl:left-80 backdrop-blur-sm lg:left-72 xl:left-80 dark:backdrop-blur bg-white/[var(--bg-opacity-light)] dark:bg-zinc-900/[var(--bg-opacity-dark)]" style="--bg-opacity-light:0.5;--bg-opacity-dark:0.2"><div class="absolute inset-x-0 top-full h-px transition bg-zinc-900/7.5 dark:bg-white/7.5"></div><div class="hidden lg:block lg:max-w-md lg:flex-auto"><button type="button" class="hidden h-8 w-full items-center gap-2 rounded-full bg-white pl-2 pr-3 text-sm text-zinc-500 ring-1 ring-zinc-900/10 transition hover:ring-zinc-900/20 ui-not-focus-visible:outline-none lg:flex dark:bg-white/5 dark:text-zinc-400 dark:ring-inset dark:ring-white/10 dark:hover:ring-white/20"><svg viewBox="0 0 20 20" fill="none" aria-hidden="true" class="h-5 w-5 stroke-current"><path stroke-linecap="round" stroke-linejoin="round" d="M12.01 12a4.25 4.25 0 1 0-6.02-6 4.25 4.25 0 0 0 6.02 6Zm0 0 3.24 3.25"></path></svg>Find something...<kbd class="ml-auto text-2xs text-zinc-400 dark:text-zinc-500"><kbd class="font-sans"></kbd><kbd class="font-sans">K</kbd></kbd></button><!--$--><span hidden="" style="position:fixed;top:1px;left:1px;width:1px;height:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;display:none"></span><!--/$--></div><div class="flex items-center gap-5 lg:hidden"><button type="button" class="flex h-6 w-6 items-center justify-center rounded-md transition hover:bg-zinc-900/5 dark:hover:bg-white/5" aria-label="Toggle navigation"><svg viewBox="0 0 10 9" fill="none" stroke-linecap="round" aria-hidden="true" class="w-2.5 stroke-zinc-900 dark:stroke-white"><path d="M.5 1h9M.5 8h9M.5 4.5h9"></path></svg></button><!--$--><span hidden="" style="position:fixed;top:1px;left:1px;width:1px;height:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;display:none"></span><!--/$--><a aria-label="Home" href="/"><svg viewBox="0 0 162 28" aria-hidden="true" class="h-6"><path class="fill-blue-500" d="M14.362 27.78c-1.956 0-3.756-.324-5.4-.972-1.644-.648-3.072-1.566-4.284-2.754a12.247 12.247 0 0 1-2.808-4.158c-.66-1.596-.99-3.33-.99-5.202 0-2.232.342-4.212 1.026-5.94.696-1.728 1.656-3.18 2.88-4.356a12.48 12.48 0 0 1 4.284-2.7c1.632-.612 3.378-.918 5.238-.918 2.28 0 4.278.354 5.994 1.062 1.716.708 3.144 1.668 4.284 2.88a11.706 11.706 0 0 1 2.538 4.158c.552 1.548.804 3.168.756 4.86-.06 2.328-.546 4.116-1.458 5.364-.912 1.236-2.328 1.854-4.248 1.854a5.839 5.839 0 0 1-2.826-.702 3.703 3.703 0 0 1-1.764-2.07l1.044.054c-.492.924-1.164 1.572-2.016 1.944a6.464 6.464 0 0 1-2.61.558c-1.212 0-2.28-.258-3.204-.774a5.682 5.682 0 0 1-2.178-2.214c-.528-.948-.792-2.046-.792-3.294 0-1.284.276-2.394.828-3.33a5.77 5.77 0 0 1 2.232-2.196c.936-.516 1.992-.774 3.168-.774.78 0 1.59.162 2.43.486.852.324 1.512.78 1.98 1.368l-.738.936V8.664h2.412l-.054 6.462c0 .924.18 1.62.54 2.088.36.468.894.702 1.602.702.624 0 1.104-.174 1.44-.522.348-.36.588-.846.72-1.458a10.66 10.66 0 0 0 .252-2.106c.036-1.86-.24-3.426-.828-4.698-.588-1.272-1.386-2.298-2.394-3.078a9.499 9.499 0 0 0-3.294-1.71c-1.2-.36-2.394-.54-3.582-.54-1.68 0-3.174.27-4.482.81-1.308.528-2.412 1.278-3.312 2.25-.888.96-1.56 2.1-2.016 3.42-.444 1.308-.654 2.748-.63 4.32.048 1.56.33 2.964.846 4.212a9.324 9.324 0 0 0 2.16 3.204 9.38 9.38 0 0 0 3.276 2.034c1.26.468 2.64.702 4.14.702.84 0 1.674-.096 2.502-.288.84-.18 1.608-.438 2.304-.774l1.026 2.808c-.924.432-1.896.75-2.916.954a14.649 14.649 0 0 1-3.078.324Zm-.144-10.098c.852 0 1.566-.246 2.142-.738.576-.492.864-1.326.864-2.502 0-1.068-.258-1.872-.774-2.412-.504-.552-1.218-.828-2.142-.828-1.092 0-1.908.288-2.448.864-.54.576-.81 1.368-.81 2.376 0 1.032.276 1.83.828 2.394.564.564 1.344.846 2.34.846Z"></path><path class="fill-blue-600 dark:fill-blue-500" d="M51.799 7.813V5.545h13.509v2.268H59.86V23h-2.624V7.812h-5.438ZM39.392 23h-2.795l6.28-17.455h3.043L52.203 23h-2.796L44.472 8.716h-.137L39.392 23Zm.469-6.835h9.068v2.216h-9.068v-2.216Z"></path><path class="fill-zinc-700 dark:fill-zinc-400" d="M161.144 5.545V23h-2.548V5.545h2.548ZM149.649 23.264c-1.227 0-2.298-.281-3.213-.843-.915-.563-1.625-1.35-2.131-2.361-.505-1.012-.758-2.194-.758-3.546 0-1.358.253-2.545.758-3.562.506-1.017 1.216-1.807 2.131-2.37.915-.562 1.986-.843 3.213-.843s2.298.28 3.213.843 1.625 1.353 2.131 2.37c.506 1.017.758 2.204.758 3.562 0 1.352-.252 2.534-.758 3.546-.506 1.011-1.216 1.798-2.131 2.36-.915.563-1.986.844-3.213.844Zm.009-2.139c.795 0 1.454-.21 1.977-.63.523-.421.909-.98 1.159-1.68.256-.699.384-1.468.384-2.31 0-.834-.128-1.602-.384-2.3-.25-.705-.636-1.27-1.159-1.697-.523-.426-1.182-.639-1.977-.639-.801 0-1.466.213-1.995.64-.522.426-.912.991-1.167 1.695a6.789 6.789 0 0 0-.375 2.302c0 .84.125 1.61.375 2.31.255.698.645 1.258 1.167 1.678.529.42 1.194.631 1.995.631ZM136.032 23.264c-1.267 0-2.358-.287-3.273-.86-.909-.58-1.608-1.378-2.096-2.395-.489-1.018-.733-2.182-.733-3.495 0-1.33.25-2.503.75-3.52.5-1.022 1.204-1.82 2.113-2.395.909-.573 1.98-.86 3.213-.86.995 0 1.881.184 2.659.554a4.764 4.764 0 0 1 1.884 1.534c.483.659.77 1.429.861 2.31h-2.48a2.974 2.974 0 0 0-.938-1.586c-.483-.443-1.13-.665-1.943-.665-.71 0-1.332.188-1.866.563-.529.37-.941.898-1.236 1.585-.296.682-.443 1.489-.443 2.42 0 .955.144 1.779.434 2.472.29.693.699 1.23 1.227 1.61.535.382 1.162.572 1.884.572.483 0 .92-.088 1.313-.264.397-.182.73-.44.997-.776.272-.335.463-.739.571-1.21h2.48a4.823 4.823 0 0 1-.827 2.267 4.76 4.76 0 0 1-1.849 1.568c-.767.38-1.668.571-2.702.571ZM121.571 23.264c-1.227 0-2.298-.281-3.213-.843-.915-.563-1.625-1.35-2.131-2.361-.505-1.012-.758-2.194-.758-3.546 0-1.358.253-2.545.758-3.562.506-1.017 1.216-1.807 2.131-2.37.915-.562 1.986-.843 3.213-.843s2.298.28 3.213.843 1.625 1.353 2.131 2.37c.505 1.017.758 2.204.758 3.562 0 1.352-.253 2.534-.758 3.546-.506 1.011-1.216 1.798-2.131 2.36-.915.563-1.986.844-3.213.844Zm.009-2.139c.795 0 1.454-.21 1.977-.63.523-.421.909-.98 1.159-1.68.256-.699.383-1.468.383-2.31 0-.834-.127-1.602-.383-2.3-.25-.705-.636-1.27-1.159-1.697-.523-.426-1.182-.639-1.977-.639-.802 0-1.466.213-1.995.64-.522.426-.912.991-1.167 1.695a6.789 6.789 0 0 0-.375 2.302c0 .84.125 1.61.375 2.31.255.698.645 1.258 1.167 1.678.529.42 1.193.631 1.995.631ZM113.379 9.91v2.044h-7.151V9.91h7.151Zm-5.233-3.137h2.548v12.383c0 .495.074.867.221 1.117.148.244.339.412.572.503.238.085.497.127.775.127.205 0 .384-.014.537-.042l.358-.068.46 2.105a4.307 4.307 0 0 1-.63.17 4.992 4.992 0 0 1-1.023.102 4.483 4.483 0 0 1-1.875-.358 3.208 3.208 0 0 1-1.406-1.159c-.358-.522-.537-1.179-.537-1.968V6.773ZM98.321 23.264c-1.227 0-2.298-.281-3.213-.843-.915-.563-1.625-1.35-2.13-2.361-.506-1.012-.76-2.194-.76-3.546 0-1.358.254-2.545.76-3.562.505-1.017 1.215-1.807 2.13-2.37.915-.562 1.986-.843 3.213-.843s2.298.28 3.213.843 1.625 1.353 2.131 2.37c.505 1.017.758 2.204.758 3.562 0 1.352-.253 2.534-.758 3.546-.506 1.011-1.216 1.798-2.131 2.36-.915.563-1.986.844-3.213.844Zm.008-2.139c.796 0 1.455-.21 1.978-.63.523-.421.909-.98 1.159-1.68.256-.699.383-1.468.383-2.31 0-.834-.127-1.602-.383-2.3-.25-.705-.636-1.27-1.159-1.697-.523-.426-1.182-.639-1.978-.639-.8 0-1.465.213-1.994.64-.522.426-.912.991-1.167 1.695a6.789 6.789 0 0 0-.375 2.302c0 .84.125 1.61.375 2.31.255.698.644 1.258 1.167 1.678.529.42 1.193.631 1.995.631ZM84.065 23V9.91h2.463v2.079h.136a3.164 3.164 0 0 1 1.261-1.662 3.61 3.61 0 0 1 2.063-.614 10.896 10.896 0 0 1 1.082.06v2.437a4.577 4.577 0 0 0-.545-.094 5.202 5.202 0 0 0-.784-.06c-.603 0-1.14.129-1.611.384a2.85 2.85 0 0 0-1.517 2.566V23h-2.548ZM68.918 23V5.545h6.221c1.358 0 2.483.248 3.375.742.892.494 1.56 1.17 2.003 2.028.443.853.665 1.813.665 2.881 0 1.074-.225 2.04-.674 2.898-.443.852-1.113 1.528-2.01 2.028-.893.494-2.015.742-3.367.742h-4.279V14.63h4.04c.858 0 1.554-.148 2.088-.444.534-.3.926-.71 1.176-1.227.25-.517.375-1.105.375-1.764 0-.66-.125-1.244-.375-1.756-.25-.511-.645-.912-1.184-1.201-.534-.29-1.239-.435-2.114-.435h-3.307V23h-2.633Z"></path></svg></a></div><div class="flex items-center gap-5"><nav class="hidden md:block"><ul role="list" class="flex items-center gap-8"><li><a class="text-sm leading-5 text-zinc-600 transition hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/sdks">SDKs</a></li><li><a class="text-sm leading-5 text-zinc-600 transition hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="https://docs.bsky.app/blog">Blog</a></li><li><a class="text-sm leading-5 text-zinc-600 transition hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="https://github.com/bluesky-social/atproto">GitHub</a></li><select class="block w-full appearance-none rounded-md border-0 py-1.5 pl-3 pr-3 text-gray-900 ring-1 ring-inset ring-gray-300 focus:ring-2 focus:ring-indigo-600 sm:text-sm sm:leading-6 dark:bg-gray-800 dark:text-gray-100 dark:ring-gray-700"><option value="en" selected="">English</option><option value="pt">Português</option><option value="ja">日本語</option></select></ul></nav><div class="hidden md:block md:h-5 md:w-px md:bg-zinc-900/10 md:dark:bg-white/15"></div><div class="flex gap-4"><div class="contents lg:hidden"><button type="button" class="flex h-6 w-6 items-center justify-center rounded-md transition hover:bg-zinc-900/5 ui-not-focus-visible:outline-none lg:hidden dark:hover:bg-white/5" aria-label="Find something..."><svg viewBox="0 0 20 20" fill="none" aria-hidden="true" class="h-5 w-5 stroke-zinc-900 dark:stroke-white"><path stroke-linecap="round" stroke-linejoin="round" d="M12.01 12a4.25 4.25 0 1 0-6.02-6 4.25 4.25 0 0 0 6.02 6Zm0 0 3.24 3.25"></path></svg></button><!--$--><span hidden="" style="position:fixed;top:1px;left:1px;width:1px;height:0;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;display:none"></span><!--/$--></div><button type="button" class="flex h-6 w-6 items-center justify-center rounded-md transition hover:bg-zinc-900/5 dark:hover:bg-white/5" aria-label="Toggle theme"><svg viewBox="0 0 20 20" fill="none" aria-hidden="true" class="h-5 w-5 stroke-zinc-900 dark:hidden"><path d="M12.5 10a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"></path><path stroke-linecap="round" d="M10 5.5v-1M13.182 6.818l.707-.707M14.5 10h1M13.182 13.182l.707.707M10 15.5v-1M6.11 13.889l.708-.707M4.5 10h1M6.11 6.111l.708.707"></path></svg><svg viewBox="0 0 20 20" fill="none" aria-hidden="true" class="hidden h-5 w-5 stroke-white dark:block"><path d="M15.224 11.724a5.5 5.5 0 0 1-6.949-6.949 5.5 5.5 0 1 0 6.949 6.949Z"></path></svg></button></div></div></div><nav class="hidden lg:mt-10 lg:block"><ul role="list"><li class="md:hidden"><a class="block py-1 text-sm text-zinc-600 transition hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/">API</a></li><li class="md:hidden"><a class="block py-1 text-sm text-zinc-600 transition hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="#">Documentation</a></li><li class="md:hidden"><a class="block py-1 text-sm text-zinc-600 transition hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="#">Support</a></li><li class="relative mt-6 md:mt-0"><h2 class="text-xs font-semibold text-zinc-900 dark:text-white">Home</h2><div class="relative mt-3 pl-2"><div class="absolute inset-y-0 left-2 w-px bg-zinc-900/10 dark:bg-white/5"></div><ul role="list" class="border-l border-transparent"><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/"><span class="truncate">Introduction</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/sdks"><span class="truncate">SDKs</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/guides/glossary"><span class="truncate">Glossary</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/guides/faq"><span class="truncate">FAQ</span></a></li></ul></div></li><li class="relative mt-6"><h2 class="text-xs font-semibold text-zinc-900 dark:text-white">Building apps</h2><div class="relative mt-3 pl-2"><div class="absolute inset-y-0 left-2 w-px bg-zinc-900/10 dark:bg-white/5"></div><ul role="list" class="border-l border-transparent"><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/guides/applications"><span class="truncate">Quick start</span></a></li></ul></div></li><li class="relative mt-6"><h2 class="text-xs font-semibold text-zinc-900 dark:text-white">Guides</h2><div class="relative mt-3 pl-2"><div class="absolute inset-y-0 left-2 w-px bg-zinc-900/10 dark:bg-white/5"></div><ul role="list" class="border-l border-transparent"><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/guides/overview"><span class="truncate">Overview</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/guides/self-hosting"><span class="truncate">Self-hosting</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/guides/identity"><span class="truncate">Identity</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/guides/data-repos"><span class="truncate">Data repos</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/guides/lexicon"><span class="truncate">Schemas & Lexicon</span></a></li></ul></div></li><li class="relative mt-6"><h2 class="text-xs font-semibold text-zinc-900 dark:text-white">Specs</h2><div class="relative mt-3 pl-2"><div class="absolute inset-x-0 top-0 bg-zinc-800/2.5 will-change-transform dark:bg-white/2.5" style="border-radius:8px;height:32px;top:64px;opacity:0"></div><div class="absolute inset-y-0 left-2 w-px bg-zinc-900/10 dark:bg-white/5"></div><div class="absolute left-2 h-6 w-px bg-blue-500" style="top:68px;opacity:1"></div><ul role="list" class="border-l border-transparent"><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/atp"><span class="truncate">AT Protocol</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/data-model"><span class="truncate">Data Model</span></a></li><li class="relative"><a aria-current="page" class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-900 dark:text-white" href="/specs/lexicon"><span class="truncate">Lexicon</span></a><ul role="list" style="opacity:1"><li><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-7 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/lexicon#overview-of-types"><span class="truncate">Overview of Types</span></a></li><li><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-7 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/lexicon#lexicon-files"><span class="truncate">Lexicon Files</span></a></li><li><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-7 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/lexicon#primary-type-definitions"><span class="truncate">Primary Type Definitions</span></a></li><li><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-7 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/lexicon#field-type-definitions"><span class="truncate">Field Type Definitions</span></a></li><li><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-7 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/lexicon#string-formats"><span class="truncate">String Formats</span></a></li><li><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-7 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/lexicon#when-to-use-type"><span class="truncate">When to use $type</span></a></li><li><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-7 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/lexicon#lexicon-evolution"><span class="truncate">Lexicon Evolution</span></a></li><li><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-7 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/lexicon#authority-and-control"><span class="truncate">Authority and Control</span></a></li><li><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-7 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/lexicon#usage-and-implementation-guidelines"><span class="truncate">Usage and Implementation Guidelines</span></a></li><li><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-7 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/lexicon#possible-future-changes"><span class="truncate">Possible Future Changes</span></a></li></ul></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/cryptography"><span class="truncate">Cryptography</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/repository"><span class="truncate">Repository</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/blob"><span class="truncate">Blobs</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/label"><span class="truncate">Labels</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/xrpc"><span class="truncate">HTTP API (XRPC)</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/oauth"><span class="truncate">OAuth</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/event-stream"><span class="truncate">Event Stream</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/did"><span class="truncate">DID</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/handle"><span class="truncate">Handle</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/nsid"><span class="truncate">NSID</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/record-key"><span class="truncate">Record Key</span></a></li><li class="relative"><a class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 dark:text-zinc-400 dark:hover:text-white" href="/specs/at-uri-scheme"><span class="truncate">URI Scheme</span></a></li></ul></div></li></ul></nav></div></header><div class="relative flex h-full flex-col px-4 pt-14 sm:px-6 lg:px-8"><main class="flex-auto"><article class="flex h-full flex-col pb-24 pt-16"><div class="flex-auto prose dark:prose-invert [html_:where(&>*)]:mx-auto [html_:where(&>*)]:max-w-2xl [html_:where(&>*)]:lg:mx-[calc(50%-min(50%,theme(maxWidth.lg)))] [html_:where(&>*)]:lg:max-w-3xl"><h1>Lexicon</h1> <p class="lead">Lexicon is a schema definition language used to describe atproto records, HTTP endpoints (XRPC), and event stream messages. It builds on top of the atproto <a href="/specs/data-model">Data Model</a>.</p> <p class="lead">The schema language is similar to <a href="http://json-schema.org/">JSON Schema</a> and <a href="https://en.wikipedia.org/wiki/OpenAPI_Specification">OpenAPI</a>, but includes some atproto-specific features and semantics.</p> <p class="lead">This specification describes version 1 of the Lexicon definition language.</p> <h2 class="scroll-mt-24" id="overview-of-types"><a class="group text-inherit no-underline hover:text-inherit" href="#overview-of-types">Overview of Types</a></h2> <table><thead><tr><th>Lexicon Type</th><th>Data Model Type</th><th>Category</th></tr></thead><tbody><tr><td><code>null</code></td><td>Null</td><td>concrete</td></tr><tr><td><code>boolean</code></td><td>Boolean</td><td>concrete</td></tr><tr><td><code>integer</code></td><td>Integer</td><td>concrete</td></tr><tr><td><code>string</code></td><td>String</td><td>concrete</td></tr><tr><td><code>bytes</code></td><td>Bytes</td><td>concrete</td></tr><tr><td><code>cid-link</code></td><td>Link</td><td>concrete</td></tr><tr><td><code>blob</code></td><td>Blob</td><td>concrete</td></tr><tr><td><code>array</code></td><td>Array</td><td>container</td></tr><tr><td><code>object</code></td><td>Object</td><td>container</td></tr><tr><td><code>params</code></td><td></td><td>container</td></tr><tr><td><code>token</code></td><td></td><td>meta</td></tr><tr><td><code>ref</code></td><td></td><td>meta</td></tr><tr><td><code>union</code></td><td></td><td>meta</td></tr><tr><td><code>unknown</code></td><td></td><td>meta</td></tr><tr><td><code>record</code></td><td></td><td>primary</td></tr><tr><td><code>query</code></td><td></td><td>primary</td></tr><tr><td><code>procedure</code></td><td></td><td>primary</td></tr><tr><td><code>subscription</code></td><td></td><td>primary</td></tr></tbody></table> <h2 class="scroll-mt-24" id="lexicon-files"><a class="group text-inherit no-underline hover:text-inherit" href="#lexicon-files">Lexicon Files</a></h2> <p>Lexicons are JSON files associated with a single NSID. A file contains one or more definitions, each with a distinct short name. A definition with the name <code>main</code> optionally describes the "primary" definition for the entire file. A Lexicon with zero definitions is invalid.</p> <p>A Lexicon JSON file is an object with the following fields:</p> <ul> <li><code>lexicon</code> (integer, required): indicates Lexicon language version. In this version, a fixed value of <code>1</code></li> <li><code>id</code> (string, required): the NSID of the Lexicon</li> <li><code>revision</code> (integer, optional): indicates the version of this Lexicon, if changes have occurred</li> <li><code>description</code> (string, optional): short overview of the Lexicon, usually one or two sentences</li> <li><code>defs</code> (map of strings-to-objects, required): set of definitions, each with a distinct name (key)</li> </ul> <p>Schema definitions under <code>defs</code> all have a <code>type</code> field to distinguish their type. A file can have at most one definition with one of the "primary" types. Primary types should always have the name <code>main</code>. It is possible for <code>main</code> to describe a non-primary type.</p> <p>References to specific definitions within a Lexicon use fragment syntax, like <code>com.example.defs#someView</code>. If a <code>main</code> definition exists, it can be referenced without a fragment, just using the NSID. For references in the <code>$type</code> fields in data objects themselves (eg, records or contents of a union), this is a "must" (use of a <code>#main</code> suffix is invalid). For example, <code>com.example.record</code> not <code>com.example.record#main</code>.</p> <p>The semantics of the <code>revision</code> field have not been worked out yet, but are intended to help third parties identity the most recent among multiple versions or copies of a Lexicon.</p> <p>Related Lexicons are often grouped together in the NSID hierarchy. As a convention, any definitions used by multiple Lexicons are defined in a dedicated <code>*.defs</code> Lexicon (eg, <code>com.atproto.server.defs</code>) within the group. A <code>*.defs</code> Lexicon should generally not include a definition named <code>main</code>, though it is not strictly invalid to do so.</p> <h2 class="scroll-mt-24" id="primary-type-definitions"><a class="group text-inherit no-underline hover:text-inherit" href="#primary-type-definitions">Primary Type Definitions</a></h2> <p>The primary types are:</p> <ul> <li><code>query</code>: describes an XRPC Query (HTTP GET)</li> <li><code>procedure</code>: describes an XRPC Procedure (HTTP POST)</li> <li><code>subscription</code>: Event Stream (WebSocket)</li> <li><code>record</code>: describes an object that can be stored in a repository record</li> </ul> <p>Each primary definition schema object includes these fields:</p> <ul> <li><code>type</code> (string, required): the type value (eg, <code>record</code> for records)</li> <li><code>description</code> (string, optional): short, usually only a sentence or two</li> </ul> <h3>Record</h3> <p>Type-specific fields:</p> <ul> <li><code>key</code> (string, required): specifies the <a href="/specs/record-key">Record Key type</a></li> <li><code>record</code> (object, required): a schema definition with type <code>object</code>, which specifies this type of record</li> </ul> <h3>Query and Procedure (HTTP API)</h3> <p>Type-specific fields:</p> <ul> <li><code>parameters</code> (object, optional): a schema definition with type <code>params</code>, describing the HTTP query parameters for this endpoint</li> <li><code>output</code> (object, optional): describes the HTTP response body<!-- --> <ul> <li><code>description</code> (string, optional): short description</li> <li><code>encoding</code> (string, required): MIME type for body contents. Use <code>application/json</code> for JSON responses.</li> <li><code>schema</code> (object, optional): schema definition, either an <code>object</code>, a <code>ref</code>, or a <code>union</code> of refs. Used to describe JSON encoded responses, though schema is optional even for JSON responses.</li> </ul> </li> <li><code>input</code> (object, optional, only for <code>procedure</code>): describes HTTP request body schema, with the same format as the <code>output</code> field</li> <li><code>errors</code> (array of objects, optional): set of string error codes which might be returned<!-- --> <ul> <li><code>name</code> (string, required): short name for the error type, with no whitespace</li> <li><code>description</code> (string, optional): short description, one or two sentences</li> </ul> </li> </ul> <h3>Subscription (Event Stream)</h3> <p>Type-specific fields:</p> <ul> <li><code>parameters</code> (object, optional): same as Query and Procedure</li> <li><code>message</code> (object, optional): specifies what messages can be<!-- --> <ul> <li><code>description</code> (string, optional): short description</li> <li><code>schema</code> (object, required): schema definition, which must be a <code>union</code> of refs</li> </ul> </li> <li><code>errors</code> (array of objects, optional): same as Query and Procedure</li> </ul> <p>Subscription schemas (referenced by the <code>schema</code> field under <code>message</code>) must be a <code>union</code> of refs, not an <code>object</code> type.</p> <h2 class="scroll-mt-24" id="field-type-definitions"><a class="group text-inherit no-underline hover:text-inherit" href="#field-type-definitions">Field Type Definitions</a></h2> <p>As with the primary definitions, every schema object includes these fields:</p> <ul> <li><code>type</code> (string, required): fixed value for each type</li> <li><code>description</code> (string, optional): short, usually only a sentence or two</li> </ul> <h3><code>null</code></h3> <p>No additional fields.</p> <h3><code>boolean</code></h3> <p>Type-specific fields:</p> <ul> <li><code>default</code> (boolean, optional): a default value for this field</li> <li><code>const</code> (boolean, optional): a fixed (constant) value for this field</li> </ul> <p>When included as an HTTP query parameter, should be rendered as <code>true</code> or <code>false</code> (no quotes).</p> <h3><code>integer</code></h3> <p>A signed integer number.</p> <p>Type-specific fields:</p> <ul> <li><code>minimum</code> (integer, optional): minimum acceptable value</li> <li><code>maximum</code> (integer, optional): maximum acceptable value</li> <li><code>enum</code> (array of integers, optional): a closed set of allowed values</li> <li><code>default</code> (integer, optional): a default value for this field</li> <li><code>const</code> (integer, optional): a fixed (constant) value for this field</li> </ul> <h3><code>string</code></h3> <p>Type-specific fields:</p> <ul> <li><code>format</code> (string, optional): string format restriction</li> <li><code>maxLength</code> (integer, optional): maximum length of value, in UTF-8 bytes</li> <li><code>minLength</code> (integer, optional): minimum length of value, in UTF-8 bytes</li> <li><code>maxGraphemes</code> (integer, optional): maximum length of value, counted as Unicode Grapheme Clusters</li> <li><code>minGraphemes</code> (integer, optional): minimum length of value, counted as Unicode Grapheme Clusters</li> <li><code>knownValues</code> (array of strings, optional): a set of suggested or common values for this field. Values are not limited to this set (aka, not a closed enum).</li> <li><code>enum</code> (array of strings, optional): a closed set of allowed values</li> <li><code>default</code> (string, optional): a default value for this field</li> <li><code>const</code> (string, optional): a fixed (constant) value for this field</li> </ul> <p>Strings are Unicode. For non-Unicode encodings, use <code>bytes</code> instead. The basic <code>minLength</code>/<code>maxLength</code> validation constraints are counted as UTF-8 bytes. Note that Javascript stores strings with UTF-16 by default, and it is necessary to re-encode to count accurately. The <code>minGraphemes</code>/<code>maxGraphemes</code> validation constraints work with Grapheme Clusters, which have a complex technical and linguistic definition, but loosely correspond to "distinct visual characters" like Latin letters, CJK characters, punctuation, digits, or emoji (which might comprise multiple Unicode codepoints and many UTF-8 bytes).</p> <p><code>format</code> constrains the string format and provides additional semantic context. Refer to the Data Model specification for the available format types and their definitions.</p> <p><code>const</code> and <code>default</code> are mutually exclusive.</p> <h3><code>bytes</code></h3> <p>Type-specific fields:</p> <ul> <li><code>minLength</code> (integer, optional): minimum size of value, as raw bytes with no encoding</li> <li><code>maxLength</code> (integer, optional): maximum size of value, as raw bytes with no encoding</li> </ul> <h3><code>cid-link</code></h3> <p>No type-specific fields.</p> <p>See <a href="/specs/data-model">Data Model spec</a> for CID restrictions.</p> <h3><code>array</code></h3> <p>Type-specific fields:</p> <ul> <li><code>items</code> (object, required): describes the schema elements of this array</li> <li><code>minLength</code> (integer, optional): minimum count of elements in array</li> <li><code>maxLength</code> (integer, optional): maximum count of elements in array</li> </ul> <p>In theory arrays have homogeneous types (meaning every element as the same type). However, with union types this restriction is meaningless, so implementations can not assume that all the elements have the same type.</p> <h3><code>object</code></h3> <p>A generic object schema which can be nested inside other definitions by reference.</p> <p>Type-specific fields:</p> <ul> <li><code>properties</code> (map of strings-to-objects, required): defines the properties (fields) by name, each with their own schema</li> <li><code>required</code> (array of strings, optional): indicates which properties are required</li> <li><code>nullable</code> (array of strings, optional): indicates which properties can have <code>null</code> as a value</li> </ul> <p>As described in the data model specification, there is a semantic difference in data between omitting a field; including the field with the value <code>null</code>; and including the field with a "false-y" value (<code>false</code>, <code>0</code>, empty array, etc).</p> <h3><code>blob</code></h3> <p>Type-specific fields:</p> <ul> <li><code>accept</code> (array of strings, optional): list of acceptable MIME types. Each may end in <code>*</code> as a glob pattern (eg, <code>image/*</code>). Use <code>*/*</code> to indicate that any MIME type is accepted.</li> <li><code>maxSize</code> (integer, optional): maximum size in bytes</li> </ul> <h3><code>params</code></h3> <p>This is a limited-scope type which is only ever used for the <code>parameters</code> field on <code>query</code>, <code>procedure</code>, and <code>subscription</code> primary types. These map to HTTP query parameters.</p> <p>Type-specific fields:</p> <ul> <li><code>required</code> (array of strings, optional): same semantics as field on <code>object</code></li> <li><code>properties</code>: similar to properties under <code>object</code>, but can only include the types <code>boolean</code>, <code>integer</code>, <code>string</code>, and <code>unknown</code>; or an <code>array</code> of one of these types</li> </ul> <p>Note that unlike <code>object</code>, there is no <code>nullable</code> field on <code>params</code>.</p> <h3><code>token</code></h3> <p>Tokens are empty data values which exist only to be referenced by name. They are used to define a set of values with specific meanings. The <code>description</code> field should clarify the meaning of the token. Tokens encode as string data, with the string being the fully-qualified reference to the token itself (NSID followed by an optional fragment).</p> <p>Tokens are similar to the concept of a "symbol" in some programming languages, distinct from strings, variables, built-in keywords, or other identifiers.</p> <p>For example, tokens could be defined to represent the state of an entity (in a state machine), or to enumerate a list of categories.</p> <p>No type-specific fields.</p> <h3><code>ref</code></h3> <p>Type-specific fields:</p> <ul> <li><code>ref</code> (string, required): reference to another schema definition</li> </ul> <p>Refs are a mechanism for re-using a schema definition in multiple places. The <code>ref</code> string can be a global reference to a Lexicon type definition (an NSID, optionally with a <code>#</code>-delimited name indicating a definition other than <code>main</code>), or can indicate a local definition within the same Lexicon file (a <code>#</code> followed by a name).</p> <h3><code>union</code></h3> <p>Type-specific fields:</p> <ul> <li><code>refs</code> (array of strings, required): references to schema definitions</li> <li><code>closed</code> (boolean, optional): indicates if a union is "open" or "closed". defaults to <code>false</code> (open union)</li> </ul> <p>Unions represent that multiple possible types could be present at this location in the schema. The references follow the same syntax as <code>ref</code>, allowing references to both global or local schema definitions. Actual data will validate against a single specific type: the union does not <em>combine</em> fields from multiple schemas, or define a new <em>hybrid</em> data type. The different types are referred to as <strong>variants</strong>.</p> <p>By default unions are "open", meaning that future revisions of the schema could add more types to the list of refs (though can not remove types). This means that implementations should be permissive when validating, in case they do not have the most recent version of the Lexicon. The <code>closed</code> flag (boolean) can indicate that the set of types is fixed and can not be extended in the future.</p> <p>A <code>union</code> schema definition with no <code>refs</code> is allowed and similar to <code>unknown</code>, as long as the <code>closed</code> flag is false (the default). The main difference is that the data would be required to have the <code>$type</code> field. An empty refs list with <code>closed</code> set to true is an invalid schema.</p> <p>The schema definitions pointed to by a <code>union</code> are objects or types with a clear mapping to an object, like a <code>record</code>. All the variants must be represented by a CBOR map (or JSON Object) and must include a <code>$type</code> field indicating the variant type. Because the data must be an object, unions can not reference <code>token</code> (which would correspnod to string data).</p> <h3><code>unknown</code></h3> <p>Indicates than any data object could appear at this location, with no specific validation. The top-level data must be an object (not a string, boolean, etc). As with all other data types, the value <code>null</code> is not allowed unless the field is specifically marked as <code>nullable</code>.</p> <p>The data object may contain a <code>$type</code> field indicating the schema of the data, but this is not currently required. The top-level data object must not have the structure of a compound data type, like blob (<code>$type: blob</code>) or CID link (<code>$link</code>).</p> <p>The (nested) contents of the data object must still be valid under the atproto data model. For example, it should not contain floats. Nested compound types like blobs and CID links should be validated and transformed as expected.</p> <p>Lexicon designers are strongly recommended to not use <code>unknown</code> fields in <code>record</code> objects for now.</p> <p>No type-specific fields.</p> <h2 class="scroll-mt-24" id="string-formats"><a class="group text-inherit no-underline hover:text-inherit" href="#string-formats">String Formats</a></h2> <p>Strings can optionally be constrained to one of the following <code>format</code> types:</p> <ul> <li><code>at-identifier</code>: either a <a href="/specs/handle">Handle</a> or a <a href="/specs/did">DID</a>, details described below</li> <li><code>at-uri</code>: <a href="/specs/at-uri-scheme">AT-URI</a></li> <li><code>cid</code>: CID in string format, details specified in <a href="/specs/data-model">Data Model</a></li> <li><code>datetime</code>: timestamp, details specified below</li> <li><code>did</code>: generic <a href="/specs/did">DID Identifier</a></li> <li><code>handle</code>: <a href="/specs/handle">Handle Identifier</a></li> <li><code>nsid</code>: <a href="/specs/nsid">Namespaced Identifier</a></li> <li><code>tid</code>: <a href="/specs/record-key#record-key-type-tid">Timestamp Identifier (TID)</a></li> <li><code>record-key</code>: <a href="/specs/record-key">Record Key</a>, matching the general syntax ("any")</li> <li><code>uri</code>: generic URI, details specified below</li> <li><code>language</code>: language code, details specified below</li> </ul> <p>For the various identifier formats, when doing Lexicon schema validation the most expansive identifier syntax format should be permitted. Problems with identifiers which do pass basic syntax validation should be reported as application errors, not lexicon data validation errors. For example, data with any kind of DID in a <code>did</code> format string field should pass Lexicon validation, with unsupported DID methods being raised separately as an application error.</p> <h3><code>at-identifier</code></h3> <p>A string type which is either a DID (type: did) or a handle (handle). Mostly used in XRPC query parameters. It is unambiguous whether an at-identifier is a handle or a DID because a DID always starts with did:, and the colon character (:) is not an allowed in handles.</p> <h3><code>datetime</code></h3> <p>Full-precision date and time, with timezone information.</p> <p>This format is intended for use with computer-generated timestamps in the modern computing era (eg, after the UNIX epoch). If you need to represent historical or ancient events, ambiguity, or far-future times, a different format is probably more appropriate. Datetimes before the Current Era (year zero) as specifically disallowed.</p> <p>Datetime format standards are notoriously flexible and overlapping. Datetime strings in atproto should meet the <a href="https://ijmacd.github.io/rfc3339-iso8601/">intersecting</a> requirements of the <a href="https://www.rfc-editor.org/rfc/rfc3339">RFC 3339</a>, <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a>, and <a href="https://html.spec.whatwg.org/#dates-and-times">WHATWG HTML</a> datetime standards.</p> <p>The character separating "date" and "time" parts must be an upper-case <code>T</code>.</p> <p>Timezone specification is required. It is <em>strongly</em> preferred to use the UTC timezone, and to represent the timezone with a simple capital <code>Z</code> suffix (lower-case is not allowed). While hour/minute suffix syntax (like <code>+01:00</code> or <code>-10:30</code>) is supported, "negative zero" (<code>-00:00</code>) is specifically disallowed (by ISO 8601).</p> <p>Whole seconds precision is required, and arbitrary fractional precision digits are allowed. Best practice is to use at least millisecond precision, and to pad with zeros to the generated precision (eg, trailing <code>:12.340Z</code> instead of <code>:12.34Z</code>). Not all datetime formatting libraries support trailing zero formatting. Both millisecond and microsecond precision have reasonable cross-language support; nanosecond precision does not.</p> <p>Implementations should be aware when round-tripping records containing datetimes of two ambiguities: loss-of-precision, and ambiguity with trailing fractional second zeros. If de-serializing Lexicon records in to native types, and then re-serializing, the string representation may not be the same, which could result in broken hash references, sanity check failures, or repository update churn. A safer thing to do is to deserialize the datetime as a simple string, which ensures round-trip re-serialization.</p> <p>Implementations "should" validate that the semantics of the datetime are valid. For example, a month or day <code>00</code> is invalid.</p> <p>Valid examples:</p> <div class="my-6 overflow-hidden rounded-2xl bg-zinc-50 dark:bg-zinc-900 dark:ring-1 dark:ring-white/10"><div class="not-prose"><div class="group dark:bg-white/2.5"><div class="relative"><pre class="overflow-x-auto p-4 text-xs text-black dark:text-white"><code class="language-text"><span><span style="color: undefined"># preferred</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.123Z</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.123456Z</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.120Z</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.120000Z</span></span> <span><span style="color: undefined"></span></span> <span><span style="color: undefined"># supported</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.12345678912345Z</span></span> <span><span style="color: undefined">1985-04-12T23:20:50Z</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.0Z</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.123+00:00</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.123-07:00</span></span> <span><span style="color: undefined"></span></span></code></pre><button type="button" class="group/button absolute right-4 top-3.5 overflow-hidden rounded-full py-1 pl-2 pr-3 text-2xs font-medium opacity-0 backdrop-blur transition focus:opacity-100 group-hover:opacity-100 bg-white/5 hover:bg-white/7.5 dark:bg-white/2.5 dark:hover:bg-white/5"><span aria-hidden="false" class="pointer-events-none flex items-center gap-0.5 text-zinc-400 transition duration-300"><svg viewBox="0 0 20 20" aria-hidden="true" class="h-5 w-5 fill-zinc-500/20 stroke-zinc-500 transition-colors group-hover/button:stroke-zinc-400"><path stroke-width="0" d="M5.5 13.5v-5a2 2 0 0 1 2-2l.447-.894A2 2 0 0 1 9.737 4.5h.527a2 2 0 0 1 1.789 1.106l.447.894a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2Z"></path><path fill="none" stroke-linejoin="round" d="M12.5 6.5a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2m5 0-.447-.894a2 2 0 0 0-1.79-1.106h-.527a2 2 0 0 0-1.789 1.106L7.5 6.5m5 0-1 1h-3l-1-1"></path></svg>Copy</span><span aria-hidden="true" class="pointer-events-none absolute inset-0 flex items-center justify-center text-blue-400 transition duration-300 translate-y-1.5 opacity-0">Copied!</span></button></div></div></div></div> <p>Invalid examples:</p> <div class="my-6 overflow-hidden rounded-2xl bg-zinc-50 dark:bg-zinc-900 dark:ring-1 dark:ring-white/10"><div class="not-prose"><div class="group dark:bg-white/2.5"><div class="relative"><pre class="overflow-x-auto p-4 text-xs text-black dark:text-white"><code class="language-text"><span><span style="color: undefined">1985-04-12</span></span> <span><span style="color: undefined">1985-04-12T23:20Z</span></span> <span><span style="color: undefined">1985-04-12T23:20:5Z</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.123</span></span> <span><span style="color: undefined">+001985-04-12T23:20:50.123Z</span></span> <span><span style="color: undefined">23:20:50.123Z</span></span> <span><span style="color: undefined">-1985-04-12T23:20:50.123Z</span></span> <span><span style="color: undefined">1985-4-12T23:20:50.123Z</span></span> <span><span style="color: undefined">01985-04-12T23:20:50.123Z</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.123+00</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.123+0000</span></span> <span><span style="color: undefined"></span></span> <span><span style="color: undefined"># ISO-8601 strict capitalization</span></span> <span><span style="color: undefined">1985-04-12t23:20:50.123Z</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.123z</span></span> <span><span style="color: undefined"></span></span> <span><span style="color: undefined"># RFC-3339, but not ISO-8601</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.123-00:00</span></span> <span><span style="color: undefined">1985-04-12 23:20:50.123Z</span></span> <span><span style="color: undefined"></span></span> <span><span style="color: undefined"># timezone is required</span></span> <span><span style="color: undefined">1985-04-12T23:20:50.123</span></span> <span><span style="color: undefined"></span></span> <span><span style="color: undefined"># syntax looks ok, but datetime is not valid</span></span> <span><span style="color: undefined">1985-04-12T23:99:50.123Z</span></span> <span><span style="color: undefined">1985-00-12T23:20:50.123Z</span></span> <span><span style="color: undefined"></span></span></code></pre><button type="button" class="group/button absolute right-4 top-3.5 overflow-hidden rounded-full py-1 pl-2 pr-3 text-2xs font-medium opacity-0 backdrop-blur transition focus:opacity-100 group-hover:opacity-100 bg-white/5 hover:bg-white/7.5 dark:bg-white/2.5 dark:hover:bg-white/5"><span aria-hidden="false" class="pointer-events-none flex items-center gap-0.5 text-zinc-400 transition duration-300"><svg viewBox="0 0 20 20" aria-hidden="true" class="h-5 w-5 fill-zinc-500/20 stroke-zinc-500 transition-colors group-hover/button:stroke-zinc-400"><path stroke-width="0" d="M5.5 13.5v-5a2 2 0 0 1 2-2l.447-.894A2 2 0 0 1 9.737 4.5h.527a2 2 0 0 1 1.789 1.106l.447.894a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2Z"></path><path fill="none" stroke-linejoin="round" d="M12.5 6.5a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2m5 0-.447-.894a2 2 0 0 0-1.79-1.106h-.527a2 2 0 0 0-1.789 1.106L7.5 6.5m5 0-1 1h-3l-1-1"></path></svg>Copy</span><span aria-hidden="true" class="pointer-events-none absolute inset-0 flex items-center justify-center text-blue-400 transition duration-300 translate-y-1.5 opacity-0">Copied!</span></button></div></div></div></div> <h3><code>uri</code></h3> <p>Flexible to any URI schema, following the generic RFC-3986 on URIs. This includes, but isn’t limited to: <code>did</code>, <code>https</code>, <code>wss</code>, <code>ipfs</code> (for CIDs), <code>dns</code>, and of course <code>at</code>. Maximum length in Lexicons is 8 KBytes.</p> <h3><code>language</code></h3> <p>An <a href="https://en.wikipedia.org/wiki/IETF_language_tag">IETF Language Tag</a> string, compliant with <a href="https://www.rfc-editor.org/info/bcp47">BCP 47</a>, defined in <a href="https://www.rfc-editor.org/rfc/rfc5646.txt">RFC 5646</a> ("Tags for Identifying Languages"). This is the same standard used to identify languages in HTTP, HTML, and other web standards. The Lexicon string must validate as a "well-formed" language tag, as defined in the RFC. Clients should ignore language strings which are "well-formed" but not "valid" according to the RFC.</p> <p>As specified in the RFC, ISO 639 two-character and three-character language codes can be used on their own, lower-cased, such as <code>ja</code> (Japanese) or <code>ban</code> (Balinese). Regional sub-tags can be added, like <code>pt-BR</code> (Brazilian Portuguese). Additional subtags can also be added, such as <code>hy-Latn-IT-arevela</code>.</p> <p>Language codes generally need to be parsed, normalized, and matched semantically, not simply string-compared. For example, a search engine might simplify language tags to ISO 639 codes for indexing and filtering, while a client application (user agent) would retain the full language code for presentation (text rendering) locally.</p> <h2 class="scroll-mt-24" id="when-to-use-type"><a class="group text-inherit no-underline hover:text-inherit" href="#when-to-use-type">When to use <code>$type</code></a></h2> <p>Data objects sometimes include a <code>$type</code> field which indicates their Lexicon type. The general principle is that this field needs to be included any time there could be ambiguity about the content type when validating data.</p> <p>The specific rules are:</p> <ul> <li><code>record</code> objects must always include <code>$type</code>. While the type is often known from context (eg, the collection part of the path for records stored in a repository), record objects can also be passed around outside of repositories and need to be self-describing</li> <li><code>union</code> variants must always include <code>$type</code>, except at the top level of <code>subscription</code> messages</li> </ul> <p>Note that <code>blob</code> objects always include <code>$type</code>, which allows generic processing.</p> <p>As a reminder, <code>main</code> types must be referenced in <code>$type</code> fields as just the NSID, not including a <code>#main</code> suffix.</p> <h2 class="scroll-mt-24" id="lexicon-evolution"><a class="group text-inherit no-underline hover:text-inherit" href="#lexicon-evolution">Lexicon Evolution</a></h2> <p>Lexicons are allowed to change over time, within some bounds to ensure both forwards and backwards compatibility. The basic principle is that all old data must still be valid under the updated Lexicon, and new data must be valid under the old Lexicon.</p> <ul> <li>Any new fields must be optional</li> <li>Non-optional fields can not be removed. A best practice is to retain all fields in the Lexicon and mark them as deprecated if they are no longer used.</li> <li>Types can not change</li> <li>Fields can not be renamed</li> </ul> <p>If larger breaking changes are necessary, a new Lexicon name must be used.</p> <p>It can be ambiguous when a Lexicon has been published and becomes "set in stone". At a minimum, public adoption and implementation by a third party, even without explicit permission, indicates that the Lexicon has been released and should not break compatibility. A best practice is to clearly indicate in the Lexicon type name any experimental or development status. Eg, <code>com.corp.experimental.newRecord</code>.</p> <h2 class="scroll-mt-24" id="authority-and-control"><a class="group text-inherit no-underline hover:text-inherit" href="#authority-and-control">Authority and Control</a></h2> <p>The authority for a Lexicon is determined by the NSID, and rooted in DNS control of the domain authority. That authority has ultimate control over the Lexicon definition, and responsibility for maintenance and distribution of Lexicon schema definitions.</p> <p>In a crisis, such as unintentional loss of DNS control to a bad actor, the protocol ecosystem could decide to disregard this chain of authority. This should only be done in exceptional circumstances, and not as a mechanism to subvert an active authority. The primary mechanism for resolving protocol disputes is to fork Lexicons in to a new namespace.</p> <p>Protocol implementations should generally consider data which fails to validate against the Lexicon to be entirely invalid, and should not try to repair or do partial processing on the individual piece of data.</p> <p>Unexpected fields in data which otherwise conforms to the Lexicon should be ignored. When doing schema validation, they should be treated at worst as warnings. This is necessary to allow evolution of the schema by the controlling authority, and to be robust in the case of out-of-date Lexicons.</p> <p>Third parties can technically insert any additional fields they want in to data. This is not the recommended way to extend applications, but it is not specifically disallowed. One danger with this is that the Lexicon may be updated to include fields with the same field names but different types, which would make existing data invalid.</p> <h2 class="scroll-mt-24" id="usage-and-implementation-guidelines"><a class="group text-inherit no-underline hover:text-inherit" href="#usage-and-implementation-guidelines">Usage and Implementation Guidelines</a></h2> <p>It should be possible to translate Lexicon schemas to JSON Schema or OpenAPI and use tools and libraries from those ecosystems to work with atproto data in JSON format.</p> <p>Implementations which serialize and deserialize data from JSON or CBOR in to structures derived from specific Lexicons should be aware of the risk of "clobbering" unexpected fields. For example, if a Lexicon is updated to add a new (optional) field, old implementations would not be aware of that field, and might accidentally strip the data when de-serializing and then re-serializing. Depending on the context, one way to avoid this problem is to retain any "extra" fields, or to pass-through the original data object instead of re-serializing it.</p> <h2 class="scroll-mt-24" id="possible-future-changes"><a class="group text-inherit no-underline hover:text-inherit" href="#possible-future-changes">Possible Future Changes</a></h2> <p>The validation rules for unexpected additional fields may change. For example, a mechanism for Lexicons to indicate that the schema is "closed" and unexpected fields are not allowed, or a convention around field name prefixes (<code>x-</code>) to indicate unofficial extension.</p></div></article></main><footer class="mx-auto w-full max-w-2xl space-y-10 pb-16 lg:max-w-5xl"><div class="flex"><div class="flex flex-col items-start gap-3"><a class="inline-flex gap-0.5 justify-center overflow-hidden text-sm font-medium transition rounded-full bg-zinc-100 py-1 px-3 text-zinc-900 hover:bg-zinc-200 dark:bg-zinc-800/40 dark:text-zinc-400 dark:ring-1 dark:ring-inset dark:ring-zinc-800 dark:hover:bg-zinc-800 dark:hover:text-zinc-300" aria-label="Previous: Data Model" href="/specs/data-model"><svg viewBox="0 0 20 20" fill="none" aria-hidden="true" class="mt-0.5 h-5 w-5 -ml-1 rotate-180"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m11.5 6.5 3 3.5m0 0-3 3.5m3-3.5h-9"></path></svg>Previous</a><a tabindex="-1" aria-hidden="true" class="text-base font-semibold text-zinc-900 transition hover:text-zinc-600 dark:text-white dark:hover:text-zinc-300" href="/specs/data-model">Data Model</a></div><div class="ml-auto flex flex-col items-end gap-3"><a class="inline-flex gap-0.5 justify-center overflow-hidden text-sm font-medium transition rounded-full bg-zinc-100 py-1 px-3 text-zinc-900 hover:bg-zinc-200 dark:bg-zinc-800/40 dark:text-zinc-400 dark:ring-1 dark:ring-inset dark:ring-zinc-800 dark:hover:bg-zinc-800 dark:hover:text-zinc-300" aria-label="Next: Cryptography" href="/specs/cryptography">Next<svg viewBox="0 0 20 20" fill="none" aria-hidden="true" class="mt-0.5 h-5 w-5 -mr-1"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m11.5 6.5 3 3.5m0 0-3 3.5m3-3.5h-9"></path></svg></a><a tabindex="-1" aria-hidden="true" class="text-base font-semibold text-zinc-900 transition hover:text-zinc-600 dark:text-white dark:hover:text-zinc-300" href="/specs/cryptography">Cryptography</a></div></div><div class="flex flex-col items-center justify-between gap-5 border-t border-zinc-900/5 pt-8 sm:flex-row dark:border-white/5"><p class="text-xs text-zinc-600 dark:text-zinc-400">© Copyright <!-- -->2024<!-- -->. All rights reserved.</p><div class="flex gap-4"><a class="group" href="https://bsky.app/profile/atproto.com"><span class="sr-only">Follow us on Bluesky</span><svg viewBox="0 0 360 320" aria-hidden="true" class="h-5 w-5 fill-zinc-700 transition group-hover:fill-zinc-900 dark:group-hover:fill-zinc-500"><path d="M180 141.964C163.699 110.262 119.308 51.1817 78.0347 22.044C38.4971 -5.86834 23.414 -1.03207 13.526 3.43594C2.08093 8.60755 0 26.1785 0 36.5164C0 46.8542 5.66748 121.272 9.36416 133.694C21.5786 174.738 65.0603 188.607 105.104 184.156C107.151 183.852 109.227 183.572 111.329 183.312C109.267 183.642 107.19 183.924 105.104 184.156C46.4204 192.847 -5.69621 214.233 62.6582 290.33C137.848 368.18 165.705 273.637 180 225.702C194.295 273.637 210.76 364.771 295.995 290.33C360 225.702 313.58 192.85 254.896 184.158C252.81 183.926 250.733 183.645 248.671 183.315C250.773 183.574 252.849 183.855 254.896 184.158C294.94 188.61 338.421 174.74 350.636 133.697C354.333 121.275 360 46.8568 360 36.519C360 26.1811 357.919 8.61012 346.474 3.43851C336.586 -1.02949 321.503 -5.86576 281.965 22.0466C240.692 51.1843 196.301 110.262 180 141.964Z"></path></svg></a><a class="group" href="https://github.com/bluesky-social"><span class="sr-only">Follow us on GitHub</span><svg viewBox="0 0 20 20" aria-hidden="true" class="h-5 w-5 fill-zinc-700 transition group-hover:fill-zinc-900 dark:group-hover:fill-zinc-500"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 1.667c-4.605 0-8.334 3.823-8.334 8.544 0 3.78 2.385 6.974 5.698 8.106.417.075.573-.182.573-.406 0-.203-.011-.875-.011-1.592-2.093.397-2.635-.522-2.802-1.002-.094-.246-.5-1.005-.854-1.207-.291-.16-.708-.556-.01-.567.656-.01 1.124.62 1.281.876.75 1.292 1.948.93 2.427.705.073-.555.291-.93.531-1.143-1.854-.213-3.791-.95-3.791-4.218 0-.929.322-1.698.854-2.296-.083-.214-.375-1.09.083-2.265 0 0 .698-.224 2.292.876a7.576 7.576 0 0 1 2.083-.288c.709 0 1.417.096 2.084.288 1.593-1.11 2.291-.875 2.291-.875.459 1.174.167 2.05.084 2.263.53.599.854 1.357.854 2.297 0 3.278-1.948 4.005-3.802 4.219.302.266.563.78.563 1.58 0 1.143-.011 2.061-.011 2.35 0 .224.156.491.573.405a8.365 8.365 0 0 0 4.11-3.116 8.707 8.707 0 0 0 1.567-4.99c0-4.721-3.73-8.545-8.334-8.545Z"></path></svg></a></div></div></footer></div></div></div><script src="/_next/static/chunks/webpack-496a37b6c26ccd6a.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/786ca9324488b5df.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[2846,[],\"\"]\n4:I[2972,[\"972\",\"static/chunks/972-f3553dcbba031b91.js\",\"135\",\"static/chunks/135-8f28b0a70a96c388.js\",\"212\",\"static/chunks/212-67e821188dcd5fb8.js\",\"469\",\"static/chunks/app/%5Blocale%5D/specs/lexicon/page-16a586175a6aa53a.js\"],\"\"]\n5:I[1684,[\"972\",\"static/chunks/972-f3553dcbba031b91.js\",\"135\",\"static/chunks/135-8f28b0a70a96c388.js\",\"212\",\"static/chunks/212-67e821188dcd5fb8.js\",\"469\",\"static/chunks/app/%5Blocale%5D/specs/lexicon/page-16a586175a6aa53a.js\"],\"Heading\"]\n6:I[2510,[\"972\",\"static/chunks/972-f3553dcbba031b91.js\",\"135\",\"static/chunks/135-8f28b0a70a96c388.js\",\"212\",\"static/chunks/212-67e821188dcd5fb8.js\",\"469\",\"static/chunks/app/%5Blocale%5D/specs/lexicon/page-16a586175a6aa53a.js\"],\"Code\"]\n7:I[2510,[\"972\",\"static/chunks/972-f3553dcbba031b91.js\",\"135\",\"static/chunks/135-8f28b0a70a96c388.js\",\"212\",\"static/chunks/212-67e821188dcd5fb8.js\",\"469\",\"static/chunks/app/%5Blocale%5D/specs/lexicon/page-16a586175a6aa53a.js\"],\"Pre\"]\n9:I[4707,[],\"\"]\nb:I[6423,[],\"\"]\ne:I[1060,[],\"\"]\n8:T791,\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-04-12\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-04-12T23:20Z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-04-12T23:20:5Z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-04-12T23:20:50.123\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e+001985-04-12T23:20:50.123Z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e23:20:50.123Z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e-1985-04-12T23:20:50.123Z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-4-12T23:20:50.123Z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e01985-04-12T23:20:50.123Z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-04-12T23:20:50.123+00\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-04-12T23:20:50.123+0000\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e# ISO-8601 strict capitalization\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-04-12t23:20:50.123Z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\""])</script><script>self.__next_f.push([1,"color: undefined\"\u003e1985-04-12T23:20:50.123z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e# RFC-3339, but not ISO-8601\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-04-12T23:20:50.123-00:00\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-04-12 23:20:50.123Z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e# timezone is required\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-04-12T23:20:50.123\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e# syntax looks ok, but datetime is not valid\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-04-12T23:99:50.123Z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e1985-00-12T23:20:50.123Z\u003c/span\u003e\u003c/span\u003e\n\u003cspan\u003e\u003cspan style=\"color: undefined\"\u003e\u003c/span\u003e\u003c/span\u003ea:[\"locale\",\"en\",\"d\"]\nf:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"UWK7gfTTdjb8rbg3vyV6o\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"specs\",\"lexicon\"],\"initialTree\":[\"\",{\"children\":[[\"locale\",\"en\",\"d\"],{\"children\":[\"specs\",{\"children\":[\"lexicon\",{\"children\":[\"__PAGE__\",{}]}]}]},\"$undefined\",\"$undefined\",true]}],\"initialSeedData\":[\"\",{\"children\":[[\"locale\",\"en\",\"d\"],{\"children\":[\"specs\",{\"children\":[\"lexicon\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[\"$\",\"article\",null,{\"className\":\"flex h-full flex-col pb-24 pt-16\",\"children\":[\"$\",\"div\",null,{\"className\":\"flex-auto prose dark:prose-invert [html_:where(\u0026\u003e*)]:mx-auto [html_:where(\u0026\u003e*)]:max-w-2xl [html_:where(\u0026\u003e*)]:lg:mx-[calc(50%-min(50%,theme(maxWidth.lg)))] [html_:where(\u0026\u003e*)]:lg:max-w-3xl\",\"children\":[[\"$\",\"h1\",null,{\"children\":\"Lexicon\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Lexicon is a schema definition language used to describe atproto records, HTTP endpoints (XRPC), and event stream messages. It builds on top of the atproto \",[\"$\",\"$L4\",null,{\"href\":\"/specs/data-model\",\"children\":\"Data Model\"}],\".\"],\"className\":\"lead\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"The schema language is similar to \",[\"$\",\"$L4\",null,{\"href\":\"http://json-schema.org/\",\"children\":\"JSON Schema\"}],\" and \",[\"$\",\"$L4\",null,{\"href\":\"https://en.wikipedia.org/wiki/OpenAPI_Specification\",\"children\":\"OpenAPI\"}],\", but includes some atproto-specific features and semantics.\"],\"className\":\"lead\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"This specification describes version 1 of the Lexicon definition language.\",\"className\":\"lead\"}],\"\\n\",[\"$\",\"$L5\",null,{\"level\":2,\"id\":\"overview-of-types\",\"children\":\"Overview of Types\"}],\"\\n\",[\"$\",\"table\",null,{\"children\":[[\"$\",\"thead\",null,{\"children\":[\"$\",\"tr\",null,{\"children\":[[\"$\",\"th\",null,{\"children\":\"Lexicon Type\"}],[\"$\",\"th\",null,{\"children\":\"Data Model Type\"}],[\"$\",\"th\",null,{\"children\":\"Category\"}]]}]}],[\"$\",\"tbody\",null,{\"children\":[[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"null\"}]}],[\"$\",\"td\",null,{\"children\":\"Null\"}],[\"$\",\"td\",null,{\"children\":\"concrete\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"boolean\"}]}],[\"$\",\"td\",null,{\"children\":\"Boolean\"}],[\"$\",\"td\",null,{\"children\":\"concrete\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"integer\"}]}],[\"$\",\"td\",null,{\"children\":\"Integer\"}],[\"$\",\"td\",null,{\"children\":\"concrete\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"string\"}]}],[\"$\",\"td\",null,{\"children\":\"String\"}],[\"$\",\"td\",null,{\"children\":\"concrete\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"bytes\"}]}],[\"$\",\"td\",null,{\"children\":\"Bytes\"}],[\"$\",\"td\",null,{\"children\":\"concrete\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"cid-link\"}]}],[\"$\",\"td\",null,{\"children\":\"Link\"}],[\"$\",\"td\",null,{\"children\":\"concrete\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"blob\"}]}],[\"$\",\"td\",null,{\"children\":\"Blob\"}],[\"$\",\"td\",null,{\"children\":\"concrete\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"array\"}]}],[\"$\",\"td\",null,{\"children\":\"Array\"}],[\"$\",\"td\",null,{\"children\":\"container\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"object\"}]}],[\"$\",\"td\",null,{\"children\":\"Object\"}],[\"$\",\"td\",null,{\"children\":\"container\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"params\"}]}],[\"$\",\"td\",null,{}],[\"$\",\"td\",null,{\"children\":\"container\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"token\"}]}],[\"$\",\"td\",null,{}],[\"$\",\"td\",null,{\"children\":\"meta\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"ref\"}]}],[\"$\",\"td\",null,{}],[\"$\",\"td\",null,{\"children\":\"meta\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"union\"}]}],[\"$\",\"td\",null,{}],[\"$\",\"td\",null,{\"children\":\"meta\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"unknown\"}]}],[\"$\",\"td\",null,{}],[\"$\",\"td\",null,{\"children\":\"meta\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"record\"}]}],[\"$\",\"td\",null,{}],[\"$\",\"td\",null,{\"children\":\"primary\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"query\"}]}],[\"$\",\"td\",null,{}],[\"$\",\"td\",null,{\"children\":\"primary\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"procedure\"}]}],[\"$\",\"td\",null,{}],[\"$\",\"td\",null,{\"children\":\"primary\"}]]}],[\"$\",\"tr\",null,{\"children\":[[\"$\",\"td\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"subscription\"}]}],[\"$\",\"td\",null,{}],[\"$\",\"td\",null,{\"children\":\"primary\"}]]}]]}]]}],\"\\n\",[\"$\",\"$L5\",null,{\"level\":2,\"id\":\"lexicon-files\",\"children\":\"Lexicon Files\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Lexicons are JSON files associated with a single NSID. A file contains one or more definitions, each with a distinct short name. A definition with the name \",[\"$\",\"$L6\",null,{\"children\":\"main\"}],\" optionally describes the \\\"primary\\\" definition for the entire file. A Lexicon with zero definitions is invalid.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"A Lexicon JSON file is an object with the following fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"lexicon\"}],\" (integer, required): indicates Lexicon language version. In this version, a fixed value of \",[\"$\",\"$L6\",null,{\"children\":\"1\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"id\"}],\" (string, required): the NSID of the Lexicon\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"revision\"}],\" (integer, optional): indicates the version of this Lexicon, if changes have occurred\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"description\"}],\" (string, optional): short overview of the Lexicon, usually one or two sentences\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"defs\"}],\" (map of strings-to-objects, required): set of definitions, each with a distinct name (key)\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Schema definitions under \",[\"$\",\"$L6\",null,{\"children\":\"defs\"}],\" all have a \",[\"$\",\"$L6\",null,{\"children\":\"type\"}],\" field to distinguish their type. A file can have at most one definition with one of the \\\"primary\\\" types. Primary types should always have the name \",[\"$\",\"$L6\",null,{\"children\":\"main\"}],\". It is possible for \",[\"$\",\"$L6\",null,{\"children\":\"main\"}],\" to describe a non-primary type.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"References to specific definitions within a Lexicon use fragment syntax, like \",[\"$\",\"$L6\",null,{\"children\":\"com.example.defs#someView\"}],\". If a \",[\"$\",\"$L6\",null,{\"children\":\"main\"}],\" definition exists, it can be referenced without a fragment, just using the NSID. For references in the \",[\"$\",\"$L6\",null,{\"children\":\"$$type\"}],\" fields in data objects themselves (eg, records or contents of a union), this is a \\\"must\\\" (use of a \",[\"$\",\"$L6\",null,{\"children\":\"#main\"}],\" suffix is invalid). For example, \",[\"$\",\"$L6\",null,{\"children\":\"com.example.record\"}],\" not \",[\"$\",\"$L6\",null,{\"children\":\"com.example.record#main\"}],\".\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"The semantics of the \",[\"$\",\"$L6\",null,{\"children\":\"revision\"}],\" field have not been worked out yet, but are intended to help third parties identity the most recent among multiple versions or copies of a Lexicon.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Related Lexicons are often grouped together in the NSID hierarchy. As a convention, any definitions used by multiple Lexicons are defined in a dedicated \",[\"$\",\"$L6\",null,{\"children\":\"*.defs\"}],\" Lexicon (eg, \",[\"$\",\"$L6\",null,{\"children\":\"com.atproto.server.defs\"}],\") within the group. A \",[\"$\",\"$L6\",null,{\"children\":\"*.defs\"}],\" Lexicon should generally not include a definition named \",[\"$\",\"$L6\",null,{\"children\":\"main\"}],\", though it is not strictly invalid to do so.\"]}],\"\\n\",[\"$\",\"$L5\",null,{\"level\":2,\"id\":\"primary-type-definitions\",\"children\":\"Primary Type Definitions\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"The primary types are:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"query\"}],\": describes an XRPC Query (HTTP GET)\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"procedure\"}],\": describes an XRPC Procedure (HTTP POST)\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"subscription\"}],\": Event Stream (WebSocket)\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"record\"}],\": describes an object that can be stored in a repository record\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Each primary definition schema object includes these fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"type\"}],\" (string, required): the type value (eg, \",[\"$\",\"$L6\",null,{\"children\":\"record\"}],\" for records)\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"description\"}],\" (string, optional): short, usually only a sentence or two\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":\"Record\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"key\"}],\" (string, required): specifies the \",[\"$\",\"$L4\",null,{\"href\":\"/specs/record-key\",\"children\":\"Record Key type\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"record\"}],\" (object, required): a schema definition with type \",[\"$\",\"$L6\",null,{\"children\":\"object\"}],\", which specifies this type of record\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":\"Query and Procedure (HTTP API)\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"parameters\"}],\" (object, optional): a schema definition with type \",[\"$\",\"$L6\",null,{\"children\":\"params\"}],\", describing the HTTP query parameters for this endpoint\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"output\"}],\" (object, optional): describes the HTTP response body\",\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"description\"}],\" (string, optional): short description\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"encoding\"}],\" (string, required): MIME type for body contents. Use \",[\"$\",\"$L6\",null,{\"children\":\"application/json\"}],\" for JSON responses.\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"schema\"}],\" (object, optional): schema definition, either an \",[\"$\",\"$L6\",null,{\"children\":\"object\"}],\", a \",[\"$\",\"$L6\",null,{\"children\":\"ref\"}],\", or a \",[\"$\",\"$L6\",null,{\"children\":\"union\"}],\" of refs. Used to describe JSON encoded responses, though schema is optional even for JSON responses.\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"input\"}],\" (object, optional, only for \",[\"$\",\"$L6\",null,{\"children\":\"procedure\"}],\"): describes HTTP request body schema, with the same format as the \",[\"$\",\"$L6\",null,{\"children\":\"output\"}],\" field\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"errors\"}],\" (array of objects, optional): set of string error codes which might be returned\",\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"name\"}],\" (string, required): short name for the error type, with no whitespace\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"description\"}],\" (string, optional): short description, one or two sentences\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":\"Subscription (Event Stream)\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"parameters\"}],\" (object, optional): same as Query and Procedure\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"message\"}],\" (object, optional): specifies what messages can be\",\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"description\"}],\" (string, optional): short description\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"schema\"}],\" (object, required): schema definition, which must be a \",[\"$\",\"$L6\",null,{\"children\":\"union\"}],\" of refs\"]}],\"\\n\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"errors\"}],\" (array of objects, optional): same as Query and Procedure\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Subscription schemas (referenced by the \",[\"$\",\"$L6\",null,{\"children\":\"schema\"}],\" field under \",[\"$\",\"$L6\",null,{\"children\":\"message\"}],\") must be a \",[\"$\",\"$L6\",null,{\"children\":\"union\"}],\" of refs, not an \",[\"$\",\"$L6\",null,{\"children\":\"object\"}],\" type.\"]}],\"\\n\",[\"$\",\"$L5\",null,{\"level\":2,\"id\":\"field-type-definitions\",\"children\":\"Field Type Definitions\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"As with the primary definitions, every schema object includes these fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"type\"}],\" (string, required): fixed value for each type\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"description\"}],\" (string, optional): short, usually only a sentence or two\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"null\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"No additional fields.\"}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"boolean\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"default\"}],\" (boolean, optional): a default value for this field\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"const\"}],\" (boolean, optional): a fixed (constant) value for this field\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"When included as an HTTP query parameter, should be rendered as \",[\"$\",\"$L6\",null,{\"children\":\"true\"}],\" or \",[\"$\",\"$L6\",null,{\"children\":\"false\"}],\" (no quotes).\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"integer\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"A signed integer number.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"minimum\"}],\" (integer, optional): minimum acceptable value\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"maximum\"}],\" (integer, optional): maximum acceptable value\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"enum\"}],\" (array of integers, optional): a closed set of allowed values\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"default\"}],\" (integer, optional): a default value for this field\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"const\"}],\" (integer, optional): a fixed (constant) value for this field\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"string\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"format\"}],\" (string, optional): string format restriction\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"maxLength\"}],\" (integer, optional): maximum length of value, in UTF-8 bytes\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"minLength\"}],\" (integer, optional): minimum length of value, in UTF-8 bytes\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"maxGraphemes\"}],\" (integer, optional): maximum length of value, counted as Unicode Grapheme Clusters\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"minGraphemes\"}],\" (integer, optional): minimum length of value, counted as Unicode Grapheme Clusters\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"knownValues\"}],\" (array of strings, optional): a set of suggested or common values for this field. Values are not limited to this set (aka, not a closed enum).\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"enum\"}],\" (array of strings, optional): a closed set of allowed values\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"default\"}],\" (string, optional): a default value for this field\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"const\"}],\" (string, optional): a fixed (constant) value for this field\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Strings are Unicode. For non-Unicode encodings, use \",[\"$\",\"$L6\",null,{\"children\":\"bytes\"}],\" instead. The basic \",[\"$\",\"$L6\",null,{\"children\":\"minLength\"}],\"/\",[\"$\",\"$L6\",null,{\"children\":\"maxLength\"}],\" validation constraints are counted as UTF-8 bytes. Note that Javascript stores strings with UTF-16 by default, and it is necessary to re-encode to count accurately. The \",[\"$\",\"$L6\",null,{\"children\":\"minGraphemes\"}],\"/\",[\"$\",\"$L6\",null,{\"children\":\"maxGraphemes\"}],\" validation constraints work with Grapheme Clusters, which have a complex technical and linguistic definition, but loosely correspond to \\\"distinct visual characters\\\" like Latin letters, CJK characters, punctuation, digits, or emoji (which might comprise multiple Unicode codepoints and many UTF-8 bytes).\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"format\"}],\" constrains the string format and provides additional semantic context. Refer to the Data Model specification for the available format types and their definitions.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"const\"}],\" and \",[\"$\",\"$L6\",null,{\"children\":\"default\"}],\" are mutually exclusive.\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"bytes\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"minLength\"}],\" (integer, optional): minimum size of value, as raw bytes with no encoding\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"maxLength\"}],\" (integer, optional): maximum size of value, as raw bytes with no encoding\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"cid-link\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"No type-specific fields.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"See \",[\"$\",\"$L4\",null,{\"href\":\"/specs/data-model\",\"children\":\"Data Model spec\"}],\" for CID restrictions.\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"array\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"items\"}],\" (object, required): describes the schema elements of this array\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"minLength\"}],\" (integer, optional): minimum count of elements in array\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"maxLength\"}],\" (integer, optional): maximum count of elements in array\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"In theory arrays have homogeneous types (meaning every element as the same type). However, with union types this restriction is meaningless, so implementations can not assume that all the elements have the same type.\"}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"object\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"A generic object schema which can be nested inside other definitions by reference.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"properties\"}],\" (map of strings-to-objects, required): defines the properties (fields) by name, each with their own schema\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"required\"}],\" (array of strings, optional): indicates which properties are required\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"nullable\"}],\" (array of strings, optional): indicates which properties can have \",[\"$\",\"$L6\",null,{\"children\":\"null\"}],\" as a value\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"As described in the data model specification, there is a semantic difference in data between omitting a field; including the field with the value \",[\"$\",\"$L6\",null,{\"children\":\"null\"}],\"; and including the field with a \\\"false-y\\\" value (\",[\"$\",\"$L6\",null,{\"children\":\"false\"}],\", \",[\"$\",\"$L6\",null,{\"children\":\"0\"}],\", empty array, etc).\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"blob\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"accept\"}],\" (array of strings, optional): list of acceptable MIME types. Each may end in \",[\"$\",\"$L6\",null,{\"children\":\"*\"}],\" as a glob pattern (eg, \",[\"$\",\"$L6\",null,{\"children\":\"image/*\"}],\"). Use \",[\"$\",\"$L6\",null,{\"children\":\"*/*\"}],\" to indicate that any MIME type is accepted.\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"maxSize\"}],\" (integer, optional): maximum size in bytes\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"params\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"This is a limited-scope type which is only ever used for the \",[\"$\",\"$L6\",null,{\"children\":\"parameters\"}],\" field on \",[\"$\",\"$L6\",null,{\"children\":\"query\"}],\", \",[\"$\",\"$L6\",null,{\"children\":\"procedure\"}],\", and \",[\"$\",\"$L6\",null,{\"children\":\"subscription\"}],\" primary types. These map to HTTP query parameters.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"required\"}],\" (array of strings, optional): same semantics as field on \",[\"$\",\"$L6\",null,{\"children\":\"object\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"properties\"}],\": similar to properties under \",[\"$\",\"$L6\",null,{\"children\":\"object\"}],\", but can only include the types \",[\"$\",\"$L6\",null,{\"children\":\"boolean\"}],\", \",[\"$\",\"$L6\",null,{\"children\":\"integer\"}],\", \",[\"$\",\"$L6\",null,{\"children\":\"string\"}],\", and \",[\"$\",\"$L6\",null,{\"children\":\"unknown\"}],\"; or an \",[\"$\",\"$L6\",null,{\"children\":\"array\"}],\" of one of these types\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Note that unlike \",[\"$\",\"$L6\",null,{\"children\":\"object\"}],\", there is no \",[\"$\",\"$L6\",null,{\"children\":\"nullable\"}],\" field on \",[\"$\",\"$L6\",null,{\"children\":\"params\"}],\".\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"token\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Tokens are empty data values which exist only to be referenced by name. They are used to define a set of values with specific meanings. The \",[\"$\",\"$L6\",null,{\"children\":\"description\"}],\" field should clarify the meaning of the token. Tokens encode as string data, with the string being the fully-qualified reference to the token itself (NSID followed by an optional fragment).\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Tokens are similar to the concept of a \\\"symbol\\\" in some programming languages, distinct from strings, variables, built-in keywords, or other identifiers.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"For example, tokens could be defined to represent the state of an entity (in a state machine), or to enumerate a list of categories.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"No type-specific fields.\"}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"ref\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"ref\"}],\" (string, required): reference to another schema definition\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Refs are a mechanism for re-using a schema definition in multiple places. The \",[\"$\",\"$L6\",null,{\"children\":\"ref\"}],\" string can be a global reference to a Lexicon type definition (an NSID, optionally with a \",[\"$\",\"$L6\",null,{\"children\":\"#\"}],\"-delimited name indicating a definition other than \",[\"$\",\"$L6\",null,{\"children\":\"main\"}],\"), or can indicate a local definition within the same Lexicon file (a \",[\"$\",\"$L6\",null,{\"children\":\"#\"}],\" followed by a name).\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"union\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Type-specific fields:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"refs\"}],\" (array of strings, required): references to schema definitions\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"closed\"}],\" (boolean, optional): indicates if a union is \\\"open\\\" or \\\"closed\\\". defaults to \",[\"$\",\"$L6\",null,{\"children\":\"false\"}],\" (open union)\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Unions represent that multiple possible types could be present at this location in the schema. The references follow the same syntax as \",[\"$\",\"$L6\",null,{\"children\":\"ref\"}],\", allowing references to both global or local schema definitions. Actual data will validate against a single specific type: the union does not \",[\"$\",\"em\",null,{\"children\":\"combine\"}],\" fields from multiple schemas, or define a new \",[\"$\",\"em\",null,{\"children\":\"hybrid\"}],\" data type. The different types are referred to as \",[\"$\",\"strong\",null,{\"children\":\"variants\"}],\".\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"By default unions are \\\"open\\\", meaning that future revisions of the schema could add more types to the list of refs (though can not remove types). This means that implementations should be permissive when validating, in case they do not have the most recent version of the Lexicon. The \",[\"$\",\"$L6\",null,{\"children\":\"closed\"}],\" flag (boolean) can indicate that the set of types is fixed and can not be extended in the future.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"A \",[\"$\",\"$L6\",null,{\"children\":\"union\"}],\" schema definition with no \",[\"$\",\"$L6\",null,{\"children\":\"refs\"}],\" is allowed and similar to \",[\"$\",\"$L6\",null,{\"children\":\"unknown\"}],\", as long as the \",[\"$\",\"$L6\",null,{\"children\":\"closed\"}],\" flag is false (the default). The main difference is that the data would be required to have the \",[\"$\",\"$L6\",null,{\"children\":\"$$type\"}],\" field. An empty refs list with \",[\"$\",\"$L6\",null,{\"children\":\"closed\"}],\" set to true is an invalid schema.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"The schema definitions pointed to by a \",[\"$\",\"$L6\",null,{\"children\":\"union\"}],\" are objects or types with a clear mapping to an object, like a \",[\"$\",\"$L6\",null,{\"children\":\"record\"}],\". All the variants must be represented by a CBOR map (or JSON Object) and must include a \",[\"$\",\"$L6\",null,{\"children\":\"$$type\"}],\" field indicating the variant type. Because the data must be an object, unions can not reference \",[\"$\",\"$L6\",null,{\"children\":\"token\"}],\" (which would correspnod to string data).\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"unknown\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Indicates than any data object could appear at this location, with no specific validation. The top-level data must be an object (not a string, boolean, etc). As with all other data types, the value \",[\"$\",\"$L6\",null,{\"children\":\"null\"}],\" is not allowed unless the field is specifically marked as \",[\"$\",\"$L6\",null,{\"children\":\"nullable\"}],\".\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"The data object may contain a \",[\"$\",\"$L6\",null,{\"children\":\"$$type\"}],\" field indicating the schema of the data, but this is not currently required. The top-level data object must not have the structure of a compound data type, like blob (\",[\"$\",\"$L6\",null,{\"children\":\"$$type: blob\"}],\") or CID link (\",[\"$\",\"$L6\",null,{\"children\":\"$$link\"}],\").\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"The (nested) contents of the data object must still be valid under the atproto data model. For example, it should not contain floats. Nested compound types like blobs and CID links should be validated and transformed as expected.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Lexicon designers are strongly recommended to not use \",[\"$\",\"$L6\",null,{\"children\":\"unknown\"}],\" fields in \",[\"$\",\"$L6\",null,{\"children\":\"record\"}],\" objects for now.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"No type-specific fields.\"}],\"\\n\",[\"$\",\"$L5\",null,{\"level\":2,\"id\":\"string-formats\",\"children\":\"String Formats\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Strings can optionally be constrained to one of the following \",[\"$\",\"$L6\",null,{\"children\":\"format\"}],\" types:\"]}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"at-identifier\"}],\": either a \",[\"$\",\"$L4\",null,{\"href\":\"/specs/handle\",\"children\":\"Handle\"}],\" or a \",[\"$\",\"$L4\",null,{\"href\":\"/specs/did\",\"children\":\"DID\"}],\", details described below\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"at-uri\"}],\": \",[\"$\",\"$L4\",null,{\"href\":\"/specs/at-uri-scheme\",\"children\":\"AT-URI\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"cid\"}],\": CID in string format, details specified in \",[\"$\",\"$L4\",null,{\"href\":\"/specs/data-model\",\"children\":\"Data Model\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"datetime\"}],\": timestamp, details specified below\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"did\"}],\": generic \",[\"$\",\"$L4\",null,{\"href\":\"/specs/did\",\"children\":\"DID Identifier\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"handle\"}],\": \",[\"$\",\"$L4\",null,{\"href\":\"/specs/handle\",\"children\":\"Handle Identifier\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"nsid\"}],\": \",[\"$\",\"$L4\",null,{\"href\":\"/specs/nsid\",\"children\":\"Namespaced Identifier\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"tid\"}],\": \",[\"$\",\"$L4\",null,{\"href\":\"/specs/record-key#record-key-type-tid\",\"children\":\"Timestamp Identifier (TID)\"}]]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"record-key\"}],\": \",[\"$\",\"$L4\",null,{\"href\":\"/specs/record-key\",\"children\":\"Record Key\"}],\", matching the general syntax (\\\"any\\\")\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"uri\"}],\": generic URI, details specified below\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"language\"}],\": language code, details specified below\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"For the various identifier formats, when doing Lexicon schema validation the most expansive identifier syntax format should be permitted. Problems with identifiers which do pass basic syntax validation should be reported as application errors, not lexicon data validation errors. For example, data with any kind of DID in a \",[\"$\",\"$L6\",null,{\"children\":\"did\"}],\" format string field should pass Lexicon validation, with unsupported DID methods being raised separately as an application error.\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"at-identifier\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"A string type which is either a DID (type: did) or a handle (handle). Mostly used in XRPC query parameters. It is unambiguous whether an at-identifier is a handle or a DID because a DID always starts with did:, and the colon character (:) is not an allowed in handles.\"}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"datetime\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Full-precision date and time, with timezone information.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"This format is intended for use with computer-generated timestamps in the modern computing era (eg, after the UNIX epoch). If you need to represent historical or ancient events, ambiguity, or far-future times, a different format is probably more appropriate. Datetimes before the Current Era (year zero) as specifically disallowed.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Datetime format standards are notoriously flexible and overlapping. Datetime strings in atproto should meet the \",[\"$\",\"$L4\",null,{\"href\":\"https://ijmacd.github.io/rfc3339-iso8601/\",\"children\":\"intersecting\"}],\" requirements of the \",[\"$\",\"$L4\",null,{\"href\":\"https://www.rfc-editor.org/rfc/rfc3339\",\"children\":\"RFC 3339\"}],\", \",[\"$\",\"$L4\",null,{\"href\":\"https://en.wikipedia.org/wiki/ISO_8601\",\"children\":\"ISO 8601\"}],\", and \",[\"$\",\"$L4\",null,{\"href\":\"https://html.spec.whatwg.org/#dates-and-times\",\"children\":\"WHATWG HTML\"}],\" datetime standards.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"The character separating \\\"date\\\" and \\\"time\\\" parts must be an upper-case \",[\"$\",\"$L6\",null,{\"children\":\"T\"}],\".\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Timezone specification is required. It is \",[\"$\",\"em\",null,{\"children\":\"strongly\"}],\" preferred to use the UTC timezone, and to represent the timezone with a simple capital \",[\"$\",\"$L6\",null,{\"children\":\"Z\"}],\" suffix (lower-case is not allowed). While hour/minute suffix syntax (like \",[\"$\",\"$L6\",null,{\"children\":\"+01:00\"}],\" or \",[\"$\",\"$L6\",null,{\"children\":\"-10:30\"}],\") is supported, \\\"negative zero\\\" (\",[\"$\",\"$L6\",null,{\"children\":\"-00:00\"}],\") is specifically disallowed (by ISO 8601).\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Whole seconds precision is required, and arbitrary fractional precision digits are allowed. Best practice is to use at least millisecond precision, and to pad with zeros to the generated precision (eg, trailing \",[\"$\",\"$L6\",null,{\"children\":\":12.340Z\"}],\" instead of \",[\"$\",\"$L6\",null,{\"children\":\":12.34Z\"}],\"). Not all datetime formatting libraries support trailing zero formatting. Both millisecond and microsecond precision have reasonable cross-language support; nanosecond precision does not.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Implementations should be aware when round-tripping records containing datetimes of two ambiguities: loss-of-precision, and ambiguity with trailing fractional second zeros. If de-serializing Lexicon records in to native types, and then re-serializing, the string representation may not be the same, which could result in broken hash references, sanity check failures, or repository update churn. A safer thing to do is to deserialize the datetime as a simple string, which ensures round-trip re-serialization.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Implementations \\\"should\\\" validate that the semantics of the datetime are valid. For example, a month or day \",[\"$\",\"$L6\",null,{\"children\":\"00\"}],\" is invalid.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Valid examples:\"}],\"\\n\",[\"$\",\"$L7\",null,{\"language\":\"text\",\"code\":\"# preferred\\n1985-04-12T23:20:50.123Z\\n1985-04-12T23:20:50.123456Z\\n1985-04-12T23:20:50.120Z\\n1985-04-12T23:20:50.120000Z\\n\\n# supported\\n1985-04-12T23:20:50.12345678912345Z\\n1985-04-12T23:20:50Z\\n1985-04-12T23:20:50.0Z\\n1985-04-12T23:20:50.123+00:00\\n1985-04-12T23:20:50.123-07:00\\n\",\"children\":[\"$\",\"$L6\",null,{\"className\":\"language-text\",\"children\":\"\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e# preferred\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e1985-04-12T23:20:50.123Z\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e1985-04-12T23:20:50.123456Z\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e1985-04-12T23:20:50.120Z\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e1985-04-12T23:20:50.120000Z\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e# supported\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e1985-04-12T23:20:50.12345678912345Z\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e1985-04-12T23:20:50Z\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e1985-04-12T23:20:50.0Z\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e1985-04-12T23:20:50.123+00:00\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e1985-04-12T23:20:50.123-07:00\u003c/span\u003e\u003c/span\u003e\\n\u003cspan\u003e\u003cspan style=\\\"color: undefined\\\"\u003e\u003c/span\u003e\u003c/span\u003e\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Invalid examples:\"}],\"\\n\",[\"$\",\"$L7\",null,{\"language\":\"text\",\"code\":\"1985-04-12\\n1985-04-12T23:20Z\\n1985-04-12T23:20:5Z\\n1985-04-12T23:20:50.123\\n+001985-04-12T23:20:50.123Z\\n23:20:50.123Z\\n-1985-04-12T23:20:50.123Z\\n1985-4-12T23:20:50.123Z\\n01985-04-12T23:20:50.123Z\\n1985-04-12T23:20:50.123+00\\n1985-04-12T23:20:50.123+0000\\n\\n# ISO-8601 strict capitalization\\n1985-04-12t23:20:50.123Z\\n1985-04-12T23:20:50.123z\\n\\n# RFC-3339, but not ISO-8601\\n1985-04-12T23:20:50.123-00:00\\n1985-04-12 23:20:50.123Z\\n\\n# timezone is required\\n1985-04-12T23:20:50.123\\n\\n# syntax looks ok, but datetime is not valid\\n1985-04-12T23:99:50.123Z\\n1985-00-12T23:20:50.123Z\\n\",\"children\":[\"$\",\"$L6\",null,{\"className\":\"language-text\",\"children\":\"$8\"}]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"uri\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Flexible to any URI schema, following the generic RFC-3986 on URIs. This includes, but isn’t limited to: \",[\"$\",\"$L6\",null,{\"children\":\"did\"}],\", \",[\"$\",\"$L6\",null,{\"children\":\"https\"}],\", \",[\"$\",\"$L6\",null,{\"children\":\"wss\"}],\", \",[\"$\",\"$L6\",null,{\"children\":\"ipfs\"}],\" (for CIDs), \",[\"$\",\"$L6\",null,{\"children\":\"dns\"}],\", and of course \",[\"$\",\"$L6\",null,{\"children\":\"at\"}],\".\\nMaximum length in Lexicons is 8 KBytes.\"]}],\"\\n\",[\"$\",\"h3\",null,{\"children\":[\"$\",\"$L6\",null,{\"children\":\"language\"}]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"An \",[\"$\",\"$L4\",null,{\"href\":\"https://en.wikipedia.org/wiki/IETF_language_tag\",\"children\":\"IETF Language Tag\"}],\" string, compliant with \",[\"$\",\"$L4\",null,{\"href\":\"https://www.rfc-editor.org/info/bcp47\",\"children\":\"BCP 47\"}],\", defined in \",[\"$\",\"$L4\",null,{\"href\":\"https://www.rfc-editor.org/rfc/rfc5646.txt\",\"children\":\"RFC 5646\"}],\" (\\\"Tags for Identifying Languages\\\"). This is the same standard used to identify languages in HTTP, HTML, and other web standards. The Lexicon string must validate as a \\\"well-formed\\\" language tag, as defined in the RFC. Clients should ignore language strings which are \\\"well-formed\\\" but not \\\"valid\\\" according to the RFC.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"As specified in the RFC, ISO 639 two-character and three-character language codes can be used on their own, lower-cased, such as \",[\"$\",\"$L6\",null,{\"children\":\"ja\"}],\" (Japanese) or \",[\"$\",\"$L6\",null,{\"children\":\"ban\"}],\" (Balinese). Regional sub-tags can be added, like \",[\"$\",\"$L6\",null,{\"children\":\"pt-BR\"}],\" (Brazilian Portuguese). Additional subtags can also be added, such as \",[\"$\",\"$L6\",null,{\"children\":\"hy-Latn-IT-arevela\"}],\".\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Language codes generally need to be parsed, normalized, and matched semantically, not simply string-compared. For example, a search engine might simplify language tags to ISO 639 codes for indexing and filtering, while a client application (user agent) would retain the full language code for presentation (text rendering) locally.\"}],\"\\n\",[\"$\",\"$L5\",null,{\"level\":2,\"id\":\"when-to-use-type\",\"children\":[\"When to use \",[\"$\",\"$L6\",null,{\"children\":\"$$type\"}]]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Data objects sometimes include a \",[\"$\",\"$L6\",null,{\"children\":\"$$type\"}],\" field which indicates their Lexicon type. The general principle is that this field needs to be included any time there could be ambiguity about the content type when validating data.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"The specific rules are:\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"record\"}],\" objects must always include \",[\"$\",\"$L6\",null,{\"children\":\"$$type\"}],\". While the type is often known from context (eg, the collection part of the path for records stored in a repository), record objects can also be passed around outside of repositories and need to be self-describing\"]}],\"\\n\",[\"$\",\"li\",null,{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"union\"}],\" variants must always include \",[\"$\",\"$L6\",null,{\"children\":\"$$type\"}],\", except at the top level of \",[\"$\",\"$L6\",null,{\"children\":\"subscription\"}],\" messages\"]}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"Note that \",[\"$\",\"$L6\",null,{\"children\":\"blob\"}],\" objects always include \",[\"$\",\"$L6\",null,{\"children\":\"$$type\"}],\", which allows generic processing.\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"As a reminder, \",[\"$\",\"$L6\",null,{\"children\":\"main\"}],\" types must be referenced in \",[\"$\",\"$L6\",null,{\"children\":\"$$type\"}],\" fields as just the NSID, not including a \",[\"$\",\"$L6\",null,{\"children\":\"#main\"}],\" suffix.\"]}],\"\\n\",[\"$\",\"$L5\",null,{\"level\":2,\"id\":\"lexicon-evolution\",\"children\":\"Lexicon Evolution\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Lexicons are allowed to change over time, within some bounds to ensure both forwards and backwards compatibility. The basic principle is that all old data must still be valid under the updated Lexicon, and new data must be valid under the old Lexicon.\"}],\"\\n\",[\"$\",\"ul\",null,{\"children\":[\"\\n\",[\"$\",\"li\",null,{\"children\":\"Any new fields must be optional\"}],\"\\n\",[\"$\",\"li\",null,{\"children\":\"Non-optional fields can not be removed. A best practice is to retain all fields in the Lexicon and mark them as deprecated if they are no longer used.\"}],\"\\n\",[\"$\",\"li\",null,{\"children\":\"Types can not change\"}],\"\\n\",[\"$\",\"li\",null,{\"children\":\"Fields can not be renamed\"}],\"\\n\"]}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"If larger breaking changes are necessary, a new Lexicon name must be used.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"It can be ambiguous when a Lexicon has been published and becomes \\\"set in stone\\\". At a minimum, public adoption and implementation by a third party, even without explicit permission, indicates that the Lexicon has been released and should not break compatibility. A best practice is to clearly indicate in the Lexicon type name any experimental or development status. Eg, \",[\"$\",\"$L6\",null,{\"children\":\"com.corp.experimental.newRecord\"}],\".\"]}],\"\\n\",[\"$\",\"$L5\",null,{\"level\":2,\"id\":\"authority-and-control\",\"children\":\"Authority and Control\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"The authority for a Lexicon is determined by the NSID, and rooted in DNS control of the domain authority. That authority has ultimate control over the Lexicon definition, and responsibility for maintenance and distribution of Lexicon schema definitions.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"In a crisis, such as unintentional loss of DNS control to a bad actor, the protocol ecosystem could decide to disregard this chain of authority. This should only be done in exceptional circumstances, and not as a mechanism to subvert an active authority. The primary mechanism for resolving protocol disputes is to fork Lexicons in to a new namespace.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Protocol implementations should generally consider data which fails to validate against the Lexicon to be entirely invalid, and should not try to repair or do partial processing on the individual piece of data.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Unexpected fields in data which otherwise conforms to the Lexicon should be ignored. When doing schema validation, they should be treated at worst as warnings. This is necessary to allow evolution of the schema by the controlling authority, and to be robust in the case of out-of-date Lexicons.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Third parties can technically insert any additional fields they want in to data. This is not the recommended way to extend applications, but it is not specifically disallowed. One danger with this is that the Lexicon may be updated to include fields with the same field names but different types, which would make existing data invalid.\"}],\"\\n\",[\"$\",\"$L5\",null,{\"level\":2,\"id\":\"usage-and-implementation-guidelines\",\"children\":\"Usage and Implementation Guidelines\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"It should be possible to translate Lexicon schemas to JSON Schema or OpenAPI and use tools and libraries from those ecosystems to work with atproto data in JSON format.\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":\"Implementations which serialize and deserialize data from JSON or CBOR in to structures derived from specific Lexicons should be aware of the risk of \\\"clobbering\\\" unexpected fields. For example, if a Lexicon is updated to add a new (optional) field, old implementations would not be aware of that field, and might accidentally strip the data when de-serializing and then re-serializing. Depending on the context, one way to avoid this problem is to retain any \\\"extra\\\" fields, or to pass-through the original data object instead of re-serializing it.\"}],\"\\n\",[\"$\",\"$L5\",null,{\"level\":2,\"id\":\"possible-future-changes\",\"children\":\"Possible Future Changes\"}],\"\\n\",[\"$\",\"p\",null,{\"children\":[\"The validation rules for unexpected additional fields may change. For example, a mechanism for Lexicons to indicate that the schema is \\\"closed\\\" and unexpected fields are not allowed, or a convention around field name prefixes (\",[\"$\",\"$L6\",null,{\"children\":\"x-\"}],\") to indicate unofficial extension.\"]}]]}]}],null],null],null]},[null,[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$a\",\"children\",\"specs\",\"children\",\"lexicon\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[null,[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$a\",\"children\",\"specs\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/786ca9324488b5df.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],\"$Lc\"],null],null]},[null,[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]],null],\"couldBeIntercepted\":false,\"initialHead\":[null,\"$Ld\"],\"globalErrorComponent\":\"$e\",\"missingSlots\":\"$Wf\"}]\n"])</script><script>self.__next_f.push([1,"d:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Lexicon - AT Protocol\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"A schema definition language.\"}],[\"$\",\"meta\",\"4\",{\"property\":\"og:title\",\"content\":\"Lexicon - AT Protocol\"}],[\"$\",\"meta\",\"5\",{\"property\":\"og:description\",\"content\":\"A schema definition language.\"}],[\"$\",\"meta\",\"6\",{\"property\":\"og:url\",\"content\":\"https://atproto.com/\"}],[\"$\",\"meta\",\"7\",{\"property\":\"og:site_name\",\"content\":\"AT Protocol\"}],[\"$\",\"meta\",\"8\",{\"property\":\"og:image\",\"content\":\"https://atproto.com/default-social-card.png\"}],[\"$\",\"meta\",\"9\",{\"property\":\"og:image:secure_url\",\"content\":\"https://atproto.com/default-social-card.png\"}],[\"$\",\"meta\",\"10\",{\"property\":\"og:image:width\",\"content\":\"1200\"}],[\"$\",\"meta\",\"11\",{\"property\":\"og:image:height\",\"content\":\"630\"}],[\"$\",\"meta\",\"12\",{\"property\":\"og:type\",\"content\":\"website\"}],[\"$\",\"meta\",\"13\",{\"name\":\"twitter:card\",\"content\":\"summary_large_image\"}],[\"$\",\"meta\",\"14\",{\"name\":\"twitter:title\",\"content\":\"Lexicon - AT Protocol\"}],[\"$\",\"meta\",\"15\",{\"name\":\"twitter:description\",\"content\":\"A schema definition language.\"}],[\"$\",\"meta\",\"16\",{\"name\":\"twitter:image\",\"content\":\"https://atproto.com/default-social-card.png\"}]]\n3:null\n"])</script><script>self.__next_f.push([1,"10:I[5552,[\"972\",\"static/chunks/972-f3553dcbba031b91.js\",\"135\",\"static/chunks/135-8f28b0a70a96c388.js\",\"28\",\"static/chunks/28-313384c6289a00c0.js\",\"369\",\"static/chunks/369-a583bbb81b96a7d8.js\",\"212\",\"static/chunks/212-67e821188dcd5fb8.js\",\"60\",\"static/chunks/60-3e1824554a9cf3f8.js\",\"203\",\"static/chunks/app/%5Blocale%5D/layout-8706067c5d993875.js\"],\"Providers\"]\n11:I[5211,[\"972\",\"static/chunks/972-f3553dcbba031b91.js\",\"135\",\"static/chunks/135-8f28b0a70a96c388.js\",\"28\",\"static/chunks/28-313384c6289a00c0.js\",\"369\",\"static/chunks/369-a583bbb81b96a7d8.js\",\"212\",\"static/chunks/212-67e821188dcd5fb8.js\",\"60\",\"static/chunks/60-3e1824554a9cf3f8.js\",\"203\",\"static/chunks/app/%5Blocale%5D/layout-8706067c5d993875.js\"],\"Layout\"]\n"])</script><script>self.__next_f.push([1,"c:[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"h-full\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"flex min-h-full bg-white antialiased dark:bg-zinc-900\",\"children\":[\"$\",\"$L10\",null,{\"children\":[\"$\",\"div\",null,{\"className\":\"w-full\",\"children\":[\"$\",\"$L11\",null,{\"allSections\":{\"/en.mdx\":[],\"/ja.mdx\":[],\"/pt.mdx\":[],\"/explorer\":[],\"/articles/atproto-for-distsys-engineers/en.mdx\":[{\"title\":\"Scaling the traditional Web backend\",\"id\":\"scaling-the-traditional-web-backend\"},{\"title\":\"Decentralizing our high-scale backend\",\"id\":\"decentralizing-our-high-scale-backend\"},{\"title\":\"Unifying the data model\",\"id\":\"unifying-the-data-model\"},{\"title\":\"Charting the flow of data\",\"id\":\"charting-the-flow-of-data\"},{\"title\":\"Building practical open systems\",\"id\":\"building-practical-open-systems\"}],\"/articles/atproto-for-distsys-engineers/ja.mdx\":[{\"title\":\"従来の Web バックエンドのスケーリング\",\"id\":\"web\"},{\"title\":\"大規模バックエンドの分散化\",\"id\":\"\"},{\"title\":\"データ モデルの統合\",\"id\":\"\"},{\"title\":\"データの流れを図に表す\",\"id\":\"\"},{\"title\":\"実用的なオープン システムの構築\",\"id\":\"\"}],\"/articles/atproto-for-distsys-engineers/pt.mdx\":[{\"title\":\"Escalando o backend tradicional da Web\",\"id\":\"escalando-o-backend-tradicional-da-web\"},{\"title\":\"Descentralizando nosso backend de alta escala\",\"id\":\"descentralizando-nosso-backend-de-alta-escala\"},{\"title\":\"Unificando o modelo de dados\",\"id\":\"unificando-o-modelo-de-dados\"},{\"title\":\"Mapeando o fluxo de dados\",\"id\":\"mapeando-o-fluxo-de-dados\"},{\"title\":\"Construindo sistemas abertos práticos\",\"id\":\"construindo-sistemas-abertos-praticos\"}],\"/articles/why-atproto\":[],\"/sdks\":[{\"title\":\"Official libraries\",\"id\":\"official-libraries\"},{\"title\":\"Community libraries\",\"id\":\"community-libraries\"}],\"/guides/applications/en.mdx\":[{\"title\":\"Introduction\",\"id\":\"introduction\"},{\"title\":\"Step 1. Starting with our ExpressJS app\",\"id\":\"step-1-starting-with-our-express-js-app\"},{\"title\":\"Step 2. Signing in with OAuth\",\"id\":\"step-2-signing-in-with-o-auth\"},{\"title\":\"Step 3. Fetching the user's profile\",\"id\":\"step-3-fetching-the-users-profile\"},{\"title\":\"Step 4. Reading \u0026 writing records\",\"id\":\"step-4-reading-and-writing-records\"},{\"title\":\"Step 5. Creating a custom \\\"status\\\" schema\",\"id\":\"step-5-creating-a-custom-status-schema\"},{\"title\":\"Step 6. Listening to the firehose\",\"id\":\"step-6-listening-to-the-firehose\"},{\"title\":\"Step 7. Listing the latest statuses\",\"id\":\"step-7-listing-the-latest-statuses\"},{\"title\":\"Step 8. Optimistic updates\",\"id\":\"step-8-optimistic-updates\"},{\"title\":\"Thinking in AT Proto\",\"id\":\"thinking-in-at-proto\"},{\"title\":\"Next steps\",\"id\":\"next-steps\"}],\"/guides/applications/ja.mdx\":[{\"title\":\"はじめに\",\"id\":\"\"},{\"title\":\"ステップ 1. ExpressJS アプリから始める\",\"id\":\"1-express-js\"},{\"title\":\"ステップ 2. OAuth でサインイン\",\"id\":\"2-o-auth\"},{\"title\":\"ステップ 3. ユーザーのプロファイルを取得する\",\"id\":\"3\"},{\"title\":\"ステップ 4. レコードの読み取りと書き込み\",\"id\":\"4\"},{\"title\":\"ステップ 5. カスタムの「ステータス」スキーマの作成\",\"id\":\"5\"},{\"title\":\"ステップ 6. ファイアホースをリッスン\",\"id\":\"6\"},{\"title\":\"ステップ 7. 最新のステータスを一覧表示する\",\"id\":\"7\"},{\"title\":\"ステップ 8. 楽観的更新\",\"id\":\"8\"},{\"title\":\"AT Proto で考える\",\"id\":\"at-proto\"},{\"title\":\"次のステップ\",\"id\":\"\"}],\"/guides/applications/pt.mdx\":[{\"title\":\"Introdução\",\"id\":\"introducao\"},{\"title\":\"Etapa 1. Começando com nosso aplicativo ExpressJS\",\"id\":\"etapa-1-comecando-com-nosso-aplicativo-express-js\"},{\"title\":\"Etapa 2. Entrando com OAuth\",\"id\":\"etapa-2-entrando-com-o-auth\"},{\"title\":\"Etapa 3. Obtendo o perfil do usuário\",\"id\":\"etapa-3-obtendo-o-perfil-do-usuario\"},{\"title\":\"Etapa 4. Lendo e escrevendo registros\",\"id\":\"etapa-4-lendo-e-escrevendo-registros\"},{\"title\":\"Etapa 5. Criando um esquema de \\\"status\\\" personalizado\",\"id\":\"etapa-5-criando-um-esquema-de-status-personalizado\"},{\"title\":\"Etapa 6. Ouvindo o firehose\",\"id\":\"etapa-6-ouvindo-o-firehose\"},{\"title\":\"Etapa 7. Listando os status mais recentes\",\"id\":\"etapa-7-listando-os-status-mais-recentes\"},{\"title\":\"Etapa 8. Atualizações otimistas\",\"id\":\"etapa-8-atualizacoes-otimistas\"},{\"title\":\"Pensando em AT Proto\",\"id\":\"pensando-em-at-proto\"},{\"title\":\"Próximos passos\",\"id\":\"proximos-passos\"}],\"/guides/data-repos/en.mdx\":[{\"title\":\"Data Layout\",\"id\":\"data-layout\"},{\"title\":\"Identifier Types\",\"id\":\"identifier-types\"}],\"/guides/data-repos/ja.mdx\":[{\"title\":\"データ レイアウト\",\"id\":\"\"},{\"title\":\"識別子の種類\",\"id\":\"\"}],\"/guides/data-repos/pt.mdx\":[{\"title\":\"Layout de dados\",\"id\":\"layout-de-dados\"},{\"title\":\"Tipos de Identificadores\",\"id\":\"tipos-de-identificadores\"}],\"/guides/glossary/en.mdx\":[{\"title\":\"Atmosphere\",\"id\":\"atmosphere\"},{\"title\":\"AT Protocol\",\"id\":\"at-protocol\"},{\"title\":\"PDS (Personal Data Server)\",\"id\":\"pds-personal-data-server\"},{\"title\":\"AppView\",\"id\":\"app-view\"},{\"title\":\"Relay\",\"id\":\"relay\"},{\"title\":\"Lexicon\",\"id\":\"lexicon\"},{\"title\":\"Data Repo\",\"id\":\"data-repo\"},{\"title\":\"Collection\",\"id\":\"collection\"},{\"title\":\"Record\",\"id\":\"record\"},{\"title\":\"Blob\",\"id\":\"blob\"},{\"title\":\"Label\",\"id\":\"label\"},{\"title\":\"Handle\",\"id\":\"handle\"},{\"title\":\"DID (Decentralized ID)\",\"id\":\"did-decentralized-id\"},{\"title\":\"NSID (Namespaced ID)\",\"id\":\"nsid-namespaced-id\"},{\"title\":\"TID (Timestamp ID)\",\"id\":\"tid-timestamp-id\"},{\"title\":\"CID (Content ID)\",\"id\":\"cid-content-id\"},{\"title\":\"DAG-CBOR\",\"id\":\"dag-cbor\"},{\"title\":\"XRPC\",\"id\":\"xrpc\"}],\"/guides/glossary/ja.mdx\":[{\"title\":\"Atmosphere\",\"id\":\"atmosphere\"},{\"title\":\"AT プロトコル\",\"id\":\"at\"},{\"title\":\"PDS (パーソナル データ サーバー)\",\"id\":\"pds\"},{\"title\":\"AppView\",\"id\":\"app-view\"},{\"title\":\"リレー\",\"id\":\"\"},{\"title\":\"Lexicon\",\"id\":\"lexicon\"},{\"title\":\"データ リポジトリ\",\"id\":\"\"},{\"title\":\"コレクション\",\"id\":\"\"},{\"title\":\"レコード\",\"id\":\"\"},{\"title\":\"BLOB\",\"id\":\"blob\"},{\"title\":\"ラベル\",\"id\":\"\"},{\"title\":\"ハンドル\",\"id\":\"\"},{\"title\":\"DID (分散 ID)\",\"id\":\"did-id\"},{\"title\":\"NSID (名前空間 ID)\",\"id\":\"nsid-id\"},{\"title\":\"TID (タイムスタンプ ID)\",\"id\":\"tid-id\"},{\"title\":\"CID (コンテンツ ID)\",\"id\":\"cid-id\"},{\"title\":\"DAG-CBOR\",\"id\":\"dag-cbor\"},{\"title\":\"XRPC\",\"id\":\"xrpc\"}],\"/guides/glossary/pt.mdx\":[{\"title\":\"Atmosphere\",\"id\":\"atmosphere\"},{\"title\":\"AT Protocol\",\"id\":\"at-protocol\"},{\"title\":\"PDS (Personal Data Server)\",\"id\":\"pds-personal-data-server\"},{\"title\":\"AppView\",\"id\":\"app-view\"},{\"title\":\"Relay\",\"id\":\"relay\"},{\"title\":\"Lexicon\",\"id\":\"lexicon\"},{\"title\":\"Data Repo\",\"id\":\"data-repo\"},{\"title\":\"Collection\",\"id\":\"collection\"},{\"title\":\"Record\",\"id\":\"record\"},{\"title\":\"Blob\",\"id\":\"blob\"},{\"title\":\"Label\",\"id\":\"label\"},{\"title\":\"Handle\",\"id\":\"handle\"},{\"title\":\"DID (Decentralized ID)\",\"id\":\"did-decentralized-id\"},{\"title\":\"NSID (Namespaced ID)\",\"id\":\"nsid-namespaced-id\"},{\"title\":\"TID (Timestamp ID)\",\"id\":\"tid-timestamp-id\"},{\"title\":\"CID (Content ID)\",\"id\":\"cid-content-id\"},{\"title\":\"DAG-CBOR\",\"id\":\"dag-cbor\"},{\"title\":\"XRPC\",\"id\":\"xrpc\"}],\"/guides/faq/en.mdx\":[{\"title\":\"Is the AT Protocol a blockchain?\",\"id\":\"is-the-at-protocol-a-blockchain\"},{\"title\":\"Why not use ActivityPub?\",\"id\":\"why-not-use-activity-pub\"},{\"title\":\"Why create Lexicon instead of using JSON-LD or RDF?\",\"id\":\"why-create-lexicon-instead-of-using-json-ld-or-rdf\"},{\"title\":\"What is “XRPC,” and why not use ___?\",\"id\":\"what-is-xrpc-and-why-not-use\"}],\"/guides/faq/ja.mdx\":[{\"title\":\"AT プロトコルはブロックチェーンですか?\",\"id\":\"at\"},{\"title\":\"ActivityPub を使用しないのはなぜですか?\",\"id\":\"activity-pub\"},{\"title\":\"JSON-LD や RDF を使用する代わりに Lexicon を作成する理由\",\"id\":\"json-ld-rdf-lexicon\"},{\"title\":\"「XRPC」とは何ですか。なぜ ___ を使用しないのですか?\",\"id\":\"xrpc\"}],\"/guides/faq/pt.mdx\":[{\"title\":\"O Protocolo AT é uma blockchain?\",\"id\":\"o-protocolo-at-e-uma-blockchain\"},{\"title\":\"Por que não usar o ActivityPub?\",\"id\":\"por-que-nao-usar-o-activity-pub\"},{\"title\":\"Por que criar o Lexicon em vez de usar JSON-LD ou RDF?\",\"id\":\"por-que-criar-o-lexicon-em-vez-de-usar-json-ld-ou-rdf\"},{\"title\":\"O que é “XRPC” e por que não usar ___?\",\"id\":\"o-que-e-xrpc-e-por-que-nao-usar\"}],\"/guides/identity/en.mdx\":[{\"title\":\"Identifiers\",\"id\":\"identifiers\"},{\"title\":\"DID Methods\",\"id\":\"did-methods\"},{\"title\":\"Handle Resolution\",\"id\":\"handle-resolution\"}],\"/guides/identity/ja.mdx\":[{\"title\":\"識別子\",\"id\":\"\"},{\"title\":\"DID メソッド\",\"id\":\"did\"},{\"title\":\"ハンドル解決\",\"id\":\"\"}],\"/guides/identity/pt.mdx\":[{\"title\":\"Identificadores\",\"id\":\"identificadores\"},{\"title\":\"Métodos DID\",\"id\":\"metodos-did\"},{\"title\":\"Resolução de identificadores\",\"id\":\"resolucao-de-identificadores\"}],\"/guides/lexicon/en.mdx\":[{\"title\":\"Why is Lexicon needed?\",\"id\":\"why-is-lexicon-needed\"},{\"title\":\"HTTP API methods\",\"id\":\"http-api-methods\"},{\"title\":\"Record types\",\"id\":\"record-types\"},{\"title\":\"Tokens\",\"id\":\"tokens\"},{\"title\":\"Versioning\",\"id\":\"versioning\"},{\"title\":\"Schema distribution\",\"id\":\"schema-distribution\"}],\"/guides/lexicon/ja.mdx\":[{\"title\":\"Lexicon が必要な理由\",\"id\":\"lexicon\"},{\"title\":\"HTTP API メソッド\",\"id\":\"http-api\"},{\"title\":\"レコード タイプ\",\"id\":\"\"},{\"title\":\"トークン\",\"id\":\"\"},{\"title\":\"バージョン管理\",\"id\":\"\"},{\"title\":\"スキーマの配布\",\"id\":\"\"}],\"/guides/lexicon/pt.mdx\":[{\"title\":\"Por que o Lexicon é necessário?\",\"id\":\"por-que-o-lexicon-e-necessario\"},{\"title\":\"Métodos de API HTTP\",\"id\":\"metodos-de-api-http\"},{\"title\":\"Tipos de registro\",\"id\":\"tipos-de-registro\"},{\"title\":\"Tokens\",\"id\":\"tokens\"},{\"title\":\"Versionamento\",\"id\":\"versionamento\"},{\"title\":\"Distribuição de esquema\",\"id\":\"distribuicao-de-esquema\"}],\"/guides/overview/en.mdx\":[{\"title\":\"Identity\",\"id\":\"identity\"},{\"title\":\"Data repositories\",\"id\":\"data-repositories\"},{\"title\":\"Federation\",\"id\":\"federation\"},{\"title\":\"Interoperation\",\"id\":\"interoperation\"},{\"title\":\"Achieving scale\",\"id\":\"achieving-scale\"},{\"title\":\"Algorithmic choice\",\"id\":\"algorithmic-choice\"},{\"title\":\"Account portability\",\"id\":\"account-portability\"},{\"title\":\"Speech, reach, and moderation\",\"id\":\"speech-reach-and-moderation\"},{\"title\":\"Specifications\",\"id\":\"specifications\"}],\"/guides/overview/ja.mdx\":[{\"title\":\"アイデンティティ\",\"id\":\"\"},{\"title\":\"データ リポジトリ\",\"id\":\"\"},{\"title\":\"フェデレーション\",\"id\":\"\"},{\"title\":\"相互運用\",\"id\":\"\"},{\"title\":\"スケールの実現\",\"id\":\"\"},{\"title\":\"アルゴリズムの選択\",\"id\":\"\"},{\"title\":\"アカウントの移植性\",\"id\":\"\"},{\"title\":\"スピーチ、リーチ、モデレーション\",\"id\":\"\"},{\"title\":\"仕様\",\"id\":\"\"}],\"/guides/overview/pt.mdx\":[{\"title\":\"Identidade\",\"id\":\"identidade\"},{\"title\":\"Repositórios de dados\",\"id\":\"repositorios-de-dados\"},{\"title\":\"Federação\",\"id\":\"federacao\"},{\"title\":\"Interoperação\",\"id\":\"interoperacao\"},{\"title\":\"Alcançando escala\",\"id\":\"alcancando-escala\"},{\"title\":\"Escolha algorítmica\",\"id\":\"escolha-algoritmica\"},{\"title\":\"Portabilidade de conta\",\"id\":\"portabilidade-de-conta\"},{\"title\":\"Fala, alcance e moderação\",\"id\":\"fala-alcance-e-moderacao\"},{\"title\":\"Especificações\",\"id\":\"especificacoes\"}],\"/guides/self-hosting/en.mdx\":[{\"title\":\"Table of Contents\",\"id\":\"table-of-contents\"},{\"title\":\"Preparation for self-hosting PDS\",\"id\":\"preparation-for-self-hosting-pds\"},{\"title\":\"Open your cloud firewall for HTTP and HTTPS\",\"id\":\"open-your-cloud-firewall-for-http-and-https\"},{\"title\":\"Configure DNS for your domain\",\"id\":\"configure-dns-for-your-domain\"},{\"title\":\"Check that DNS is working as expected\",\"id\":\"check-that-dns-is-working-as-expected\"},{\"title\":\"Installer on Ubuntu 20.04/22.04 and Debian 11/12\",\"id\":\"installer-on-ubuntu-20-04-22-04-and-debian-11-12\"},{\"title\":\"Verifying that your PDS is online and accessible\",\"id\":\"verifying-that-your-pds-is-online-and-accessible\"},{\"title\":\"Creating an account using pdsadmin\",\"id\":\"creating-an-account-using-pdsadmin\"},{\"title\":\"Creating an account using an invite code\",\"id\":\"creating-an-account-using-an-invite-code\"},{\"title\":\"Using the Bluesky app with your PDS\",\"id\":\"using-the-bluesky-app-with-your-pds\"},{\"title\":\"Updating your PDS\",\"id\":\"updating-your-pds\"},{\"title\":\"Getting help\",\"id\":\"getting-help\"}],\"/guides/self-hosting/ja.mdx\":[{\"title\":\"目次\",\"id\":\"\"},{\"title\":\"セルフホスティング PDS の準備\",\"id\":\"pds\"},{\"title\":\"クラウド ファイアウォールを HTTP および HTTPS 用に開く\",\"id\":\"http-https\"},{\"title\":\"ドメインの DNS を構成する\",\"id\":\"dns\"},{\"title\":\"DNS が期待どおりに動作していることを確認します\",\"id\":\"dns-2\"},{\"title\":\"Ubuntu 20.04/22.04 および Debian 11/12 のインストーラー\",\"id\":\"ubuntu-20-04-22-04-debian-11-12\"},{\"title\":\"PDS がオンラインでアクセス可能であることを確認する\",\"id\":\"pds-2\"},{\"title\":\"pdsadmin を使用してアカウントを作成する\",\"id\":\"pdsadmin\"},{\"title\":\"招待コードを使用してアカウントを作成する\",\"id\":\"\"},{\"title\":\"PDS で Bluesky アプリを使用する\",\"id\":\"pds-bluesky\"},{\"title\":\"PDS の更新\",\"id\":\"pds-3\"},{\"title\":\"ヘルプの取得\",\"id\":\"\"}],\"/guides/self-hosting/pt.mdx\":[{\"title\":\"Índice\",\"id\":\"indice\"},{\"title\":\"Preparação para auto-hospedagem de PDS\",\"id\":\"preparacao-para-auto-hospedagem-de-pds\"},{\"title\":\"Abra seu firewall de nuvem para HTTP e HTTPS\",\"id\":\"abra-seu-firewall-de-nuvem-para-http-e-https\"},{\"title\":\"Configure o DNS para seu domínio\",\"id\":\"configure-o-dns-para-seu-dominio\"},{\"title\":\"Verifique se o DNS está funcionando conforme o esperado\",\"id\":\"verifique-se-o-dns-esta-funcionando-conforme-o-esperado\"},{\"title\":\"Instalador no Ubuntu 20.04/22.04 e Debian 11/12\",\"id\":\"instalador-no-ubuntu-20-04-22-04-e-debian-11-12\"},{\"title\":\"Verificando se seu PDS está online e acessível\",\"id\":\"verificando-se-seu-pds-esta-online-e-acessivel\"},{\"title\":\"Criando uma conta usando pdsadmin\",\"id\":\"criando-uma-conta-usando-pdsadmin\"},{\"title\":\"Criando uma conta usando um código de convite\",\"id\":\"criando-uma-conta-usando-um-codigo-de-convite\"},{\"title\":\"Usando o aplicativo Bluesky com seu PDS\",\"id\":\"usando-o-aplicativo-bluesky-com-seu-pds\"},{\"title\":\"Atualizando seu PDS\",\"id\":\"atualizando-seu-pds\"},{\"title\":\"Obtendo ajuda\",\"id\":\"obtendo-ajuda\"}],\"/specs/at-uri-scheme\":[],\"/specs/atp\":[{\"title\":\"Protocol Structure\",\"id\":\"protocol-structure\"},{\"title\":\"Protocol Extension and Applications\",\"id\":\"protocol-extension-and-applications\"},{\"title\":\"What Is Missing?\",\"id\":\"what-is-missing\"},{\"title\":\"Future Work\",\"id\":\"future-work\"}],\"/specs/blob\":[{\"title\":\"Blob Metadata\",\"id\":\"blob-metadata\"},{\"title\":\"Blob Lifecycle\",\"id\":\"blob-lifecycle\"},{\"title\":\"Usage and Implementation Guidelines\",\"id\":\"usage-and-implementation-guidelines\"},{\"title\":\"Security Considerations\",\"id\":\"security-considerations\"},{\"title\":\"Possible Future Changes\",\"id\":\"possible-future-changes\"}],\"/specs/cryptography\":[{\"title\":\"ECDSA Signature Malleability\",\"id\":\"ecdsa-signature-malleability\"},{\"title\":\"Public Key Encoding\",\"id\":\"public-key-encoding\"},{\"title\":\"Usage and Implementation Guidelines\",\"id\":\"usage-and-implementation-guidelines\"},{\"title\":\"Possible Future Changes\",\"id\":\"possible-future-changes\"}],\"/specs/data-model\":[{\"title\":\"Relationship With IPLD\",\"id\":\"relationship-with-ipld\"},{\"title\":\"Data Types\",\"id\":\"data-types\"},{\"title\":\"blob Type\",\"id\":\"blob-type\"},{\"title\":\"JSON Representation\",\"id\":\"json-representation\"},{\"title\":\"Link and CID Formats\",\"id\":\"link-and-cid-formats\"},{\"title\":\"Usage and Implementation Guidelines\",\"id\":\"usage-and-implementation-guidelines\"},{\"title\":\"Security and Privacy Considerations\",\"id\":\"security-and-privacy-considerations\"},{\"title\":\"Possible Future Changes\",\"id\":\"possible-future-changes\"}],\"/specs/did\":[{\"title\":\"Blessed DID Methods\",\"id\":\"blessed-did-methods\"},{\"title\":\"AT Protocol DID Identifier Syntax\",\"id\":\"at-protocol-did-identifier-syntax\"},{\"title\":\"DID Documents\",\"id\":\"did-documents\"},{\"title\":\"Representation of Public Keys\",\"id\":\"representation-of-public-keys\"},{\"title\":\"Usage and Implementation Guidelines\",\"id\":\"usage-and-implementation-guidelines\"},{\"title\":\"Possible Future Changes\",\"id\":\"possible-future-changes\"}],\"/specs/event-stream\":[{\"title\":\"Streaming Wire Protocol (v0)\",\"id\":\"streaming-wire-protocol-v0\"},{\"title\":\"Usage and Implementation Guidelines\",\"id\":\"usage-and-implementation-guidelines\"},{\"title\":\"Security and Privacy Considerations\",\"id\":\"security-and-privacy-considerations\"},{\"title\":\"Possible Future Changes\",\"id\":\"possible-future-changes\"}],\"/specs/handle\":[{\"title\":\"Handle Identifier Syntax\",\"id\":\"handle-identifier-syntax\"},{\"title\":\"Additional Non-Syntax Restrictions\",\"id\":\"additional-non-syntax-restrictions\"},{\"title\":\"Identifier Examples\",\"id\":\"identifier-examples\"},{\"title\":\"Handle Resolution\",\"id\":\"handle-resolution\"},{\"title\":\"Usage and Implementation Guidelines\",\"id\":\"usage-and-implementation-guidelines\"},{\"title\":\"Possible Future Changes\",\"id\":\"possible-future-changes\"}],\"/specs/label\":[{\"title\":\"Schema and Data Model\",\"id\":\"schema-and-data-model\"},{\"title\":\"Value\",\"id\":\"value\"},{\"title\":\"Label Lifecycle: Negation and Expiration\",\"id\":\"label-lifecycle-negation-and-expiration\"},{\"title\":\"Signatures\",\"id\":\"signatures\"},{\"title\":\"Self-Labels in Records\",\"id\":\"self-labels-in-records\"},{\"title\":\"Labeler Service Identity\",\"id\":\"labeler-service-identity\"},{\"title\":\"Label Distribution Endpoints\",\"id\":\"label-distribution-endpoints\"},{\"title\":\"Labeler HTTP Headers\",\"id\":\"labeler-http-headers\"},{\"title\":\"Security Considerations\",\"id\":\"security-considerations\"},{\"title\":\"Usage and Implementation Guidelines\",\"id\":\"usage-and-implementation-guidelines\"},{\"title\":\"Possible Future Changes\",\"id\":\"possible-future-changes\"}],\"/specs/nsid\":[],\"/specs/oauth\":[{\"title\":\"Clients\",\"id\":\"clients\"},{\"title\":\"Identity Authentication\",\"id\":\"identity-authentication\"},{\"title\":\"Authorization Scopes\",\"id\":\"authorization-scopes\"},{\"title\":\"Authorization Requests\",\"id\":\"authorization-requests\"},{\"title\":\"Tokens and Session Lifetime\",\"id\":\"tokens-and-session-lifetime\"},{\"title\":\"Demonstrating Proof of Possession (DPoP)\",\"id\":\"demonstrating-proof-of-possession-d-po-p\"},{\"title\":\"Authorization Servers\",\"id\":\"authorization-servers\"},{\"title\":\"Summary of Authorization Flow\",\"id\":\"summary-of-authorization-flow\"},{\"title\":\"Security Considerations\",\"id\":\"security-considerations\"},{\"title\":\"Possible Future Changes\",\"id\":\"possible-future-changes\"}],\"/specs/record-key\":[],\"/specs/repository\":[{\"title\":\"Repo Data Structure (v3)\",\"id\":\"repo-data-structure-v3\"},{\"title\":\"CAR File Serialization\",\"id\":\"car-file-serialization\"},{\"title\":\"Repository Diffs\",\"id\":\"repository-diffs\"},{\"title\":\"Security Considerations\",\"id\":\"security-considerations\"},{\"title\":\"Possible Future Changes\",\"id\":\"possible-future-changes\"}],\"/specs/xrpc\":[{\"title\":\"Lexicon HTTP Endpoints\",\"id\":\"lexicon-http-endpoints\"},{\"title\":\"Authentication\",\"id\":\"authentication\"},{\"title\":\"Service Proxying\",\"id\":\"service-proxying\"},{\"title\":\"Summary of HTTP Headers\",\"id\":\"summary-of-http-headers\"},{\"title\":\"Summary of HTTP Status Codes\",\"id\":\"summary-of-http-status-codes\"},{\"title\":\"Usage and Implementation Guidelines\",\"id\":\"usage-and-implementation-guidelines\"},{\"title\":\"Security and Privacy Considerations\",\"id\":\"security-and-privacy-considerations\"},{\"title\":\"Possible Future Changes\",\"id\":\"possible-future-changes\"}],\"/specs/lexicon\":[{\"title\":\"Overview of Types\",\"id\":\"overview-of-types\"},{\"title\":\"Lexicon Files\",\"id\":\"lexicon-files\"},{\"title\":\"Primary Type Definitions\",\"id\":\"primary-type-definitions\"},{\"title\":\"Field Type Definitions\",\"id\":\"field-type-definitions\"},{\"title\":\"String Formats\",\"id\":\"string-formats\"},{\"title\":\"When to use $type\",\"id\":\"when-to-use-type\"},{\"title\":\"Lexicon Evolution\",\"id\":\"lexicon-evolution\"},{\"title\":\"Authority and Control\",\"id\":\"authority-and-control\"},{\"title\":\"Usage and Implementation Guidelines\",\"id\":\"usage-and-implementation-guidelines\"},{\"title\":\"Possible Future Changes\",\"id\":\"possible-future-changes\"}]},\"children\":[\"$\",\"$L9\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"$a\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Lb\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"div\",null,{\"className\":\"absolute inset-0 -z-10 mx-0 max-w-none overflow-hidden\",\"children\":[\"$\",\"div\",null,{\"className\":\"absolute left-1/2 top-0 ml-[-38rem] h-[25rem] w-[81.25rem] dark:[mask-image:linear-gradient(white,transparent)]\",\"children\":[\"$\",\"div\",null,{\"className\":\"absolute inset-0 bg-gradient-to-r from-[#6fa5ff] to-[#9dc0fb] opacity-40 [mask-image:radial-gradient(farthest-side_at_top,white,transparent)] dark:from-[#0090f2]/30 dark:to-[#7588ff]/30 dark:opacity-100\",\"children\":[\"$\",\"svg\",null,{\"aria-hidden\":\"true\",\"className\":\"absolute inset-x-0 inset-y-[-50%] h-[200%] w-full fill-black/40 stroke-black/50 mix-blend-overlay dark:fill-white/2.5 dark:stroke-white/5\",\"children\":[[\"$\",\"defs\",null,{\"children\":[\"$\",\"pattern\",null,{\"id\":\":S1:\",\"width\":72,\"height\":56,\"patternUnits\":\"userSpaceOnUse\",\"x\":-12,\"y\":4,\"children\":[\"$\",\"path\",null,{\"d\":\"M.5 56V.5H72\",\"fill\":\"none\"}]}]}],[\"$\",\"rect\",null,{\"width\":\"100%\",\"height\":\"100%\",\"strokeWidth\":0,\"fill\":\"url(#:S1:)\"}],[\"$\",\"svg\",null,{\"x\":-12,\"y\":4,\"className\":\"overflow-visible\",\"children\":[]}]]}]}]}]}],[\"$\",\"div\",null,{\"className\":\"mx-auto flex h-full max-w-xl flex-col items-center justify-center py-16 text-center\",\"children\":[[\"$\",\"p\",null,{\"className\":\"text-sm font-semibold text-zinc-900 dark:text-white\",\"children\":\"404\"}],[\"$\",\"h1\",null,{\"className\":\"mt-2 text-2xl font-bold text-zinc-900 dark:text-white\",\"children\":\"Page not found\"}],[\"$\",\"p\",null,{\"className\":\"mt-2 text-base text-zinc-600 dark:text-zinc-400\",\"children\":\"Sorry, we couldn’t find the page you’re looking for.\"}],[\"$\",\"$L4\",null,{\"className\":\"inline-flex gap-0.5 justify-center overflow-hidden text-sm font-medium transition rounded-full bg-zinc-900 py-1 px-3 text-white hover:bg-zinc-700 dark:bg-blue-400/10 dark:text-blue-400 dark:ring-1 dark:ring-inset dark:ring-blue-400/20 dark:hover:bg-blue-400/10 dark:hover:text-blue-300 dark:hover:ring-blue-300 mt-8\",\"href\":\"/\",\"children\":[false,\"Back to docs\",[\"$\",\"svg\",null,{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"aria-hidden\":\"true\",\"className\":\"mt-0.5 h-5 w-5 -mr-1\",\"children\":[\"$\",\"path\",null,{\"stroke\":\"currentColor\",\"strokeLinecap\":\"round\",\"strokeLinejoin\":\"round\",\"d\":\"m11.5 6.5 3 3.5m0 0-3 3.5m3-3.5h-9\"}]}]]}]]}]],\"notFoundStyles\":[]}]}]}]}]}]}]\n"])</script></body></html>