Upload Application File
curl --request POST \
--url https://api.lendflow.com/api/applications/{application_id}/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file_type=ai_agent_session_message_file \
--form file=@example-file \
--form offer_stip_id=16 \
--form product_id=1import requests
url = "https://api.lendflow.com/api/applications/{application_id}/files"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"file_type": "ai_agent_session_message_file",
"offer_stip_id": "16",
"product_id": "1"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file_type', 'ai_agent_session_message_file');
form.append('file', '<string>');
form.append('offer_stip_id', '16');
form.append('product_id', '1');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.lendflow.com/api/applications/{application_id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lendflow.com/api/applications/{application_id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\nai_agent_session_message_file\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"offer_stip_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"product_id\"\r\n\r\n1\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lendflow.com/api/applications/{application_id}/files"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\nai_agent_session_message_file\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"offer_stip_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"product_id\"\r\n\r\n1\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lendflow.com/api/applications/{application_id}/files")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\nai_agent_session_message_file\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"offer_stip_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"product_id\"\r\n\r\n1\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lendflow.com/api/applications/{application_id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\nai_agent_session_message_file\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"offer_stip_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"product_id\"\r\n\r\n1\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"id": null,
"mime_type": "image/png",
"original_name": "a4855dc5-0acb-33c3-b921-f4291f719ca0.png",
"file_url": "",
"file_type": null,
"file_size": 6500437,
"type": 5,
"has_metadata": false,
"created_at": null,
"updated_at": null,
"outcome": null,
"reason": null
}
}Documents
Upload Application File
Uploads a single file to an application. The file is automatically categorized based on its contents.
POST
/
api
/
applications
/
{application_id}
/
files
Upload Application File
curl --request POST \
--url https://api.lendflow.com/api/applications/{application_id}/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file_type=ai_agent_session_message_file \
--form file=@example-file \
--form offer_stip_id=16 \
--form product_id=1import requests
url = "https://api.lendflow.com/api/applications/{application_id}/files"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"file_type": "ai_agent_session_message_file",
"offer_stip_id": "16",
"product_id": "1"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file_type', 'ai_agent_session_message_file');
form.append('file', '<string>');
form.append('offer_stip_id', '16');
form.append('product_id', '1');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://api.lendflow.com/api/applications/{application_id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lendflow.com/api/applications/{application_id}/files",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\nai_agent_session_message_file\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"offer_stip_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"product_id\"\r\n\r\n1\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lendflow.com/api/applications/{application_id}/files"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\nai_agent_session_message_file\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"offer_stip_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"product_id\"\r\n\r\n1\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lendflow.com/api/applications/{application_id}/files")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\nai_agent_session_message_file\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"offer_stip_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"product_id\"\r\n\r\n1\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lendflow.com/api/applications/{application_id}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file_type\"\r\n\r\nai_agent_session_message_file\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"offer_stip_id\"\r\n\r\n16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"product_id\"\r\n\r\n1\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"id": null,
"mime_type": "image/png",
"original_name": "a4855dc5-0acb-33c3-b921-f4291f719ca0.png",
"file_url": "",
"file_type": null,
"file_size": 6500437,
"type": 5,
"has_metadata": false,
"created_at": null,
"updated_at": null,
"outcome": null,
"reason": null
}
}Authorizations
You can register for a new Lendflow API key on our client portal in less than 60 seconds. The Bearer Token needs to be included in all API requests made to the API Service in the following form:
Authorization: Bearer [YOUR_TOKEN]
You must replace [YOUR_TOKEN] with your personal API key.
Path Parameters
The ID of the application.
Body
multipart/form-data
Available options:
adverse_media_report, affiliate_articles_of_incorporation, affiliate_articles_of_incorporation_or_organization, affiliate_articles_of_organization, affiliate_business_tax_return_last_year, affiliate_business_tax_return_two_years_ago, affiliate_by_laws, affiliate_by_laws_or_operating_agreement, affiliate_irs_ein_letter, affiliate_operating_agreement, ai_agent_session_message_file, applicant_eligibility_certification, application_stip, articles_of_incorporation, articles_of_incorporation_or_organization, articles_of_organization, bank_letter, bank_statements, bank_statements_4, bank_statements_8, bank_statements_12, bank_statements_2, bank_statements_1, bank_statements_7, bank_statements_6, bank_statements_3, bank_statements_5, bank_statements_11, bank_statements_10, bank_statements_9, bop_report, bpr_report, business_report, borrower_platform_template_image, call_recording, certificate_of_good_standing, contract, contract_template, copies_of_prior_sba_loans, corporate_by_laws, corporate_by_laws_or_llc_operating_agreement, credit_memo, credit_report, current_commercial_lease_agreement, dba, dba_or_fictitious_name_registration, debt_schedule, disclosures_and_authorizations, drivers_license_back, drivers_license_front, dynamic, email_footer_image, email_header_image, email_logo, fictitious_name_registration, financial_document_2, financial_document_6, financial_document_4, financial_document_3, financial_document_1, financial_document_10, financial_document_11, financial_document_12, financial_document_5, financial_document_7, financial_document_8, financial_document_9, funder_logo, fundera_other_document, funding_invoice, funding_invoice_purchase_order, funding_irs_form_ss4_ein, funding_payoff_balance_letter, funding_proof_of_ownership, funding_voided_check, history_of_business, id_document, inquiries, insurance_certificate, iso_application, list_of_all_fixed_assets, llc_operating_agreement, widget_logo, management_resume, missed_call_voicemail, offer_stip, other, payroll_report, payroll_report_1, payroll_report_2, payroll_report_3, payroll_report_4, payroll_report_5, payroll_report_6, payroll_report_7, personal_bank_statements, plaid_asset_report_pdf, plaid_statement, ppp_document_1, ppp_document_2, ppp_document_3, raw_cfa_data, recovered_document, ap_document_2, ap_document_6, ap_document_4, ap_document_1, ap_document_5, ap_document_3, risk_inform_report, sba_form_1919, sba_form_413, sba_ppp_forgiveness_letter, security_certificate, security_key, signed_application_doc, signed_checkout_doc, signed_certificate_doc, sms_attachment, state_filing_receipt, state_filing_receipt_or_certificate_of_good_standing, tax_exemption, tax_form_1, tax_form_2, tax_form_3, tax_form_4, tax_form_5, tax_form_6, tax_form_7, tax_form_8, tax_return_1, tax_return_3, tax_return_4, tax_return_5, tax_return_8, tax_return_6, tax_return_2, tax_return_7, uncategorized, verification_doc, w9, working_capital_funds_breakdown, xlsx_cfa_data Example:
"ai_agent_session_message_file"
The allowed extension for files are: pdf,gif,jpeg,png,xls,xlst,doc,docx,xlsx,heic,p12,pfx,pem. Must be a file. Must not be greater than 102400 kilobytes.
Must match an existing stored value.
Example:
16
Must match an existing stored value.
Example:
null
Must match an existing stored value.
Example:
null
Available options:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Example:
1
Response
200 - application/json
Show child attributes
Show child attributes
Was this page helpful?