Authentication

All API requests require authentication using an API key. Include your API key in the request header for every call.

API Key Authentication

Include your API key in the X-API-Key header with every request. API keys are provided during partner onboarding.

curl -X GET "https://api.safestreamleads.com/v2/leads" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json"

Obtaining API Credentials

API credentials are issued to approved partners only. To request access:

  1. Complete the partner application form
  2. Pass compliance verification
  3. Sign the data processing agreement
  4. Receive your API key via secure channel

Base URL

All API requests should be made to the following base URL:

https://api.safestreamleads.com/v2

For sandbox/testing environment:

https://sandbox.safestreamleads.com/v2

Rate Limits

To ensure platform stability, API requests are rate limited based on your partnership tier:

TierRequests/MinuteRequests/Day
Standard6010,000
Professional30050,000
Enterprise1,000Unlimited

Rate limit headers are included in every response:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1699459200

Error Handling

The API uses standard HTTP response codes to indicate success or failure:

200 OK 201 Created 400 Bad Request 401 Unauthorized 429 Rate Limited 500 Server Error

Error responses include a JSON body with details:

{
  "error": {
    "code": "INVALID_FIELD",
    "message": "The 'email' field is not a valid email address",
    "field": "email"
  }
}

Lead Endpoints

POST /leads

Submit a new lead to the SafeStream platform for distribution to verified buyers.

Request Body

FieldTypeRequiredDescription
first_namestringRequiredConsumer's first name
last_namestringRequiredConsumer's last name
emailstringRequiredValid email address
phonestringRequired10-digit phone number
statestringRequired2-letter state code
zip_codestringRequired5-digit ZIP code
loan_amountintegerRequiredRequested loan amount in USD
loan_purposestringOptionalPurpose of the loan
employment_statusstringOptionalemployed, self_employed, retired, etc.
annual_incomeintegerOptionalAnnual income in USD
credit_ratingstringOptionalexcellent, good, fair, poor
tcpa_consentbooleanRequiredTCPA consent obtained
consent_timestampstringRequiredISO 8601 timestamp of consent
ip_addressstringRequiredConsumer's IP address
source_urlstringRequiredURL where lead was captured

Example Request

curl -X POST "https://api.safestreamleads.com/v2/leads" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "John",
    "last_name": "Smith",
    "email": "john.smith@email.com",
    "phone": "5551234567",
    "state": "CA",
    "zip_code": "90210",
    "loan_amount": 5000,
    "loan_purpose": "debt_consolidation",
    "employment_status": "employed",
    "annual_income": 65000,
    "credit_rating": "good",
    "tcpa_consent": true,
    "consent_timestamp": "2026-02-21T10:30:00Z",
    "ip_address": "192.168.1.1",
    "source_url": "https://example.com/apply"
  }'

Example Response

{
  "success": true,
  "lead_id": "ld_7x8k2m9n4p5q",
  "status": "accepted",
  "price": 45.00,
  "buyer_id": "by_abc123",
  "created_at": "2026-02-21T10:30:05Z"
}
GET /leads/{lead_id}

Retrieve the current status and details of a submitted lead.

Path Parameters

ParameterTypeDescription
lead_idstringThe unique lead identifier

Example Response

{
  "lead_id": "ld_7x8k2m9n4p5q",
  "status": "sold",
  "disposition": "contacted",
  "buyer_id": "by_abc123",
  "price": 45.00,
  "created_at": "2026-02-21T10:30:05Z",
  "sold_at": "2026-02-21T10:30:07Z",
  "last_updated": "2026-02-21T14:22:00Z"
}
GET /leads

List all leads with optional filtering and pagination.

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
per_pageinteger50Results per page (max 100)
statusstringallFilter by status
start_datestring-Filter from date (ISO 8601)
end_datestring-Filter to date (ISO 8601)

Webhooks

Configure webhooks to receive real-time notifications when lead statuses change. Webhooks are sent as HTTP POST requests to your configured endpoint.

Webhook Events

EventDescription
lead.acceptedLead was accepted and sold to a buyer
lead.rejectedLead was rejected (duplicate, invalid, etc.)
lead.returnedBuyer returned the lead
lead.convertedLead converted to a funded loan

Webhook Payload

{
  "event": "lead.accepted",
  "lead_id": "ld_7x8k2m9n4p5q",
  "timestamp": "2026-02-21T10:30:07Z",
  "data": {
    "status": "sold",
    "price": 45.00,
    "buyer_id": "by_abc123"
  }
}

Field Reference

Loan Purpose Values

"debt_consolidation" | "home_improvement" | "major_purchase" |
"medical" | "auto" | "business" | "vacation" | "other"

Employment Status Values

"employed" | "self_employed" | "retired" |
"military" | "unemployed" | "student"

Credit Rating Values

"excellent" (720+) | "good" (680-719) |
"fair" (640-679) | "poor" (<640)

Need Help?

Our integration team is here to assist you with API implementation.

Contact Support