{
"code": 401,
"message": "Token Type is not refresh",
"body": null
}
Use the refresh token obtained from the Lender Login endpoint to obtain a new access token without re-authenticating with email and password. This enables seamless token rotation for long-running integrations.
Request
Endpoint
POST {{base_url}}/admin/auth/{{lender}}/refresh-token
Environment
Base URL
Production
https://v3-api.cleargrid.ai/
Staging
https://stage-v3-api.cleargrid.ai/
Body Parameters
string
required
The refresh token obtained from the Lender Login response.
The request body is malformed or missing required fields. Ensure the JSON body includes a valid refreshToken field.
Token Refresh Flow
Implement automatic token refresh in your integration. When any API call returns a 401 response, call the refresh token endpoint and retry the failed request with the new access token.
Path Parameters
lender
string
required
Your lender subdomain identifier.
Body
application/json
refreshToken
string
required
The refresh token obtained from the Lender Login response.
Example:
"eyJhbGciOiJIUzUxMiJ9..."
Response
Token refreshed successfully
token
string
New access token. Use as a Bearer token in the Authorization header.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Command by ClearGrid AI","colors":{"primary":"#3b82f6","light":"#60a5fa","dark":"#2563eb"},"logo":{"light":"https://mintcdn.com/cleargrid-79e917fe/nx_A5WjULU0TbN1j/logo/light.svg?fit=max\u0026auto=format\u0026n=nx_A5WjULU0TbN1j\u0026q=85\u0026s=ca657d9a629c6f5ecc3aee8de0f0ac24","dark":"https://mintcdn.com/cleargrid-79e917fe/nx_A5WjULU0TbN1j/logo/dark.svg?fit=max\u0026auto=format\u0026n=nx_A5WjULU0TbN1j\u0026q=85\u0026s=531f22398803ffca1ce8d6722a7b74b9"},"favicon":"https://mintcdn.com/cleargrid-79e917fe/nx_A5WjULU0TbN1j/favicon.svg?fit=max\u0026auto=format\u0026n=nx_A5WjULU0TbN1j\u0026q=85\u0026s=0b61c1368131923d7b3ff2c8b66c0cd5","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript"],"prefill":true}},"background":{"decoration":"windows","color":{"light":"#ffffff","dark":"#09090b"}},"navbar":{"links":[{"href":"mailto:support@cleargrid.co","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://command.cleargrid.ai"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/cleargrid-ai"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cleargrid-79e917fe","hasAudioNarration":false,"actualSubdomain":"cleargrid-79e917fe","customDomains":["docs.command.cleargrid.ai"],"gitSource":{"type":"github","owner":"cleargrid-org","repo":"command-docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae947a368675ea9cfd2c684:success","clientVersion":"0.0.4352","searchFilterCounts":[{"language":"default","tag":"API Reference","count":30},{"language":"default","tag":"Exports","count":25},{"language":"default","tag":"Datasets","count":19},{"language":"default","tag":"Overview","count":8},{"language":"default","tag":"Features","count":6},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Accounts","count":2},{"language":"default","tag":"Authentication","count":2},{"language":"default","tag":"Endpoints","count":2},{"language":"default","tag":"Data Exports","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":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":"custom-rbac-roles","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":"rbac-expansion","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":"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":"site-roles","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":"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":"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":"turbopuffer-dual-write","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},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/authentication/refresh-token","slug":"/api-reference/authentication/refresh-token","pageMetadata":{"title":"Refresh Token","description":"Refresh an expired access token using the refresh token","sidebarTitle":"Refresh Token","openapi":"/api-reference/openapi.json POST /admin/auth/{lender}/refresh-token","href":"/api-reference/authentication/refresh-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: \"Refresh an expired access token using the refresh token\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Mermaid,ParamField,Tab,Table,Tabs,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Use the refresh token obtained from the `,_jsx(_components.a,{href:`/api-reference/authentication/lender-login`,children:`Lender Login`}),` endpoint to obtain a new access token without re-authenticating with email and password. This enables seamless token rotation for long-running integrations.`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(Heading,{level:`3`,id:`endpoint`,children:`Endpoint`}),`\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:`POST {{base_url}}/admin/auth/{{lender}}/refresh-token`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Environment`}),_jsx(_components.th,{children:`Base URL`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Production`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://v3-api.cleargrid.ai/`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Staging`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`https://stage-v3-api.cleargrid.ai/`})})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`refreshToken`,type:`string`,required:true,id:`param-refresh-token`,children:_jsxs(_components.p,{children:[`The refresh token obtained from the `,_jsx(_components.a,{href:`/api-reference/authentication/lender-login`,children:`Lender Login`}),` response.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`example-request`,children:`Example Request`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,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:`5`,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:` https://v3-api.cleargrid.ai/admin/auth/{your_lender_id}/refresh-token`}),_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:` \"refreshToken\": \"\u003crefresh_token>\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript (fetch)`,numberOfLines:`13`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://v3-api.cleargrid.ai/admin/auth/{your_lender_id}/refresh-token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` refreshToken:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '\u003crefresh_token>'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python (requests)`,numberOfLines:`11`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://v3-api.cleargrid.ai/admin/auth/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{your_lender_id}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/refresh-token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"refreshToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003crefresh_token>\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(data[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`200 — Success`,id:`200-%E2%80%94-success`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,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:`\"\u003caccess_token>\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`token`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`The new access token. Use this as a Bearer token in the `,_jsx(_components.code,{children:`Authorization`}),` header for all subsequent API requests.`]})]})})]})]}),_jsxs(Tab,{title:`401 — Invalid Token`,id:`401-%E2%80%94-invalid-token`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`5`,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:`5`,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:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Token Type is not refresh\"`}),_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:` \"body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`This error occurs when you pass an access token instead of a refresh token. Make sure to use the `,_jsx(_components.code,{children:`refreshToken`}),` value from the original login response.`]})]}),_jsxs(Tab,{title:`400 — Bad Request`,id:`400-%E2%80%94-bad-request`,children:[_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:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"about:blank\"`}),_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:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bad Request\"`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_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:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Failed to read request\"`}),_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:` \"instance\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/api/v1/auth/{lender}/refresh-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:` \"properties\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`The request body is malformed or missing required fields. Ensure the JSON body includes a valid `,_jsx(_components.code,{children:`refreshToken`}),` field.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`token-refresh-flow`,children:`Token Refresh Flow`}),`\n`,_jsx(Mermaid,{chart:`sequenceDiagram\n participant App as Your Application\n participant API as ClearGrid API\n\n App->>API: API call with access token\n API-->>App: 401 - Token expired\n\n App->>API: POST /admin/auth/{lender}/refresh-token\n Note right of App: Send refreshToken in body\n API-->>App: 200 - New access token\n\n App->>API: Retry original API call with new token\n API-->>App: 200 - Success`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Implement automatic token refresh in your integration. When any API call returns a `,_jsx(_components.code,{children:`401`}),` response, call the refresh token endpoint and retry the failed request with the new access token.`]})})]})}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":"Refresh Token","description":"Refresh an expired access token using the refresh token","sidebarTitle":"Refresh Token","openapi":"/api-reference/openapi.json POST /admin/auth/{lender}/refresh-token","href":"/api-reference/authentication/refresh-token"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request","slug":"request","depth":2,"children":[{"title":"Endpoint","slug":"endpoint","depth":3,"children":[]},{"title":"Body Parameters","slug":"body-parameters","depth":3,"children":[]},{"title":"Example Request","slug":"example-request","depth":3,"children":[]}]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Token Refresh Flow","slug":"token-refresh-flow","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"refreshToken","summary":"Refresh access token","description":"Refresh an expired access token using the refresh token","tags":["Authentication"],"parameters":["6c26baa5-8f6b-4207-9dd3-146f1eb45565"],"requestBody":"c4b4336b-b88a-449d-9c0f-047e09ccca77","responses":{"200":"ad80b7ff-016e-49b7-9414-9ddc51644723","400":"37fd75cd-2c9a-4fc9-890c-c5af7c1f3dd1","401":"fb66c011-a7f4-44e0-9bb7-dd2b8a49e8e9"},"method":"post","type":"path","servers":["f2e2b701-160e-4b64-841b-67d0295dccbb","3a501f04-c413-45c2-921c-6beb8b2fa94a"],"security":[],"path":"/admin/auth/{lender}/refresh-token","baseUrlOptions":["https://v3-api.cleargrid.ai","https://stage-v3-api.cleargrid.ai"],"title":"Refresh access token","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.refreshToken":"eyJhbGciOiJIUzUxMiJ9..."}]},"dependencies":{"parameters":{"6c26baa5-8f6b-4207-9dd3-146f1eb45565":{"in":"path","name":"lender","required":true,"schema":{"type":"string","isRequired":true,"description":"Your lender subdomain identifier.","uniqueKey":"","typeLabel":"string"},"description":"Your lender subdomain identifier.","example":"my-lender"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["refreshToken"],"properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzUxMiJ9...","description":"The refresh token obtained from the Lender Login response.","isRequired":true,"uniqueKey":"refreshToken","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"refreshToken":"eyJhbGciOiJIUzUxMiJ9..."}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"ad80b7ff-016e-49b7-9414-9ddc51644723":{"description":"Token refreshed successfully","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"New access token. Use as a Bearer token in the Authorization header.","uniqueKey":"token","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"token":"\u003cnew_access_token>"},"examples":{"Example":{"title":"Example","value":{"token":"\u003cnew_access_token>"}}},"exampleType":"examples"}},"exampleType":"examples"},"37fd75cd-2c9a-4fc9-890c-c5af7c1f3dd1":{"description":"Bad request — malformed body or missing refreshToken","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","uniqueKey":"status","typeLabel":"integer"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"instance":{"type":"string","uniqueKey":"instance","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"type":"about:blank","title":"Bad Request","status":400,"detail":"Failed to read request","instance":"/api/v1/auth/{lender}/refresh-token"},"examples":{"Example":{"title":"Example","value":{"type":"about:blank","title":"Bad Request","status":400,"detail":"Failed to read request","instance":"/api/v1/auth/{lender}/refresh-token"}}},"exampleType":"examples"}},"exampleType":"examples"},"fb66c011-a7f4-44e0-9bb7-dd2b8a49e8e9":{"description":"Unauthorized — token type mismatch or invalid token","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","uniqueKey":"code","typeLabel":"integer"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"},"body":{"oneOf":[{"type":"string","uniqueKey":"body.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"body.oneOf.1","typeLabel":"null"}],"uniqueKey":"body","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"code":401,"message":"Token Type is not refresh","body":null},"examples":{"Example":{"title":"Example","value":{"code":401,"message":"Token Type is not refresh","body":null}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{},"servers":{"f2e2b701-160e-4b64-841b-67d0295dccbb":{"url":"https://v3-api.cleargrid.ai","description":"Production"},"3a501f04-c413-45c2-921c-6beb8b2fa94a":{"url":"https://stage-v3-api.cleargrid.ai","description":"Staging"}}},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"cleargrid-79e917fe","siteName":"Command by ClearGrid AI","title":"Refresh Token - Command by ClearGrid AI","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-02-24T16:12:50.171Z","originalFileLocation":"api-reference/authentication/refresh-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=\"Refresh an expired access token using the refresh token\">\u003cmeta data-mint-head name=\"application-name\" content=\"Command by ClearGrid 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/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_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/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_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/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_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/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_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/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_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/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_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/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_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/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Refresh Token - Command by ClearGrid AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Refresh an expired access token using the refresh token\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Command by ClearGrid AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.command.cleargrid.ai/api-reference/authentication/refresh-token\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cleargrid-79e917fe.mintlify.site/_mintlify/api/og/v2?division=Authentication\u0026amp;title=Refresh+Token\u0026amp;description=Refresh+an+expired+access+token+using+the+refresh+token\u0026amp;theme=68014c7356663797ece21de9\u0026amp;signature=14723d6c68d0e7824312584bf20319f856e289ee7174febc74e739b852e560cf\">\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=\"Refresh Token - Command by ClearGrid AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Refresh an expired access token using the refresh token\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cleargrid-79e917fe.mintlify.site/_mintlify/api/og/v2?division=Authentication\u0026amp;title=Refresh+Token\u0026amp;description=Refresh+an+expired+access+token+using+the+refresh+token\u0026amp;theme=68014c7356663797ece21de9\u0026amp;signature=14723d6c68d0e7824312584bf20319f856e289ee7174febc74e739b852e560cf\">\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/cleargrid-79e917fe/OFgLU-jsmNGhV0vR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Command by ClearGrid AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3b82f6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.command.cleargrid.ai/api-reference/authentication/refresh-token\">\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/refresh-token.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.command.cleargrid.ai/#organization\",\"name\":\"Command by ClearGrid AI\",\"url\":\"https://docs.command.cleargrid.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cleargrid-79e917fe/nx_A5WjULU0TbN1j/logo/light.svg?fit=max\u0026auto=format\u0026n=nx_A5WjULU0TbN1j\u0026q=85\u0026s=ca657d9a629c6f5ecc3aee8de0f0ac24\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.command.cleargrid.ai#website\",\"name\":\"Command by ClearGrid AI\",\"url\":\"https://docs.command.cleargrid.ai\",\"publisher\":{\"@id\":\"https://docs.command.cleargrid.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.command.cleargrid.ai/api-reference/authentication/refresh-token#webpage\",\"url\":\"https://docs.command.cleargrid.ai/api-reference/authentication/refresh-token\",\"name\":\"Refresh Token\",\"description\":\"Refresh an expired access token using the refresh token\",\"dateModified\":\"2026-02-24T16:12:50.171Z\",\"isPartOf\":{\"@id\":\"https://docs.command.cleargrid.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.command.cleargrid.ai/api-reference/authentication/refresh-token#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.command.cleargrid.ai/api-reference/authentication/refresh-token#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Authentication\",\"item\":\"https://docs.command.cleargrid.ai/api-reference/authentication/lender-login\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Refresh Token\",\"item\":\"https://docs.command.cleargrid.ai/api-reference/authentication/refresh-token\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.command.cleargrid.ai/api-reference/authentication/refresh-token#apireference\",\"headline\":\"Refresh Token\",\"name\":\"Refresh Token\",\"description\":\"Refresh an expired access token using the refresh token\",\"url\":\"https://docs.command.cleargrid.ai/api-reference/authentication/refresh-token\",\"mainEntityOfPage\":{\"@id\":\"https://docs.command.cleargrid.ai/api-reference/authentication/refresh-token#webpage\"},\"dateModified\":\"2026-02-24T16:12:50.171Z\",\"publisher\":{\"@id\":\"https://docs.command.cleargrid.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.command.cleargrid.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Command by ClearGrid AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Command by ClearGrid AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/authentication/refresh-token.md","siteName":"Command by ClearGrid AI","nav":{"global":null,"tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"API Reference","icon":"code","sidebarTitle":"Overview","href":"/api-reference/overview"}]},{"group":"Authentication","pages":[{"title":"Lender Login","description":"Authenticate with the ClearGrid API and obtain an access token","sidebarTitle":"Lender Login","openapi":"/api-reference/openapi.json POST /admin/auth/{lender}/login","href":"/api-reference/authentication/lender-login"},{"title":"Refresh Token","sidebarTitle":"Refresh Token","openapi":"/api-reference/openapi.json POST /admin/auth/{lender}/refresh-token","href":"/api-reference/authentication/refresh-token"}]},{"group":"Accounts","pages":[{"title":"Create \u0026 Update Account","description":"Create new accounts, update existing ones, or withdraw accounts from the collection portfolio","sidebarTitle":"Create \u0026 Update","openapi":"/api-reference/openapi.json POST /admin/v3/lenders/{lenderPublicId}/accounts","href":"/api-reference/accounts/create-update"},{"title":"Update Account Status","sidebarTitle":"Update Status","openapi":"/api-reference/openapi.json POST /admin/v3/lenders/{lenderPublicId}/accounts/update-status","href":"/api-reference/accounts/update-status"}]},{"group":"Exports","pages":[{"title":"Data Exports Overview","sidebarTitle":"Overview","icon":"download","href":"/api-reference/exports/overview"},{"title":"Pagination \u0026 Incremental Loads","sidebarTitle":"Pagination","icon":"arrow-right","href":"/api-reference/exports/pagination"},{"title":"Errors \u0026 Status Codes","sidebarTitle":"Errors","icon":"triangle-exclamation","href":"/api-reference/exports/errors"},{"title":"Changelog","sidebarTitle":"Changelog","icon":"clock-rotate-left","href":"/api-reference/exports/changelog"},{"group":"Endpoints","pages":[{"title":"List Export Catalog","sidebarTitle":"Catalog","href":"/api-reference/exports/endpoints/catalog"},{"title":"Fetch Dataset","sidebarTitle":"Fetch Dataset","href":"/api-reference/exports/endpoints/fetch-dataset"}]},{"group":"Datasets","pages":[{"title":"Borrowers","sidebarTitle":"Borrowers","href":"/api-reference/exports/datasets/d01-borrowers"},{"title":"Borrower Accounts","sidebarTitle":"Borrower Accounts","href":"/api-reference/exports/datasets/d02-borrower-accounts"},{"title":"Borrower Sub Accounts","sidebarTitle":"Borrower Sub Accounts","href":"/api-reference/exports/datasets/d03-borrower-sub-accounts"},{"title":"Borrower Account Events","sidebarTitle":"Borrower Account Events","href":"/api-reference/exports/datasets/d05-borrower-account-events"},{"title":"Borrower Payments","sidebarTitle":"Borrower Payments","href":"/api-reference/exports/datasets/d07-borrower-payments"},{"title":"Borrower Payment Plans","sidebarTitle":"Borrower Payment Plans","href":"/api-reference/exports/datasets/d08-borrower-payment-plans"},{"title":"Borrower Payment Plan Installments","sidebarTitle":"Payment Plan Installments","href":"/api-reference/exports/datasets/d09-borrower-payment-plan-installments"},{"title":"Scheduled Payments","sidebarTitle":"Scheduled Payments","href":"/api-reference/exports/datasets/d12-scheduled-payments"},{"title":"Payment Proofs","sidebarTitle":"Payment Proofs","href":"/api-reference/exports/datasets/d14-payment-proofs"},{"title":"Borrower Settlements","sidebarTitle":"Borrower Settlements","href":"/api-reference/exports/datasets/d15-borrower-settlements"},{"title":"Borrower Deals","sidebarTitle":"Borrower Deals","href":"/api-reference/exports/datasets/d16-borrower-deals"},{"title":"Borrower Deal Activity Logs","sidebarTitle":"Deal Activity Logs","href":"/api-reference/exports/datasets/d17-borrower-deal-activity-logs"},{"title":"Borrower Deal Logs","sidebarTitle":"Borrower Deal Logs","href":"/api-reference/exports/datasets/d18-borrower-deal-logs"},{"title":"Deal Activity Logs","sidebarTitle":"Deal Activity Logs","href":"/api-reference/exports/datasets/d19-deal-activity-logs"},{"title":"Deal Views","sidebarTitle":"Deal Views","href":"/api-reference/exports/datasets/d20-deal-views"},{"title":"Communication Logs","sidebarTitle":"Communication Logs","href":"/api-reference/exports/datasets/d21-communication-logs"},{"title":"Conversations","sidebarTitle":"Conversations","href":"/api-reference/exports/datasets/d22-conversations"},{"title":"Manual Communication Logs","sidebarTitle":"Manual Communication Logs","href":"/api-reference/exports/datasets/d23-manual-communication-logs"},{"title":"User Lender Details","sidebarTitle":"User Lender Details","href":"/api-reference/exports/datasets/d26-user-lender-details"}]}]}]},{"tab":"Data Exports","pages":[{"title":"Data Exports","href":"/data-exports/overview"}]}]},"basePath":"","title":"Refresh Token - Command by ClearGrid AI","deploymentId":"dpl_5nNsUVHqbVdUHouroPPzwztSbjmH","buildId":"dpl_5nNsUVHqbVdUHouroPPzwztSbjmH","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-B564ZPEC.js","snippetPresets-L1o8HcxD.js","utils-CztB6GTn.js","style-to-object-BY3JEAdk.js","utils-CvVTgJWk.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-DYi6_847.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DthbVJn_.js","_Uint8Array-G4MDMcnE.js","isObject-FP1Yky1u.js","ApiExamples-BnQo4SxZ.js","usePlaygroundInputsStore-Dsmj0Yg6.js","shallow-Bp_wEvgz.js","isEqual-BwXlkqOR.js","CodeSnippets-D6Fi8DmN.js","CodeSnippet-DANVAYTI.js","use-playground-group-access-DaUWE1Sg.js","Page-Cwg6gQ2F.js","api-description-markdown-DFvICuUq.js","DynamicMarkdown-DHV3eOcf.js","SectionHeading-DLRZDaDn.js","MethodPill-CgqQYk5N.js","getPastedJson-k_txzq3J.js","Check2Icon-CO8ho5Tt.js","axios-CsQoIw0U.js","Markdown-C8ZpmBko.js","AssistantPageLink-AWAGfbYY.js","dist-CAcI43Vk.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}