Lender Login
Authenticate with the ClearGrid API and obtain an access token
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
Endpoint
| Environment | Base URL |
|---|---|
| Production | https://v3-api.cleargrid.ai/ |
| Staging | https://stage-v3-api.cleargrid.ai/ |
Body Parameters
Example Request
Response
- 200 — Success
- 500 — Server Error
| Field | Type | Description |
|---|---|---|
lenderPublicId | string | The lender’s unique public identifier (UUID). Used as a path parameter in subsequent API calls. |
token | string | The access token. Include this as a Bearer token in the Authorization header for all further API requests. |
refreshToken | string | The refresh token. Use this with the Refresh Token endpoint to obtain a new access token when the current one expires. |
Using the Access Token
Once authenticated, include the access token as a Bearer token in theAuthorization header of every subsequent API request:
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
Your lender subdomain identifier, provided by ClearGrid during onboarding.
Body
The lender email address provided by ClearGrid during onboarding.
"user@example.com"
The lender-specific password provided by ClearGrid. Store securely and never hardcode.
"password123"
Optional phone number for authentication.
"+971501234567"
Response
Login successful
Access token. Include as a Bearer token in the Authorization header for all further API requests.
Refresh token. Use with the Refresh Token endpoint to obtain a new access token when the current one expires.
The lender's unique public identifier (UUID). Used as a path parameter in subsequent API calls.