Autocomplete business names and addresses

The Business Identities Autocomplete API returns real-time, structured autocomplete suggestions based on partial business names. Use it to help users quickly find and select their business during onboarding.

End-to-end flow

  1. A user types a partial business name in your application (for example, “dunder”).
  2. Your frontend sends a request to Middesk’s POST /v1/identities/autocomplete endpoint using a Publishable API key.
  3. Middesk returns a list of structured business identity suggestions including names, addresses, people, and entity type.
  4. Your frontend renders the results in the user’s UI.
  5. Once a user selects the correct business, send a Smart populate request or Business enrichment Order request to Middesk to retrieve additional business attributes.
Smart populate is a synchronous API, while a Business enrichment Order is asynchronous and offers higher coverage for certain business attributes.

Security requirements

To ensure the integrity and appropriate use of this API:

  • Publishable API key authentication: Each request must include a Middesk Publishable API key via the Authorization: Bearer header.
  • KYC enforcement: Perform KYC checks prior to querying Middesk when possible.
  • Abuse prevention: Prevent automated abuse or excessive velocity and volume (for example, bots or scraping).

Integrate the Autocomplete API

1

Locate your Publishable API key

Publishable API keys are available in the Middesk Dashboard:

  • Use the Publishable Test API Key for sandbox testing
  • Use the Publishable Live API Key for Production

Include the Publishable API key in the Authorization header using Bearer authorization:

Authorization: Bearer <API_KEY>
2

Make an autocomplete request

Send a POST request to the autocomplete endpoint with the business name and optional address or entity type:

Example request
$curl -X POST "https://api.middesk.com/v1/identities/autocomplete" \
> -H "Authorization: Bearer <PUBLISHABLE API KEY>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Dunder Mif",
> "entity_type": "CORPORATION",
> "addresses": [
> {
> "address_line1": "1725 Slough Avenue",
> "city": "Scranton",
> "state": "PA",
> "postal_code": "18501"
> }
> ]
> }'

A successful request returns a 200 OK with a list of business identity suggestions in the response body.

Example response
1{
2 "data": [
3 {
4 "names": [
5 { "name": "Dunder Mifflin", "type": "legal" },
6 { "name": "Dunder Mifflinfinity", "type": "dba" }
7 ],
8 "addresses": [
9 {
10 "full_address": "1725 Slough Avenue, Suite 200, Scranton, PA 18505",
11 "labels": ["office"]
12 }
13 ],
14 "people": [
15 { "name": "David Wallace" },
16 { "name": "Robert Kazamakis" },
17 { "name": "Jolene Bennett" }
18 ],
19 "entity_type": "CORPORATION"
20 }
21 ]
22}
3

Send a follow-up request for additional data

Once a user selects a business from the autocomplete results, retrieve additional business attributes to pre-populate onboarding fields:

Latency benchmarks

MetricTarget
p95 latency< 300ms
p99 latency< 650ms

Performance is monitored, and alerts trigger if p95 latency exceeds 300ms over sustained periods.

API reference

Method: POST

URL: https://api.middesk.com/v1/identities/autocomplete

Headers: Include the API key in the Authorization header using Bearer authorization

Request body

ParameterDescriptionRequired
namePartial or full business name. Minimum of 3 characters required.Yes
addressesList of addresses associated with the business.No
peopleList of people associated with the business.No
entity_typeEntity type of the business.No

Address object

ParameterDescriptionRequired
address_line1First line of addressNo
stateStateNo
cityCityNo
postal_codePostal codeNo

Person object

ParameterDescriptionRequired
nameFull name of associated personNo

Response statuses

CodeDescription
200Success
401Unauthorized
422Invalid parameters
429Rate limit exceeded

Response schema

FieldTypeDescription
dataBusinessIdentity[]Array of business identities.

BusinessIdentity object

FieldTypeDescription
namesName[]Array of name records for the business. Up to 3 results returned.
addressesAddress[]Array of known addresses for the business. Up to 3 results returned.
peoplePerson[]Array of associated people. Up to 3 results returned.
entity_typestring or nullThe legal structure of the entity. Possible values: LLC, CORPORATION, NON_PROFIT, PARTNERSHIP, TRUST, SOLE PROPRIETORSHIP, AGENT, and UNKNOWN

Name object

FieldTypeDescription
namestringA name associated with the business.
typestringThe name type. Possible values: dba or legal

Address object (response)

FieldTypeDescription
full_addressstringFull normalized address.
address_line1string or nullFirst line of address.
address_line2string or nullSecond line of address.
citystring or nullCity.
statestring or nullState.
postal_codestring or nullPostal code.
labelsstring[]Labels applied to the address. Possible values: billing, mailing, office, officer, primary, registered_agent, and shipping

Person object

FieldTypeDescription
namestringFull name of associated person.
titlesstring[]List of titles associated with person.
Get a demo
Contact your account manager or contact sales to inquire about access.