Integration guide · for lead providers

DirectLend Lead API

Send each lead to DirectLend as it comes in. We create the merchant's file and answer with a link. Redirect the merchant to that link: it opens their DirectLend application with your details already filled in, so they can upload bank statements and finish applying.

One lead per requestJSON, server to server
A link every timeIncluding when something goes wrong
Answer within ~9 secondsSafe to retry with the same lead ID

Endpoint

POSThttps://app.directlend.ai/functions/affiliateSubmitLead

Headers

HeaderValue
Content-Typeapplication/json
X-Api-KeyYour API key, which starts with dla_. You can send Authorization: Bearer <key> instead.
Your DirectLend contact gives you the key once. Keep it on your server and call this endpoint from your server, never from the merchant's browser. Never put the key in the URL.

Request body

One lead per request, as a JSON object. Listed values are matched ignoring capitals.

Required

FieldTypeNotes
externalLeadIdstringYour unique ID for this lead (up to 200 characters). Sending the same ID again returns the same answer and never creates a second lead, so retries are safe.
firstNamestringThe business owner's first name
emailstringThe business owner's email
phonestringThe business owner's phone: a 10-digit US number in any format (8135550142, (813) 555-0142, +1 813-555-0142)
companyNamestringThe business name
consentAgreementbooleantrue: the merchant agreed on your form to be contacted by DirectLend by phone, text and email. Leads without it are not accepted.

Optional — send everything you have

Every field you send is filled in on the merchant's application, so they have less to type: they check what is there, add their date of birth, SSN and EIN, sign and upload bank statements. A value we can't read (an industry that isn't on our list, a date in the future) is left blank for the merchant to fill in; it never stops the lead.

About the business

FieldTypeAllowed values / notes
businessNamestringThe legal business name, when it differs from companyName (e.g. Lopez Foods LLC trading as Lopez Bakery)
businessAddressstringStreet address, one line: 123 Main St, Tampa, FL 33602
businessZipCodestring5-digit ZIP
businessStatestringTwo-letter code (FL) or the full name
websiteUrlstring
industrystringRetail & E-commerce · Manufacturing & Production · Professional & Business Services · Healthcare & Wellness · Technology & Software Development · Hospitality & Food Services · Other
entityTypestringSole Proprietor · LLP / Partnership · LLC · S Corporation · C Corporation
businessStartDatestringWhen the business started: 2019-05-01 or 05/01/2019. A date in the future is ignored.
timeInBusinessstringLess than a year · 1 to 2 years · 3 or moreOr the date the business started (2019-05-01, 05/01/2019), or a length with its unit (5 years, 8 months): we pick the matching range. A date also fills in businessStartDate. Send businessStartDate alone and we work this out from it.

About the funding

FieldTypeAllowed values / notes
requestedAmountnumber or stringDollars, e.g. 50000
monthlyRevenuenumber or stringDollars per month, e.g. 45000
capitalPurposestringWorking Capital · Expansion · Inventory · Payroll · Purchasing Equipment · Real estate · Buy an existing business · Start a business · Personal use · Other
capitalTimelinestringWithin a week · Within 2 weeks · Within a month · Unsure, just browsing

About the owner

FieldTypeAllowed values / notes
lastNamestringThe business owner's last name
ownershipPercentnumber or stringThe owner's share of the business, 1 to 100 (100, 51, "51%")
ownerAddressstringThe owner's home address, one line: 9 Palm Ave, Tampa, FL 33606
personalCreditScorestring or numberExcellent (720+) · Good (680-719) · Fair (640-679) · Poor (639 or less)Or the score itself, 300 to 850 (750 or "750"): we pick the matching range, so 750 is filed as Excellent (720+).
ownResidentialOrCommercialPropertyboolean or "yes" / "no"Whether the owner owns residential or commercial property

For your reporting

FieldTypeAllowed values / notes
subIdstringYour traffic source or campaign, for reporting (letters, digits and - _ ., no spaces)

Don't send any other personal information. SSN, date of birth, EIN and signatures are collected on our own application, and we ignore them here. For a Duplicate lead the merchant's existing file is not changed by what you send.

Example request

curl
curl -X POST "https://app.directlend.ai/functions/affiliateSubmitLead" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: dla_YOUR_KEY" \
  -d '{
    "environment": "sandbox",
    "externalLeadId": "LS-1001",
    "firstName": "Maria",
    "lastName": "Lopez",
    "email": "maria@example.com",
    "phone": "(813) 555-0142",
    "companyName": "Lopez Bakery",
    "businessName": "Lopez Foods LLC",
    "businessAddress": "123 Main St, Tampa, FL 33602",
    "businessZipCode": "33602",
    "businessState": "FL",
    "industry": "Hospitality & Food Services",
    "entityType": "LLC",
    "businessStartDate": "2019-05-01",
    "monthlyRevenue": 45000,
    "requestedAmount": 60000,
    "capitalPurpose": "Working Capital",
    "personalCreditScore": "Good (680-719)",
    "ownershipPercent": 100,
    "ownerAddress": "9 Palm Ave, Tampa, FL 33606",
    "consentAgreement": true,
    "consentText": "By submitting, I agree that DirectLend may contact me by phone, text and email.",
    "consentTimestamp": "2026-11-20T14:03:11Z",
    "consentIpAddress": "203.0.113.7",
    "consentPageUrl": "https://yourdomain.com/apply",
    "consentCertificateUrl": "https://cert.trustedform.com/abc123",
    "subId": "google-search"
  }'

