MiniTree API Documentation

MiniTree is an API-only lead distribution platform. Publishers must integrate using direct API calls - no HTML forms or web interfaces are provided.

API-Only Integration • No HTML Forms

API Endpoint

Base URL

https://yourdomain.com/api/intake/{webmasterKey}

Method

POST

Content-Type

application/json

Authentication

Webmaster key in URL path

Request Format

Send lead data as JSON in the request body. Here's a complete example for payday loan leads:

Complete Request Example

{
  "testMode": "1",
  "price": "15",
  "loanAmount": "300",
  "ssn": "123456789",
  "driversLicenseNumber": "123123123",
  "driversLicenseState": "CA",
  "incomeType": "EMPLOYMENT",
  "incomePaymentFrequency": "WEEKLY",
  "incomeNetMonthly": "5000",
  "incomeNextDate1": "2023-06-06",
  "incomeNextDate2": "2023-06-13",
  "bankDirectDeposit": "NO",
  "bankAba": "111326071",
  "bankAccountNumber": "123123123",
  "bankAccountType": "SAVING",
  "bankAccountLengthMonths": "50",
  "firstName": "John",
  "lastName": "Smith",
  "dob": "1980-05-26",
  "address": "123 Main St",
  "zip": "90210",
  "city": "Beverly Hills",
  "state": "CA",
  "ownHome": "YES",
  "addressLengthMonths": "50",
  "email": "john.smith@example.com",
  "homePhone": "5551234567",
  "workPhone": "5559876543",
  "cellPhone": "5555551234",
  "consentEmailSms": "YES",
  "userIp": "192.168.1.1",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36",
  "webSiteUrl": "example.com",
  "creditRating": "GOOD",
  "loanPurpose": "DEBT_CONSOLIDATION",
  "clickid": "XXX871CF-333E-4B97-A1A3-3C921A61EXXX",
  "tPar": "tPar[affiliateId]=123&tPar[subId]=456&tPar[transactionId]=789"
}

Response Formats

Success Response (Lead Sold)
200

{
  "leadId": "W_O0QO",
  "status": "sold",
  "price": 15.00,
  "redirectUrl": "https://yourdomain.com/redirect?token=abc123",
  "buyerId": "buyer-123",
  "processingTime": 0.0475
}

Rejected Response
200

{
  "leadId": "W_O0QO",
  "status": "rejected",
  "reason": "No buyers available",
  "processingTime": 0.0105
}

Error Response
400

{
  "status": "error",
  "errors": {
    "ssn": "Required field missing",
    "email": "Invalid format"
  }
}

cURL Example

Basic example using cURL:

Basic cURL Request

-blue-400">curl -X -blue-400">POST https://yourdomain.com/api/intake/YOUR_WEBMASTER_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "testMode": "1",
    "firstName": "John",
    "lastName": "Smith",
    "email": "john.smith@example.com",
    "ssn": "123456789",
    "loanAmount": "300",
    "price": "15",
    "userIp": "192.168.1.1",
    "clickid": "test-123"
  }'

Field Reference

Field NameTypeRequiredDescriptionExample
testModestring
Optional
Set to "1" for testing"1"
pricestring
Required
Lead price in USD"15"
loanAmountstring
Required
Requested loan amount"300"
ssnstring
Required
Social Security Number (9 digits)"123456789"
firstNamestring
Required
First name"John"
lastNamestring
Required
Last name"Smith"
emailstring
Required
Valid email address"john@example.com"
dobstring
Required
Date of birth (YYYY-MM-DD)"1980-05-26"
addressstring
Required
Street address"123 Main St"
citystring
Required
City name"Beverly Hills"
statestring
Required
State code (2 letters)"CA"
zipstring
Required
ZIP code"90210"
homePhonestring
Required
Home phone (10 digits)"5551234567"
cellPhonestring
Required
Cell phone (10 digits)"5555551234"
userIpstring
Required
User IP address"192.168.1.1"
clickidstring
Required
Unique tracking ID"XXX871CF-333E"
incomeTypestring
Optional
EMPLOYMENT, BENEFITS, SELF_EMPLOYED"EMPLOYMENT"
incomeNetMonthlystring
Optional
Monthly income amount"5000"
bankAbastring
Optional
Bank routing number"111326071"
bankAccountNumberstring
Optional
Bank account number"123123123"

HTTP Status Codes

200
Success - Lead accepted or rejected
400
Bad Request - Missing or invalid fields
401
Unauthorized - Invalid webmaster key
429
Rate Limit Exceeded - Too many requests
500
Server Error - Internal system error

Testing

Test Mode

Include "testMode": "1" in your request for testing purposes.

  • Test mode leads are not charged
  • Test leads are marked in the system
  • Same validation rules apply

Rate Limiting

Default rate limit: 60 requests per minute per webmaster key

Best Practices

  • Always include clickid: Use a unique tracking ID for each lead to enable proper tracking and reporting.
  • Send leads in real-time: Post leads immediately when captured for best conversion rates.
  • Handle redirect URLs: If a redirectUrl is provided in the response, redirect the user to maximize conversions.
  • Implement retry logic: Retry requests on 5xx errors with exponential backoff.
  • Validate data client-side: Ensure required fields are present before posting to reduce rejections.
  • Monitor response times: Track processingTime values to monitor system performance.