Skip to content

HighLevel: Get Contacts By Business Id

HighLevel contacts.getContactsByBusinessId: arguments, response, policy and SDK examples.

← Contacts operations · Get started

Operation gohighlevel.get_contacts_by_businessid

Provider route: GET /contacts/business/{businessId}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/gohighlevel with npm, or alter-sdk-gohighlevel with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { HighLevelIntegration } from "@alter-ai/gohighlevel";
async function execute(input: Parameters<HighLevelIntegration["contacts"]["getContactsByBusinessId"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new HighLevelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.contacts.getContactsByBusinessId(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_gohighlevel import HighLevelIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = HighLevelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.contacts.get_contacts_by_business_id(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.businessIdstringRequired within parent
queryobjectRequired within parentAdditional keys: not allowed
query.limitstringOptional
query.locationIdstringRequired within parent
query.skipstringOptional
query.querystringOptional
query.startAfterarrayOptional
query.startAfter[]stringEach item

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Get Contacts By Business Id — response body

Referenced models: Get Contacts By Business Id — response body

Get Contacts By Business Id — response body
FieldTypePresenceDescription and constraints
$objectRoot
contactsarrayOptionalList of contacts associated with the business
contacts[]ModelEach itemExpand Get Contacts By Business Id — response body — contacts item
countJSONOptional
count (anyOf 1)numberAlternativeTotal number of contacts matching the query
count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Get Contacts By Business Id — response body — contacts item

Get Contacts By Business Id — response body — contacts item
FieldTypePresenceDescription and constraints
$objectRoot
attributionsarrayOptionalList of attribution sources for the contact
attributions[]ModelEach itemExpand Get Contacts By Business Id — response body — contacts item attributions item
businessIdstringOptionalBusiness Id the contact is associated with
countrystringOptionalCountry of the contact
customFieldsarrayOptionalList of custom field values for the contact
customFields[]ModelEach itemExpand Get Contacts By Business Id — response body — contacts item custom Fields item
dateAddedstringOptionalDate and time the contact was added (ISO 8601)
emailstringOptionalEmail address of the contact
followersarrayOptionalList of user Ids following this contact
followers[]stringEach item
idstringOptionalUnique identifier of the contact
locationIdstringOptionalLocation Id the contact belongs to
sourcestringOptionalSource from which the contact was created
tagsarrayOptionalList of tags associated with the contact
tags[]stringEach item
timezonestringOptionalTimezone of the contact

Referenced models: Get Contacts By Business Id — response body — contacts item attributions item, Get Contacts By Business Id — response body — contacts item custom Fields item

Get Contacts By Business Id — response body — contacts item attributions item
FieldTypePresenceDescription and constraints
$objectRoot
campaignJSONOptional
campaign (anyOf 1)stringAlternativeCampaign name
campaign (anyOf 2)nullAlternative
campaignIdJSONOptional
campaignId (anyOf 1)stringAlternativeCampaign Id
campaignId (anyOf 2)nullAlternative
dclidJSONOptional
dclid (anyOf 1)stringAlternativeDoubleClick click Id
dclid (anyOf 2)nullAlternative
fbEventIdJSONOptional
fbEventId (anyOf 1)stringAlternativeFacebook event Id
fbEventId (anyOf 2)nullAlternative
fbcJSONOptional
fbc (anyOf 1)stringAlternativeFacebook browser Id
fbc (anyOf 2)nullAlternative
fbclidJSONOptional
fbclid (anyOf 1)stringAlternativeFacebook click Id
fbclid (anyOf 2)nullAlternative
fbpJSONOptional
fbp (anyOf 1)stringAlternativeFacebook pixel Id
fbp (anyOf 2)nullAlternative
gclidJSONOptional
gclid (anyOf 1)stringAlternativeGoogle click Id
gclid (anyOf 2)nullAlternative
ipJSONOptional
ip (anyOf 1)stringAlternativeIP address of the visitor
ip (anyOf 2)nullAlternative
mediumJSONOptional
medium (anyOf 1)stringAlternativeAttribution medium (e.g. survey, funnel)
medium (anyOf 2)nullAlternative
mediumIdJSONOptional
mediumId (anyOf 1)stringAlternativeId of the attribution medium
mediumId (anyOf 2)nullAlternative
msclikidJSONOptional
msclikid (anyOf 1)stringAlternativeMicrosoft click Id
msclikid (anyOf 2)nullAlternative
referrerJSONOptional
referrer (anyOf 1)stringAlternativeReferrer URL
referrer (anyOf 2)nullAlternative
urlstringRequired within parentAttribution source type
userAgentJSONOptional
userAgent (anyOf 1)stringAlternativeBrowser user agent string
userAgent (anyOf 2)nullAlternative
utmContentJSONOptional
utmContent (anyOf 1)stringAlternativeUTM content parameter
utmContent (anyOf 2)nullAlternative
utmMediumJSONOptional
utmMedium (anyOf 1)stringAlternativeUTM medium parameter
utmMedium (anyOf 2)nullAlternative
utmSourceJSONOptional
utmSource (anyOf 1)stringAlternativeUTM source parameter
utmSource (anyOf 2)nullAlternative
Get Contacts By Business Id — response body — contacts item custom Fields item
FieldTypePresenceDescription and constraints
$objectRoot
idstringOptionalUnique identifier of the custom field
valuestringOptionalValue of the custom field

SDK function policy ID: gohighlevel.get_contacts_by_businessid. Catalog operation: get-contacts-by-businessId. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["contacts.readonly"]

Pinned headers: {"Version": "v3"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.