curl -X POST https://credzu.com/wp-json/credzu/v1/create-lead \
-H "Content-Type: application/json" \
-H "Authorization: Credzu-Key YOUR_API_KEY" \
-d '{
"partner_lead_id": "FBHL-55672",
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@example.com",
"phone": "555-333-2222",
"fico_range": "580-619",
"loan_officer_id": "A.GLADSTONE",
"notes": "Declined for credit reasons - 48% DTI, low mid-score"
}'
<?php
function send_to_credzu($lead) {
$endpoint = "https://credzu.com/wp-json/credzu/v1/create-lead";
$apiKey = "YOUR_API_KEY";
$payload = array(
"partner_lead_id" => $lead["id"],
"first_name" => $lead["first_name"],
"last_name" => $lead["last_name"],
"email" => $lead["email"],
"phone" => $lead["phone"],
"fico_range" => isset($lead["fico_range"]) ? $lead["fico_range"] : null,
"loan_officer_id" => isset($lead["loan_officer_id"]) ? $lead["loan_officer_id"] : null,
"notes" => isset($lead["notes"]) ? $lead["notes"] : null
);
$ch = curl_init($endpoint);
curl_setopt_array($ch, array(
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: Credzu-Key " . $apiKey
),
CURLOPT_POSTFIELDS => json_encode($payload)
));
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return json_decode($response, true);
}
{
"success": true,
"message": "Lead created",
"lead_id": 44921,
"partner_lead_id": "FBHL-55672"
}
{
"success": false,
"error": {
"code": "INVALID_PAYLOAD",
"message": "first_name is required"
}
}
{
"success": false,
"error": {
"code": "AUTH_FAILED",
"message": "Invalid API key"
}
}
Endpoints
Create Lead
Create a new consumer/lead when a borrower is declined due to credit issues
POST
/
create-lead
curl -X POST https://credzu.com/wp-json/credzu/v1/create-lead \
-H "Content-Type: application/json" \
-H "Authorization: Credzu-Key YOUR_API_KEY" \
-d '{
"partner_lead_id": "FBHL-55672",
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@example.com",
"phone": "555-333-2222",
"fico_range": "580-619",
"loan_officer_id": "A.GLADSTONE",
"notes": "Declined for credit reasons - 48% DTI, low mid-score"
}'
<?php
function send_to_credzu($lead) {
$endpoint = "https://credzu.com/wp-json/credzu/v1/create-lead";
$apiKey = "YOUR_API_KEY";
$payload = array(
"partner_lead_id" => $lead["id"],
"first_name" => $lead["first_name"],
"last_name" => $lead["last_name"],
"email" => $lead["email"],
"phone" => $lead["phone"],
"fico_range" => isset($lead["fico_range"]) ? $lead["fico_range"] : null,
"loan_officer_id" => isset($lead["loan_officer_id"]) ? $lead["loan_officer_id"] : null,
"notes" => isset($lead["notes"]) ? $lead["notes"] : null
);
$ch = curl_init($endpoint);
curl_setopt_array($ch, array(
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: Credzu-Key " . $apiKey
),
CURLOPT_POSTFIELDS => json_encode($payload)
));
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return json_decode($response, true);
}
{
"success": true,
"message": "Lead created",
"lead_id": 44921,
"partner_lead_id": "FBHL-55672"
}
{
"success": false,
"error": {
"code": "INVALID_PAYLOAD",
"message": "first_name is required"
}
}
{
"success": false,
"error": {
"code": "AUTH_FAILED",
"message": "Invalid API key"
}
}
Overview
Creates a new consumer inside Credzu when a borrower is declined due to credit issues. This is the primary endpoint for referring declined loan applicants to Credzu’s credit repair workflow.Request Body
Response
Credzu’s unique identifier for this lead. Store this value - it’s used for all subsequent API calls and webhook callbacks.
curl -X POST https://credzu.com/wp-json/credzu/v1/create-lead \
-H "Content-Type: application/json" \
-H "Authorization: Credzu-Key YOUR_API_KEY" \
-d '{
"partner_lead_id": "FBHL-55672",
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@example.com",
"phone": "555-333-2222",
"fico_range": "580-619",
"loan_officer_id": "A.GLADSTONE",
"notes": "Declined for credit reasons - 48% DTI, low mid-score"
}'
<?php
function send_to_credzu($lead) {
$endpoint = "https://credzu.com/wp-json/credzu/v1/create-lead";
$apiKey = "YOUR_API_KEY";
$payload = array(
"partner_lead_id" => $lead["id"],
"first_name" => $lead["first_name"],
"last_name" => $lead["last_name"],
"email" => $lead["email"],
"phone" => $lead["phone"],
"fico_range" => isset($lead["fico_range"]) ? $lead["fico_range"] : null,
"loan_officer_id" => isset($lead["loan_officer_id"]) ? $lead["loan_officer_id"] : null,
"notes" => isset($lead["notes"]) ? $lead["notes"] : null
);
$ch = curl_init($endpoint);
curl_setopt_array($ch, array(
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"Authorization: Credzu-Key " . $apiKey
),
CURLOPT_POSTFIELDS => json_encode($payload)
));
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return json_decode($response, true);
}
{
"success": true,
"message": "Lead created",
"lead_id": 44921,
"partner_lead_id": "FBHL-55672"
}
{
"success": false,
"error": {
"code": "INVALID_PAYLOAD",
"message": "first_name is required"
}
}
{
"success": false,
"error": {
"code": "AUTH_FAILED",
"message": "Invalid API key"
}
}
What Happens Next
After successfully creating a lead:- Credzu sends a
lead_receivedwebhook to your registered endpoint - The borrower receives onboarding communications from Credzu
- As the borrower progresses, you receive webhook events for each milestone
- When the borrower becomes mortgage-ready, you receive the
mortgage_readyevent
Store the returned
lead_id - you’ll need it to look up lead status or correlate webhook events.⌘I