This example is in sandbox, so sending it creates nothing. To send real leads, set "environment": "production" or leave it out.

Response

HTTP 200 with a JSON body. Read leadType, then redirect the merchant to applicationUrl.

leadTypeMeaningapplicationUrl
UniqueA new merchant: we created their file.Their DirectLend application, pre-filled
DuplicateThis business is already with DirectLend.Their existing DirectLend application
ErrorWe couldn't create the lead (see errors).Our application form, pre-filled with what you sent, so the merchant can still apply

Unique

200 OK
{
  "leadType": "Unique",
  "leadId": "6b0f1c2a9e8d7c6b5a4f3e2d",
  "externalLeadId": "LS-1001",
  "applicationUrl": "https://app.directlend.ai/application/6b0f1c2a9e8d7c6b5a4f3e21",
  "message": "Lead created. Send the merchant to applicationUrl to complete their application."
}

Duplicate

200 OK
{
  "leadType": "Duplicate",
  "leadId": "6b0f1c2a9e8d7c6b5a4f3e2e",
  "externalLeadId": "LS-1002",
  "applicationUrl": "https://app.directlend.ai/application/6b0f1c2a9e8d7c6b5a4f3e30",
  "message": "This merchant is already on file with us. Send them to applicationUrl to continue their application."
}

Error

200 OK
{
  "leadType": "Error",
  "leadId": null,
  "externalLeadId": "LS-1003",
  "applicationUrl": "https://app.directlend.ai/get-matched?ref=yourcode&first_name=Maria&next=application",
  "errors": ["phone is required and must be a 10-digit US phone number."],
  "retryable": false,
  "message": "The lead could not be created. Send the merchant to applicationUrl to apply on our form."
}

leadId is our reference for the lead. Quote it together with your externalLeadId when you contact us.

Sandbox

Add "environment": "sandbox" to a lead to try your integration without creating anything. Use your normal API key and endpoint. We run every check a real lead gets (your key, each field) and answer in the same format, but no lead is created and nobody is contacted.

environmentWhat happens
"sandbox"Checked, not created. A lead that passes answers Unique with "environment": "sandbox", a made-up leadId (sandbox_…) and an applicationUrl to a page that confirms the test. A lead with a problem answers Error with its errors, as in production.
"production" or left outA real lead, created as described above.
anything elseRefused with an Error, so a typo never creates a real lead.

A sandbox lead is never stored, so the same externalLeadId can be sent again, and a sandbox lead never answers Duplicate (see its example above). Remove environment, or set it to "production", when you go live.

Errors and retries

  • retryable: true means the problem was on our side, or the answer took too long. Send the same lead again with the same externalLeadId a little later. Never change the ID on a retry. The merchant can still use the applicationUrl you already have.
  • retryable: false means something in the lead needs fixing. errors lists every problem.

Other status codes

StatusMeaning
401The API key is missing, wrong or no longer active. Contact DirectLend. The body still carries an applicationUrl (our general form).
405Use POST.

Sending the merchant to the link

  • Redirect the merchant's browser to applicationUrl, in the same tab or a new one. Don't load it inside a frame on your page: bank connections and document uploads need the full window.
  • Use the link right away, and keep it with the lead in your system.
  • Treat the link as private. It opens the merchant's own application, which will hold their personal and financial details once they fill it in. Don't share it, post it or use it in marketing.

Your dashboard

DirectLend gives you a login to your own dashboard; the invite comes by email. It lists the leads you sent that created a new file, with where each one stands. Leads that were already with DirectLend (Duplicate) are not listed there; the API answer tells you about them.

Testing

Test with "environment": "sandbox" (see Sandbox): nothing is created. Every lead sent in production creates a real lead in our system, and our team and follow-ups will contact it, so let your DirectLend contact know when your first production lead goes out.

DirectLend · Lead API v1 · November 2026