Skip to main content

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 is middesk_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

Run through the API

Use bearer authentication for all Lendflow API requests. Your account must have the selected service enabled for the application.
  1. Call PUT /api/applications/{application_id}/enrich through Enrich Business Credit Application for the application.
  2. Set provider to middesk_business_search or middesk. Queue the operations separately if you need both and need to control their order.
  3. For middesk, options.middeskProductOptions is optional. Supported values in the current integration are business_verification_verify, liens, ucc_liens, and tax_liens.
  4. A successful scheduling response is wrapped as {"data":{"onqueue":true}}. This confirms that Lendflow queued the work; it is not the Middesk result.
  5. Call GET /api/applications/{application_id}/commercial_data through Get Commercial Data with services[]=middesk and services[]=middesk_business_search to retrieve status, dates, stored provider data, and stored requests.
The commercial-data response uses this Lendflow wrapper:

Run through Data Orchestration

Data Orchestration can run both Middesk operations.
  1. In the Lendflow Dashboard, open Builders > Data Orchestration.
  2. Create or edit a template and add the applicable Middesk operation from the KYB category.
  3. Configure the conditions and connect each outcome to the next block.
  4. Save and publish the template.
  5. Call POST /api/applications/{application_id}/data_orchestration/execute through Execute Data Orchestration with template_id and application_id. stage_id is optional, but when supplied it must identify a valid underwriting stage for the application.
  6. Treat {"data":{"executed":true}} as confirmation that Lendflow scheduled the run, not as the Middesk result.
  7. Follow the run through Get Data Orchestration Log. Use Get Commercial Data with the applicable service in services[] when you need the provider payload.
For 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’s current public documentation does not describe the legacy /v1/names/search response contract used by this Lendflow operation. The candidate fields and 0–1 score above are validated against Lendflow’s request implementation, models, tests, and fixture. Do not interpret this score as a sanctions-screening score or as a verified-business decision.

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 middesk request.
  • Missing formation_state prevents middesk_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.retried webhook; 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

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.
No. It returns possible SOS name matches and relative scores. Run middesk for the full Business verification and review findings.
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.
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.
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.