Mint a long-lived PAT using your session JWT. Every step from here uses the PAT.
Your JWT is short-lived and scoped to an interactive session — fine for logging in and minting a token, not for anything running unattended. A Personal Access Token (PAT) is what your scripts, notebooks, CI jobs, and integrations use going forward. Long-lived, scope-limited, and issued against the workspace active on your JWT session at creation time.
The scopes above cover everything this walkthrough exercises. In your own integrations, request only what you actually need — smaller scope means smaller blast radius if a token leaks. See API Tokens for the full user scope reference.
A PAT is single-tenant — it stays scoped to the workspace active on the JWT session at creation. To create a token for a different workspace, switch workspaces on the JWT first (previous step), then create a new token.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"co-mind.ai","colors":{"primary":"#2563EB","light":"#60A5FA","dark":"#1E40AF"},"logo":{"light":"https://mintcdn.com/co-mindai/U0q2IjULpfUdByiO/logo/light.png?fit=max\u0026auto=format\u0026n=U0q2IjULpfUdByiO\u0026q=85\u0026s=03467e2b4fb228b6e1e862020818a9ff","dark":"https://mintcdn.com/co-mindai/U0q2IjULpfUdByiO/logo/dark.png?fit=max\u0026auto=format\u0026n=U0q2IjULpfUdByiO\u0026q=85\u0026s=6ae59fd885a8918c46a68a009be13c57"},"favicon":"https://mintcdn.com/co-mindai/mmwMTPu_RzumK-aI/favicon.png?fit=max\u0026auto=format\u0026n=mmwMTPu_RzumK-aI\u0026q=85\u0026s=6350bc9d275608abf3917ceedd14ee76","navbar":{"links":[{"href":"mailto:support@co-mind.ai","label":"Support"}]},"footer":{"socials":{"website":"https://co-mind.ai"}},"search":{},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"co-mindai","hasAudioNarration":false,"actualSubdomain":"co-mindai","customDomains":["docs.co-mind.ai"],"gitSource":{"type":"github","owner":"co-mind-ai","repo":"comind-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ab24ec7913bdee5b47709a5","collectionId":"bd50ce7d-cbe9-4cab-93c5-24cde205ba24","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ab24ec7913bdee5b47709a5"},"entitlements":{},"buildId":"6ab24ec7913bdee5b47709a5","clientVersion":"0.0.4043","searchFilterCounts":[{"language":"default","tag":"API Reference","count":70},{"language":"default","tag":"Researcher","count":25},{"language":"default","tag":"Guides","count":18},{"language":"default","tag":"Authentication","count":11},{"language":"default","tag":"API Walkthrough","count":10},{"language":"default","tag":"Knowledge Base","count":9},{"language":"default","tag":"Chat Sessions (Preview)","count":8},{"language":"default","tag":"API Tokens","count":5},{"language":"default","tag":"Admin","count":2},{"language":"default","tag":"Admin APIs","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"guides/api-walkthrough/personal-access-token","slug":"/guides/api-walkthrough/personal-access-token","pageMetadata":{"title":"2. Create a Personal Access Token","description":"Mint a long-lived PAT using your session JWT. Every step from here uses the PAT.","href":"/guides/api-walkthrough/personal-access-token"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Mint a long-lived PAT using your session JWT. Every step from here uses the PAT.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Your JWT is short-lived and scoped to an interactive session — fine for logging in and minting a token, not for anything running unattended. A Personal Access Token (PAT) is what your scripts, notebooks, CI jobs, and integrations use going forward. Long-lived, scope-limited, and issued against the workspace active on your JWT session at creation time.`}),`\n`,_jsx(Heading,{level:`2`,id:`create-the-token`,children:`Create the token`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {BASE_URL}/v1/api-tokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$JWT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"walkthrough-token\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"scopes\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"chat:write\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"models:read\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"knowledgebases:read\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"knowledgebases:write\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"files:read\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"files:write\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"expires_in_days\": 30`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cmnd_abc123.sk_xxxxxxxxxxxxxxxxxxxx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abc123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"walkthrough-token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"scopes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"chat:write\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"models:read\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"knowledgebases:read\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"knowledgebases:write\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files:read\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files:write\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-02T12:34:56Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-10-02T12:34:56Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`token`}),` field is returned `,_jsx(_components.strong,{children:`only once`}),`. Save it now — if you lose it, revoke the token and create a new one.`]})}),`\n`,_jsx(_components.p,{children:`Export it. This is what you’ll send for every remaining step:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PAT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cmnd_abc123.sk_xxxxxxxxxxxxxxxxxxxx\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`choosing-scopes`,children:`Choosing scopes`}),`\n`,_jsxs(_components.p,{children:[`The scopes above cover everything this walkthrough exercises. In your own integrations, request only what you actually need — smaller scope means smaller blast radius if a token leaks. See `,_jsx(_components.a,{href:`/guides/api-tokens`,children:`API Tokens`}),` for the full user scope reference.`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`A PAT is single-tenant — it stays scoped to the workspace active on the JWT session at creation. To create a token for a different workspace, switch workspaces on the JWT first (previous step), then create a new token.`})}),`\n`,_jsxs(_components.p,{children:[`Next: `,_jsx(_components.a,{href:`/guides/api-walkthrough/models`,children:`Discover models →`})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"2. Create a Personal Access Token","description":"Mint a long-lived PAT using your session JWT. Every step from here uses the PAT.","href":"/guides/api-walkthrough/personal-access-token"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Create the token","slug":"create-the-token","depth":2,"children":[]},{"title":"Choosing scopes","slug":"choosing-scopes","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"co-mindai","siteName":"co-mind.ai","title":"2. Create a Personal Access Token - co-mind.ai","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-02T10:46:21.291Z","originalFileLocation":"guides/api-walkthrough/personal-access-token.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Mint a long-lived PAT using your session JWT. Every step from here uses the PAT.\">\u003cmeta data-mint-head name=\"application-name\" content=\"co-mind.ai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/co-mindai/No5Tvo8n-x7m9RRG/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/co-mindai/No5Tvo8n-x7m9RRG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/co-mindai/No5Tvo8n-x7m9RRG/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/co-mindai/No5Tvo8n-x7m9RRG/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/co-mindai/No5Tvo8n-x7m9RRG/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/co-mindai/No5Tvo8n-x7m9RRG/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/co-mindai/No5Tvo8n-x7m9RRG/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/co-mindai/No5Tvo8n-x7m9RRG/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/co-mindai/No5Tvo8n-x7m9RRG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"2. Create a Personal Access Token - co-mind.ai\">\u003cmeta data-mint-head property=\"og:description\" content=\"Mint a long-lived PAT using your session JWT. Every step from here uses the PAT.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"co-mind.ai\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.co-mind.ai/guides/api-walkthrough/personal-access-token\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://co-mindai.mintlify.app/_mintlify/api/og/v2?division=API+Walkthrough\u0026amp;title=2.+Create+a+Personal+Access+Token\u0026amp;description=Mint+a+long-lived+PAT+using+your+session+JWT.+Every+step+from+here+uses+the+PAT.\u0026amp;theme=66046237ee0d8adc8cb8f088\u0026amp;signature=47145141e952871a16a179903a32357f69aca9356185314cdfd4afce94ff5ef4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"2. Create a Personal Access Token - co-mind.ai\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Mint a long-lived PAT using your session JWT. Every step from here uses the PAT.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://co-mindai.mintlify.app/_mintlify/api/og/v2?division=API+Walkthrough\u0026amp;title=2.+Create+a+Personal+Access+Token\u0026amp;description=Mint+a+long-lived+PAT+using+your+session+JWT.+Every+step+from+here+uses+the+PAT.\u0026amp;theme=66046237ee0d8adc8cb8f088\u0026amp;signature=47145141e952871a16a179903a32357f69aca9356185314cdfd4afce94ff5ef4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/co-mindai/No5Tvo8n-x7m9RRG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"co-mind.ai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563EB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.co-mind.ai/guides/api-walkthrough/personal-access-token\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/api-walkthrough/personal-access-token.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.co-mind.ai/#organization\",\"name\":\"co-mind.ai\",\"url\":\"https://docs.co-mind.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/co-mindai/U0q2IjULpfUdByiO/logo/light.png?fit=max\u0026auto=format\u0026n=U0q2IjULpfUdByiO\u0026q=85\u0026s=03467e2b4fb228b6e1e862020818a9ff\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.co-mind.ai#website\",\"name\":\"co-mind.ai\",\"url\":\"https://docs.co-mind.ai\",\"publisher\":{\"@id\":\"https://docs.co-mind.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.co-mind.ai/guides/api-walkthrough/personal-access-token#webpage\",\"url\":\"https://docs.co-mind.ai/guides/api-walkthrough/personal-access-token\",\"name\":\"2. Create a Personal Access Token\",\"description\":\"Mint a long-lived PAT using your session JWT. Every step from here uses the PAT.\",\"dateModified\":\"2026-09-02T10:46:21.291Z\",\"isPartOf\":{\"@id\":\"https://docs.co-mind.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.co-mind.ai/guides/api-walkthrough/personal-access-token#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.co-mind.ai/guides/api-walkthrough/personal-access-token#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Walkthrough\",\"item\":\"https://docs.co-mind.ai/guides/api-walkthrough/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"2. Create a Personal Access Token\",\"item\":\"https://docs.co-mind.ai/guides/api-walkthrough/personal-access-token\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.co-mind.ai/guides/api-walkthrough/personal-access-token#article\",\"headline\":\"2. Create a Personal Access Token\",\"name\":\"2. Create a Personal Access Token\",\"description\":\"Mint a long-lived PAT using your session JWT. Every step from here uses the PAT.\",\"url\":\"https://docs.co-mind.ai/guides/api-walkthrough/personal-access-token\",\"mainEntityOfPage\":{\"@id\":\"https://docs.co-mind.ai/guides/api-walkthrough/personal-access-token#webpage\"},\"dateModified\":\"2026-09-02T10:46:21.291Z\",\"publisher\":{\"@id\":\"https://docs.co-mind.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.co-mind.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"co-mind.ai\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"co-mind.ai","nav":{"global":null,"tabs":[{"tab":"Platform","pages":[{"title":"Platform","href":"/platform/overview"}]},{"tab":"Guides","groups":[{"group":"Getting Started","pages":[{"title":"Installation","href":"/guides/installation"},{"title":"Quickstart","href":"/guides/quickstart"}]},{"group":"Guides","pages":[{"title":"Authentication","href":"/guides/authentication"},{"title":"API Tokens","href":"/guides/api-tokens"},{"title":"Developer Guide","href":"/guides/developer-guide"}]},{"group":"API Walkthrough","pages":[{"title":"Overview","href":"/guides/api-walkthrough/overview"},{"title":"1. Log in","description":"Sign in to receive a session JWT and confirm which workspace your session is scoped to.","href":"/guides/api-walkthrough/login"},{"title":"2. Create a Personal Access Token","href":"/guides/api-walkthrough/personal-access-token"},{"title":"3. Discover models","description":"List the chat and embedding models available on your deployment.","href":"/guides/api-walkthrough/models"},{"title":"4. Compute embeddings","href":"/guides/api-walkthrough/embeddings"},{"title":"5. Chat completions","href":"/guides/api-walkthrough/chat-completions"},{"title":"6. Knowledge bases","href":"/guides/api-walkthrough/knowledge-bases"},{"title":"7. Research","href":"/guides/api-walkthrough/research"},{"title":"8. Translation","href":"/guides/api-walkthrough/translation"},{"title":"9. Manage tokens","href":"/guides/api-walkthrough/manage-tokens"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/n8n"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/release-notes"}]},{"tab":"Admin","pages":[{"title":"Admin","href":"/admin/tenant-management"}]}]},"basePath":"","title":"2. Create a Personal Access Token - co-mind.ai","buildId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","deploymentId":"dpl_G9nrg4qeJSZtah1Ziwbc2n6WkLch","dynamics":[],"chunks":[]}