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.
Endpoint
Headers
| Header | Value |
|---|---|
Content-Type | application/json |
X-Api-Key | Your API key, which starts with dla_. You can send Authorization: Bearer <key> instead. |
Request body
One lead per request, as a JSON object. Listed values are matched ignoring capitals.
Required
| Field | Type | Notes |
|---|---|---|
externalLeadId | string | Your 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. |
firstName | string | The business owner's first name |
email | string | The business owner's email |
phone | string | The business owner's phone: a 10-digit US number in any format (8135550142, (813) 555-0142, +1 813-555-0142) |
companyName | string | The business name |
consentAgreement | boolean | true: 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
About the business
| Field | Type | Allowed values / notes |
|---|---|---|
businessName | string | The legal business name, when it differs from companyName (e.g. Lopez Foods LLC trading as Lopez Bakery) |
businessAddress | string | Street address, one line: 123 Main St, Tampa, FL 33602 |
businessZipCode | string | 5-digit ZIP |
businessState | string | Two-letter code (FL) or the full name |
websiteUrl | string | |
industry | string | Retail & E-commerce · Manufacturing & Production · Professional & Business Services · Healthcare & Wellness · Technology & Software Development · Hospitality & Food Services · Other |
entityType | string | Sole Proprietor · LLP / Partnership · LLC · S Corporation · C Corporation |
businessStartDate | string | When the business started: 2019-05-01 or 05/01/2019. A date in the future is ignored. |
timeInBusiness | string | Less 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
| Field | Type | Allowed values / notes |
|---|---|---|
requestedAmount | number or string | Dollars, e.g. 50000 |
monthlyRevenue | number or string | Dollars per month, e.g. 45000 |
capitalPurpose | string | Working Capital · Expansion · Inventory · Payroll · Purchasing Equipment · Real estate · Buy an existing business · Start a business · Personal use · Other |
capitalTimeline | string | Within a week · Within 2 weeks · Within a month · Unsure, just browsing |
About the owner
| Field | Type | Allowed values / notes |
|---|---|---|
lastName | string | The business owner's last name |
ownershipPercent | number or string | The owner's share of the business, 1 to 100 (100, 51, "51%") |
ownerAddress | string | The owner's home address, one line: 9 Palm Ave, Tampa, FL 33606 |
personalCreditScore | string or number | Excellent (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+). |
ownResidentialOrCommercialProperty | boolean or "yes" / "no" | Whether the owner owns residential or commercial property |
For your reporting
| Field | Type | Allowed values / notes |
|---|---|---|
subId | string | Your 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.
Consent proof
"consentAgreement": true: a lead without it is not created (it gets an Error answer), and every field below is optional and never stops a lead.Please send what you have with every lead. We keep these with the lead as the record of the merchant's opt-in.
| Field | Type | Notes |
|---|---|---|
consentText | string | The exact consent wording the merchant agreed to |
consentTimestamp | string | When they agreed, ISO 8601 (2026-11-20T14:03:11Z) |
consentIpAddress | string | The merchant's IP address when they agreed |
consentPageUrl | string | The address of the page where they agreed |
consentCertificateUrl | string | A TrustedForm or Jornaya certificate link, if you use one |
Example request
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.
| leadType | Meaning | applicationUrl |
|---|---|---|
| Unique | A new merchant: we created their file. | Their DirectLend application, pre-filled |
| Duplicate | This business is already with DirectLend. | Their existing DirectLend application |
| Error | We couldn't create the lead (see errors). | Our application form, pre-filled with what you sent, so the merchant can still apply |
Unique
{
"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
{
"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
{
"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.
| environment | What 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 out | A real lead, created as described above. |
| anything else | Refused 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: truemeans the problem was on our side, or the answer took too long. Send the same lead again with the sameexternalLeadIda little later. Never change the ID on a retry. The merchant can still use theapplicationUrlyou already have.retryable: falsemeans something in the lead needs fixing.errorslists every problem.
Other status codes
| Status | Meaning |
|---|---|
401 | The API key is missing, wrong or no longer active. Contact DirectLend. The body still carries an applicationUrl (our general form). |
405 | Use 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.