Middesk KYB
Use the Middesk KYB Workflow Builder block to search for possible Secretary of State (SOS) business-name matches and to run a full Know Your Business (KYB) verification. The block ID ismiddesk_kyb, and it is available for business entities in the KYB block group.
The block exposes two separate operations. They use the same Middesk integration, but they return different data and do not run in a fixed sequence.
Available operations
A Business Search result does not select a business or replace the full KYB
report. It returns possible name matches, while the
middesk operation runs
full business verification. The workflow determines which operation runs and
in what order.Requirements
Middesk Business Search
Middesk
Run through the API
Use bearer authentication for all Lendflow API requests. Your account must have the selected service enabled for the application.- Call
PUT /api/applications/{application_id}/enrichthrough Enrich Business Credit Application for the application. - Set
providertomiddesk_business_searchormiddesk. Queue the operations separately if you need both and need to control their order. - For
middesk,options.middeskProductOptionsis optional. Supported values in the current integration arebusiness_verification_verify,liens,ucc_liens, andtax_liens. - A successful scheduling response is wrapped as
{"data":{"onqueue":true}}. This confirms that Lendflow queued the work; it is not the Middesk result. - Call
GET /api/applications/{application_id}/commercial_datathrough Get Commercial Data withservices[]=middeskandservices[]=middesk_business_searchto retrieve status, dates, stored provider data, and stored requests.
Run through Data Orchestration
Data Orchestration can run both Middesk operations.- In the Lendflow Dashboard, open Builders > Data Orchestration.
- Create or edit a template and add the applicable Middesk operation from the KYB category.
- Configure the conditions and connect each outcome to the next block.
- Save and publish the template.
- Call
POST /api/applications/{application_id}/data_orchestration/executethrough Execute Data Orchestration withtemplate_idandapplication_id.stage_idis optional, but when supplied it must identify a valid underwriting stage for the application. - Treat
{"data":{"executed":true}}as confirmation that Lendflow scheduled the run, not as the Middesk result. - Follow the run through Get Data Orchestration Log. Use Get Commercial Data with the applicable service in
services[]when you need the provider payload.
middesk_business_search, Data Orchestration can evaluate the result as soon as the synchronous search is stored. For middesk, Data Orchestration pauses while required Middesk orders are incomplete and resumes after Lendflow processes the webhook and retrieves the completed Business.
What the service returns
Representative response
The following sanitized example combines the current Lendflow fixture shapes inside the commercial-data wrapper.Response attributes shown in the example
Middesk Business Search provider data
Middesk Business provider data
Statuses and errors
Keep the following status layers separate:
Common failure cases include:
- Missing or invalid required application fields produce a validation error before Lendflow calls Middesk.
- An invalid U.S. phone number prevents the
middeskrequest. - Missing
formation_statepreventsmiddesk_business_search. - An inactive or unavailable Middesk integration prevents the service from running.
- Middesk HTTP errors are stored with the provider response and status code, and Lendflow records the job as failed.
- A TIN request can return a provider-level error when the IRS is unavailable. Middesk can retry TIN verification and send a
tin.retriedwebhook; this is different from a failed Lendflow API request. - Running an unpublished, incompatible, unauthorized, or already-running Data Orchestration template can return validation, authorization, or conflict errors.
FAQ
Does the Middesk KYB block always run both operations?
Does the Middesk KYB block always run both operations?
No. The block declares both
middesk_business_search and middesk as
related services, but API callers and Data Orchestration templates choose
which service to run. A template controls whether both run and in what
order.Does Business Search verify the business?
Does Business Search verify the business?
No. It returns possible SOS name matches and relative scores. Run
middesk
for the full Business verification and review findings.Why is Middesk commercial data null?
Why is Middesk commercial data null?
data.commercial_data.middesk remains null until Lendflow stores the
provider response. Inspect data.statuses.middesk to distinguish an
asynchronous run that is still processing from an error.Does an in_review Middesk status mean the application failed?
Does an in_review Middesk status mean the application failed?
No.
in_review is a Middesk Business lifecycle status meaning the
investigation is ready for your review. Review each task’s status,
sub-label, and message rather than treating the lifecycle status as a pass
or fail result.Can I use a Middesk API response without the Lendflow wrapper?
Can I use a Middesk API response without the Lendflow wrapper?
data.commercial_data.middesk is the stored provider response. The outer
data object, including statuses, dates, and request_data, is
Lendflow’s wrapper and is not part of Middesk’s schema.