When using the Python or Node.js SDK, set the key as an environment variable rather than passing it to configure():
export COGNISAFE_API_KEY="csk_your_key_here"
The SDK reads COGNISAFE_API_KEY automatically if api_key is not passed to configure().
Never commit API keys to source control. If a key is accidentally committed, rotate it immediately via the dashboard (API Keys → Rotate) and update your environment variables. Rotated keys are invalidated within 60 seconds.
In the dashboard: API Keys → find the key → Revoke. The key is invalidated immediately. Any requests using the revoked key receive HTTP 401 Unauthorized.
The INTERNAL_API_SECRET environment variable is a separate secret used for server-to-server authentication between the web (Next.js) and api (FastAPI) services. It is not an API key and is never exposed to end users or SDK clients. Generate it with:
openssl rand -hex 32
Set the same value on both the api and web services.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cognisafe","colors":{"primary":"#22d3ee","light":"#67e8f9","dark":"#0e7490"},"logo":{"light":"https://mintcdn.com/cognisafeltd/PRQ36l5XbfLwcyZ-/logo/logo-light.png?fit=max\u0026auto=format\u0026n=PRQ36l5XbfLwcyZ-\u0026q=85\u0026s=ae1e6f2e9825587a30ed1902b27a1419","dark":"https://mintcdn.com/cognisafeltd/PRQ36l5XbfLwcyZ-/logo/logo-dark.png?fit=max\u0026auto=format\u0026n=PRQ36l5XbfLwcyZ-\u0026q=85\u0026s=47860f0c57bcf24aacfdd95cd2b34bb6"},"favicon":"https://mintlify.s3.us-west-1.amazonaws.com/cognisafeltd/favicon.ico","navbar":{"links":[{"href":"https://status.cognisafe.uk","label":"Status"}],"primary":{"type":"button","label":"Dashboard","href":"https://cognisafe.uk/sign-in"}},"footer":{"socials":{"github":"https://github.com/cognisafe","linkedin":"https://linkedin.com/company/cognisafe"}},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/cognisafe"},{"anchor":"Support","icon":"envelope","href":"mailto:hello@cognisafe.uk"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cognisafeltd","hasAudioNarration":false,"actualSubdomain":"cognisafeltd","customDomains":["docs.cognisafe.uk"],"gitSource":{"type":"github","owner":"aigentsmith","repo":"cognisafe-platform","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a499935771a75adafd442f9","collectionId":"99a48da5-fd55-413a-b4b3-c75c9e1a0698","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a499935771a75adafd442f9:success","clientVersion":"0.0.4005","searchFilterCounts":[{"language":"default","tag":"Docs","count":39},{"language":"default","tag":"Deployment Blueprints","count":8},{"language":"default","tag":"Reference Architectures","count":8},{"language":"default","tag":"Self-hosted Models","count":5},{"language":"default","tag":"API Reference","count":4},{"language":"default","tag":"LLM Providers","count":4},{"language":"default","tag":"Self-hosting","count":4},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Safety \u0026 Scoring","count":3},{"language":"default","tag":"SDKs","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/authentication","slug":"/api-reference/authentication","pageMetadata":{"title":"Authentication","description":"Authenticating with the Cognisafe API.","href":"/api-reference/authentication"},"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: \"Authenticating with the Cognisafe API.\"\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`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`api-key-format`,children:`API key format`}),`\n`,_jsxs(_components.p,{children:[`Cognisafe API keys use the `,_jsx(_components.code,{children:`csk_`}),` prefix followed by a 48-character hex string:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`csk_prod_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`Keys are scoped to a `,_jsx(_components.strong,{children:`project`}),` — each key is associated with exactly one project and can only access data for that project.`]}),`\n`,_jsx(Heading,{level:`2`,id:`creating-a-key`,children:`Creating a key`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Sign in at `,_jsx(_components.a,{href:`https://cognisafe.uk`,children:`cognisafe.uk`})]}),`\n`,_jsxs(_components.li,{children:[`Navigate to your project → `,_jsx(_components.strong,{children:`API Keys`})]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Create key`})]}),`\n`,_jsx(_components.li,{children:`Copy the key immediately — it is shown only once`}),`\n`]}),`\n`,_jsx(_components.p,{children:`You can create multiple keys per project (e.g., one for production, one for CI, one per environment).`}),`\n`,_jsx(Heading,{level:`2`,id:`passing-the-key`,children:`Passing the key`}),`\n`,_jsxs(Heading,{level:`3`,id:`x-cognisafe-key-header-recommended`,children:[_jsx(_components.code,{children:`X-Cognisafe-Key`}),` header (recommended)`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,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:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.cognisafe.uk/api/requests`}),_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:` \"X-Cognisafe-Key: csk_your_key_here\"`})]}),`\n`]})})}),`\n`,_jsxs(Heading,{level:`3`,id:`authorization-bearer-header`,children:[_jsx(_components.code,{children:`Authorization: Bearer`}),` header`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,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:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.cognisafe.uk/api/requests`}),_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 csk_your_key_here\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Both formats are accepted. `,_jsx(_components.code,{children:`X-Cognisafe-Key`}),` is preferred for clarity.`]}),`\n`,_jsx(Heading,{level:`3`,id:`sdk-environment-variable`,children:`SDK (environment variable)`}),`\n`,_jsxs(_components.p,{children:[`When using the Python or Node.js SDK, set the key as an environment variable rather than passing it to `,_jsx(_components.code,{children:`configure()`}),`:`]}),`\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:` COGNISAFE_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"csk_your_key_here\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The SDK reads `,_jsx(_components.code,{children:`COGNISAFE_API_KEY`}),` automatically if `,_jsx(_components.code,{children:`api_key`}),` is not passed to `,_jsx(_components.code,{children:`configure()`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Never commit API keys to source control. If a key is accidentally committed, rotate it immediately via the dashboard (`,_jsx(_components.strong,{children:`API Keys`}),` → `,_jsx(_components.strong,{children:`Rotate`}),`) and update your environment variables. Rotated keys are invalidated within 60 seconds.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`key-rotation`,children:`Key rotation`}),`\n`,_jsx(_components.p,{children:`Keys can be rotated without downtime:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Create a new key in the dashboard`}),`\n`,_jsx(_components.li,{children:`Update your environment variables / secrets manager with the new key`}),`\n`,_jsx(_components.li,{children:`Deploy / restart your application`}),`\n`,_jsx(_components.li,{children:`Delete the old key from the dashboard`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`revoking-a-key`,children:`Revoking a key`}),`\n`,_jsxs(_components.p,{children:[`In the dashboard: `,_jsx(_components.strong,{children:`API Keys`}),` → find the key → `,_jsx(_components.strong,{children:`Revoke`}),`. The key is invalidated immediately. Any requests using the revoked key receive `,_jsx(_components.code,{children:`HTTP 401 Unauthorized`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`internal-api-secret`,children:`Internal API secret`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`INTERNAL_API_SECRET`}),` environment variable is a separate secret used for server-to-server authentication between the `,_jsx(_components.code,{children:`web`}),` (Next.js) and `,_jsx(_components.code,{children:`api`}),` (FastAPI) services. It is not an API key and is never exposed to end users or SDK clients. Generate it with:`]}),`\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:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` rand`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -hex`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 32`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Set the same value on both the `,_jsx(_components.code,{children:`api`}),` and `,_jsx(_components.code,{children:`web`}),` services.`]})]})}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":"Authentication","description":"Authenticating with the Cognisafe API.","href":"/api-reference/authentication"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"API key format","slug":"api-key-format","depth":2,"children":[]},{"title":"Creating a key","slug":"creating-a-key","depth":2,"children":[]},{"title":"Passing the key","slug":"passing-the-key","depth":2,"children":[{"title":"X-Cognisafe-Key header (recommended)","slug":"x-cognisafe-key-header-recommended","depth":3,"children":[]},{"title":"Authorization: Bearer header","slug":"authorization-bearer-header","depth":3,"children":[]},{"title":"SDK (environment variable)","slug":"sdk-environment-variable","depth":3,"children":[]}]},{"title":"Key rotation","slug":"key-rotation","depth":2,"children":[]},{"title":"Revoking a key","slug":"revoking-a-key","depth":2,"children":[]},{"title":"Internal API secret","slug":"internal-api-secret","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"cognisafeltd","siteName":"Cognisafe","title":"Authentication - Cognisafe","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-16T19:38:58.625Z","originalFileLocation":"api-reference/authentication.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=\"Authenticating with the Cognisafe API.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cognisafe\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/x-icon\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/cognisafeltd/favicon.ico\">\u003clink data-mint-head rel=\"icon\" type=\"image/x-icon\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/cognisafeltd/favicon.ico\">\u003clink data-mint-head rel=\"icon\" type=\"image/x-icon\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/cognisafeltd/favicon.ico\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/cognisafeltd/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - Cognisafe\">\u003cmeta data-mint-head property=\"og:description\" content=\"Authenticating with the Cognisafe API.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cognisafe\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cognisafe.uk/api-reference/authentication\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cognisafeltd.mintlify.app/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Authentication\u0026amp;description=Authenticating+with+the+Cognisafe+API.\u0026amp;theme=11d19a25bed4fa343dc13611\u0026amp;signature=bc3ee6c42d43980db80124fe6ebe8319455fcd0a3c817647811006817440dd78\">\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=\"Authentication - Cognisafe\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Authenticating with the Cognisafe API.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cognisafeltd.mintlify.app/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Authentication\u0026amp;description=Authenticating+with+the+Cognisafe+API.\u0026amp;theme=11d19a25bed4fa343dc13611\u0026amp;signature=bc3ee6c42d43980db80124fe6ebe8319455fcd0a3c817647811006817440dd78\">\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=\"https://mintlify.s3.us-west-1.amazonaws.com/cognisafeltd/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cognisafe\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#22d3ee\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cognisafe.uk/api-reference/authentication\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/authentication.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cognisafe.uk/#organization\",\"name\":\"Cognisafe\",\"url\":\"https://docs.cognisafe.uk\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cognisafeltd/PRQ36l5XbfLwcyZ-/logo/logo-light.png?fit=max\u0026auto=format\u0026n=PRQ36l5XbfLwcyZ-\u0026q=85\u0026s=ae1e6f2e9825587a30ed1902b27a1419\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cognisafe.uk#website\",\"name\":\"Cognisafe\",\"url\":\"https://docs.cognisafe.uk\",\"publisher\":{\"@id\":\"https://docs.cognisafe.uk/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cognisafe.uk/api-reference/authentication#webpage\",\"url\":\"https://docs.cognisafe.uk/api-reference/authentication\",\"name\":\"Authentication\",\"description\":\"Authenticating with the Cognisafe API.\",\"dateModified\":\"2026-05-16T19:38:58.625Z\",\"isPartOf\":{\"@id\":\"https://docs.cognisafe.uk#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cognisafe.uk/api-reference/authentication#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cognisafe.uk/api-reference/authentication#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.cognisafe.uk/api-reference/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.cognisafe.uk/api-reference/authentication\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cognisafe.uk/api-reference/authentication#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"Authenticating with the Cognisafe API.\",\"url\":\"https://docs.cognisafe.uk/api-reference/authentication\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cognisafe.uk/api-reference/authentication#webpage\"},\"dateModified\":\"2026-05-16T19:38:58.625Z\",\"publisher\":{\"@id\":\"https://docs.cognisafe.uk/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cognisafe.uk#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cognisafe\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Cognisafe","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/cognisafe"},{"anchor":"Support","icon":"envelope","href":"mailto:hello@cognisafe.uk"}]},"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"API overview","description":"The Cognisafe REST API.","href":"/api-reference/overview"},{"title":"Authentication","href":"/api-reference/authentication"}]}]}]},"title":"Authentication - Cognisafe","buildId":"dpl_48qhjNLiu9iJQQSZJz9Fa2ihBbPH","deploymentId":"dpl_48qhjNLiu9iJQQSZJz9Fa2ihBbPH","dynamics":[],"chunks":[]}