Response Format
Success Response
Status Code: 200 OK
{
"success": true,
"quoteId": "clx1234567890abcdefgh",
"loginUrl": "https://yourdomain.com/api/auth/callback/credentials?token=..."
}
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Always true for successful requests |
quoteId | string | Unique identifier for the created quote |
loginUrl | string | Magic link URL for passwordless user login |
About the Login URL
The loginUrl is a one-time magic link that:
- Allows immediate passwordless authentication
- Redirects users to
/prequal/credit-checkafter login - Should be provided to the end user for immediate access
Error Responses
HTTP Status Codes
| Status Code | Meaning |
|---|---|
200 | Success - Lead created |
400 | Bad Request - Validation error or duplicate |
401 | Unauthorized - Invalid or missing token |
405 | Method Not Allowed - Wrong HTTP method |
500 | Internal Server Error |
Error Response Structure
All errors return a JSON object with either message or error field:
{
"message": "Error description"
}
or
{
"error": "Error description"
}
Validation Error Format
When validation fails, the error response includes detailed information:
{
"error": {
"issues": [
{
"code": "custom",
"message": "Required for condo properties",
"path": ["address", "unitNumber"]
}
]
}
}
| Field | Description |
|---|---|
code | Error type (e.g., custom, invalid_string) |
message | Human-readable error message |
path | Array indicating the field path that failed validation |
validation | (Optional) Specific validation type (e.g., email) |
For detailed error examples and how to handle each error type, see the Error Handling section.