Authenticate a lender with the system and obtain an auth_token for subsequent API calls. The login endpoint returns both an access token (used for all API requests) and a refresh token (used to obtain a new access token when the current one expires).
Request
Your lender identifier and credentials are provided by ClearGrid during onboarding. Store the password securely — it should never be exposed in client-side code or version control.
Endpoint
POST {{base_url}}/admin/auth/{{lender}}/login
Environment
Base URL
Production
https://v3-api.cleargrid.ai/
Staging
https://stage-v3-api.cleargrid.ai/
Body Parameters
string
required
The lender email address provided by ClearGrid during onboarding.
string
required
The lender-specific password provided by ClearGrid. This should be stored securely and never hardcoded.
Access tokens expire after a set period. When a token expires, use the Refresh Token endpoint to obtain a new one without requiring the user to re-enter credentials.
Security Best Practices
Store credentials securely — Use environment variables or a secrets manager. Never hardcode passwords in source code.
Rotate tokens — Use the refresh token flow to keep sessions alive without storing long-lived credentials.
Use HTTPS only — All API communication must use HTTPS. Plain HTTP requests will be rejected.
Limit credential access — Restrict who on your team has access to lender API credentials.
Path Parameters
lender
string
required
Your lender subdomain identifier, provided by ClearGrid during onboarding.
Body
application/json
email
string<email>
required
The lender email address provided by ClearGrid during onboarding.
Example:
"user@example.com"
password
string
required
The lender-specific password provided by ClearGrid. Store securely and never hardcode.
Example:
"password123"
phone
string
Optional phone number for authentication.
Example:
"+971501234567"
Response
Login successful
token
string
Access token. Include as a Bearer token in the Authorization header for all further API requests.
refreshToken
string
Refresh token. Use with the Refresh Token endpoint to obtain a new access token when the current one expires.
lenderPublicId
string
The lender's unique public identifier (UUID). Used as a path parameter in subsequent API calls.
{"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":"control","enabled":true,"payload":{"type":"string","value":"control"},"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/lender-login","slug":"/api-reference/authentication/lender-login","pageMetadata":{"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"},"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: \"Authenticate with the ClearGrid API and obtain an access 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`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note,ParamField,Tab,Table,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Authenticate a lender with the system and obtain an `,_jsx(_components.code,{children:`auth_token`}),` for subsequent API calls. The login endpoint returns both an access token (used for all API requests) and a refresh token (used to obtain a new access token when the current one expires).`]}),`\n`,_jsx(Heading,{level:`2`,id:`request`,children:`Request`}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Your lender identifier and credentials are provided by ClearGrid during onboarding. Store the password securely — it should never be exposed in client-side code or version control.`})}),`\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}}/login`})}),`\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:`email`,type:`string`,required:true,id:`param-email`,children:_jsx(_components.p,{children:`The lender email address provided by ClearGrid during onboarding.`})}),`\n`,_jsx(ParamField,{body:`password`,type:`string`,required:true,id:`param-password`,children:_jsx(_components.p,{children:`The lender-specific password provided by ClearGrid. This should be stored securely and never hardcoded.`})}),`\n`,_jsx(Heading,{level:`3`,id:`example-request`,children:`Example Request`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`6`,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:`6`,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}/login`}),_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:` \"email\": \"user@example.com\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"password\": \"securepassword\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript (fetch)`,numberOfLines:`14`,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:`14`,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}/login'`}),_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:` email:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'user@example.com'`}),_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:` password:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'securepassword'`})]}),`\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:`12`,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:`12`,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:`/login\"`}),_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:` \"email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user@example.com\"`}),_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:` \"password\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"securepassword\"`})]}),`\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:`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:` \"lenderPublicId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003clender_uuid>\"`}),_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>\"`}),_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:` \"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`]})})}),_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`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`lenderPublicId`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`The lender’s unique public identifier (UUID). Used as a path parameter in subsequent API calls.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`token`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`The access token. Include this as a Bearer token in the `,_jsx(_components.code,{children:`Authorization`}),` header for all further API requests.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`refreshToken`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`The refresh token. Use this with the `,_jsx(_components.a,{href:`/api-reference/authentication/refresh-token`,children:`Refresh Token`}),` endpoint to obtain a new access token when the current one expires.`]})]})]})]})]}),_jsxs(Tab,{title:`401 — Unauthorized`,id:`401-%E2%80%94-unauthorized`,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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Incorrect username or password.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(_components.p,{children:`This response indicates that the provided email or password is incorrect. Verify your credentials and try again.`})]}),_jsxs(Tab,{title:`500 — Server Error`,id:`500-%E2%80%94-server-error`,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:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Something went wrong. Please try again later.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(_components.p,{children:`An unexpected server error occurred. If this persists, contact ClearGrid support.`})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`using-the-access-token`,children:`Using the Access Token`}),`\n`,_jsxs(_components.p,{children:[`Once authenticated, include the access token as a Bearer token in the `,_jsx(_components.code,{children:`Authorization`}),` header of every subsequent API request:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://v3-api.cleargrid.ai/admin/v3/lenders/{lenderPublicId}/accounts`}),_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 \u003caccess_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`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Access tokens expire after a set period. When a token expires, use the `,_jsx(_components.a,{href:`/api-reference/authentication/refresh-token`,children:`Refresh Token`}),` endpoint to obtain a new one without requiring the user to re-enter credentials.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`security-best-practices`,children:`Security Best Practices`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Store credentials securely`}),` — Use environment variables or a secrets manager. Never hardcode passwords in source code.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rotate tokens`}),` — Use the refresh token flow to keep sessions alive without storing long-lived credentials.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use HTTPS only`}),` — All API communication must use HTTPS. Plain HTTP requests will be rejected.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Limit credential access`}),` — Restrict who on your team has access to lender API credentials.`]}),`\n`]})]})}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":"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"}}},"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":"Using the Access Token","slug":"using-the-access-token","depth":2,"children":[]},{"title":"Security Best Practices","slug":"security-best-practices","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"lenderLogin","summary":"Lender login","description":"Authenticate with the ClearGrid API and obtain an access token","tags":["Authentication"],"parameters":["47212eda-2eaa-4a5f-9a85-f856ae400127"],"requestBody":"bbba1886-e215-450e-943f-a59a7d47ceee","responses":{"200":"555bb7d6-dde5-4de5-adca-2c357f73f384","401":"9088bb05-0681-4a28-ac1e-1784cc5f140c"},"method":"post","type":"path","servers":["f2e2b701-160e-4b64-841b-67d0295dccbb","3a501f04-c413-45c2-921c-6beb8b2fa94a"],"security":[],"path":"/admin/auth/{lender}/login","baseUrlOptions":["https://v3-api.cleargrid.ai","https://stage-v3-api.cleargrid.ai"],"title":"Lender login","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.email":"user@example.com","body.password":"password123","body.phone":"+971501234567"}]},"dependencies":{"parameters":{"47212eda-2eaa-4a5f-9a85-f856ae400127":{"in":"path","name":"lender","required":true,"schema":{"type":"string","isRequired":true,"description":"Your lender subdomain identifier, provided by ClearGrid during onboarding.","uniqueKey":"","typeLabel":"string"},"description":"Your lender subdomain identifier, provided by ClearGrid during onboarding.","example":"my-lender"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email","example":"user@example.com","description":"The lender email address provided by ClearGrid during onboarding.","isRequired":true,"uniqueKey":"email","typeLabel":"string\u003cemail>"},"password":{"type":"string","example":"password123","description":"The lender-specific password provided by ClearGrid. Store securely and never hardcode.","isRequired":true,"uniqueKey":"password","typeLabel":"string"},"phone":{"type":"string","example":"+971501234567","description":"Optional phone number for authentication.","uniqueKey":"phone","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"email":"user@example.com","password":"password123","phone":"+971501234567"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"555bb7d6-dde5-4de5-adca-2c357f73f384":{"description":"Login successful","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Access token. Include as a Bearer token in the Authorization header for all further API requests.","uniqueKey":"token","typeLabel":"string"},"refreshToken":{"type":"string","description":"Refresh token. Use with the Refresh Token endpoint to obtain a new access token when the current one expires.","uniqueKey":"refreshToken","typeLabel":"string"},"lenderPublicId":{"type":"string","description":"The lender's unique public identifier (UUID). Used as a path parameter in subsequent API calls.","uniqueKey":"lenderPublicId","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"token":"\u003caccess_token>","refreshToken":"\u003crefresh_token>","lenderPublicId":"\u003clender_uuid>"},"examples":{"Example":{"title":"Example","value":{"token":"\u003caccess_token>","refreshToken":"\u003crefresh_token>","lenderPublicId":"\u003clender_uuid>"}}},"exampleType":"examples"}},"exampleType":"examples"},"9088bb05-0681-4a28-ac1e-1784cc5f140c":{"description":"Unauthorized — invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":"Incorrect username or password."},"examples":{"Example":{"title":"Example","value":{"error":"Incorrect username or password."}}},"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":"Lender Login - Command by ClearGrid AI","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-02-24T16:38:01.219Z","originalFileLocation":"api-reference/authentication/lender-login.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=\"Authenticate with the ClearGrid API and obtain an access 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=\"Lender Login - Command by ClearGrid AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Authenticate with the ClearGrid API and obtain an access 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/lender-login\">\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=Lender+Login\u0026amp;description=Authenticate+with+the+ClearGrid+API+and+obtain+an+access+token\u0026amp;theme=68014c7356663797ece21de9\u0026amp;signature=687d6452e658d10f7b8c5c6128ff278199feee5085be666ee60bd94fc2f7c29c\">\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=\"Lender Login - Command by ClearGrid AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Authenticate with the ClearGrid API and obtain an access token\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cleargrid-79e917fe.mintlify.site/_mintlify/api/og/v2?division=Authentication\u0026amp;title=Lender+Login\u0026amp;description=Authenticate+with+the+ClearGrid+API+and+obtain+an+access+token\u0026amp;theme=68014c7356663797ece21de9\u0026amp;signature=687d6452e658d10f7b8c5c6128ff278199feee5085be666ee60bd94fc2f7c29c\">\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/lender-login\">\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/lender-login.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/lender-login#webpage\",\"url\":\"https://docs.command.cleargrid.ai/api-reference/authentication/lender-login\",\"name\":\"Lender Login\",\"description\":\"Authenticate with the ClearGrid API and obtain an access token\",\"dateModified\":\"2026-02-24T16:38:01.219Z\",\"isPartOf\":{\"@id\":\"https://docs.command.cleargrid.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.command.cleargrid.ai/api-reference/authentication/lender-login#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.command.cleargrid.ai/api-reference/authentication/lender-login#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Command by ClearGrid AI\",\"item\":\"https://docs.command.cleargrid.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lender Login\",\"item\":\"https://docs.command.cleargrid.ai/api-reference/authentication/lender-login\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.command.cleargrid.ai/api-reference/authentication/lender-login#apireference\",\"headline\":\"Lender Login\",\"name\":\"Lender Login\",\"description\":\"Authenticate with the ClearGrid API and obtain an access token\",\"url\":\"https://docs.command.cleargrid.ai/api-reference/authentication/lender-login\",\"mainEntityOfPage\":{\"@id\":\"https://docs.command.cleargrid.ai/api-reference/authentication/lender-login#webpage\"},\"dateModified\":\"2026-02-24T16:38:01.219Z\",\"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/lender-login.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","description":"Integrate your systems with Command using the ClearGrid APIs","icon":"code","sidebarTitle":"Overview","href":"/api-reference/overview"}]},{"group":"Authentication","pages":[{"title":"Lender Login","sidebarTitle":"Lender Login","openapi":"/api-reference/openapi.json POST /admin/auth/{lender}/login","href":"/api-reference/authentication/lender-login"},{"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"}]},{"group":"Accounts","pages":[{"title":"Create \u0026 Update Account","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":"Lender Login - 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"]}