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.
Call through Alter
Section titled “Call through Alter”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 osfrom alter_sdk import Appfrom 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()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.businessId | string | Required within parent | |
query | object | Required within parent | Additional keys: not allowed |
query.limit | string | Optional | |
query.locationId | string | Required within parent | |
query.skip | string | Optional | |
query.query | string | Optional | |
query.startAfter | array | Optional | |
query.startAfter[] | string | Each item |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Get Contacts By Business Id — response body |
Referenced models: Get Contacts By Business Id — response body
Schemas
Section titled “Schemas”Get Contacts By Business Id — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
contacts | array | Optional | List of contacts associated with the business |
contacts[] | Model | Each item | Expand Get Contacts By Business Id — response body — contacts item |
count | JSON | Optional | |
count (anyOf 1) | number | Alternative | Total number of contacts matching the query |
count (anyOf 2) | string | Alternative | Pattern: ^-?[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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
attributions | array | Optional | List of attribution sources for the contact |
attributions[] | Model | Each item | Expand Get Contacts By Business Id — response body — contacts item attributions item |
businessId | string | Optional | Business Id the contact is associated with |
country | string | Optional | Country of the contact |
customFields | array | Optional | List of custom field values for the contact |
customFields[] | Model | Each item | Expand Get Contacts By Business Id — response body — contacts item custom Fields item |
dateAdded | string | Optional | Date and time the contact was added (ISO 8601) |
email | string | Optional | Email address of the contact |
followers | array | Optional | List of user Ids following this contact |
followers[] | string | Each item | |
id | string | Optional | Unique identifier of the contact |
locationId | string | Optional | Location Id the contact belongs to |
source | string | Optional | Source from which the contact was created |
tags | array | Optional | List of tags associated with the contact |
tags[] | string | Each item | |
timezone | string | Optional | Timezone 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
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
campaign | JSON | Optional | |
campaign (anyOf 1) | string | Alternative | Campaign name |
campaign (anyOf 2) | null | Alternative | |
campaignId | JSON | Optional | |
campaignId (anyOf 1) | string | Alternative | Campaign Id |
campaignId (anyOf 2) | null | Alternative | |
dclid | JSON | Optional | |
dclid (anyOf 1) | string | Alternative | DoubleClick click Id |
dclid (anyOf 2) | null | Alternative | |
fbEventId | JSON | Optional | |
fbEventId (anyOf 1) | string | Alternative | Facebook event Id |
fbEventId (anyOf 2) | null | Alternative | |
fbc | JSON | Optional | |
fbc (anyOf 1) | string | Alternative | Facebook browser Id |
fbc (anyOf 2) | null | Alternative | |
fbclid | JSON | Optional | |
fbclid (anyOf 1) | string | Alternative | Facebook click Id |
fbclid (anyOf 2) | null | Alternative | |
fbp | JSON | Optional | |
fbp (anyOf 1) | string | Alternative | Facebook pixel Id |
fbp (anyOf 2) | null | Alternative | |
gclid | JSON | Optional | |
gclid (anyOf 1) | string | Alternative | Google click Id |
gclid (anyOf 2) | null | Alternative | |
ip | JSON | Optional | |
ip (anyOf 1) | string | Alternative | IP address of the visitor |
ip (anyOf 2) | null | Alternative | |
medium | JSON | Optional | |
medium (anyOf 1) | string | Alternative | Attribution medium (e.g. survey, funnel) |
medium (anyOf 2) | null | Alternative | |
mediumId | JSON | Optional | |
mediumId (anyOf 1) | string | Alternative | Id of the attribution medium |
mediumId (anyOf 2) | null | Alternative | |
msclikid | JSON | Optional | |
msclikid (anyOf 1) | string | Alternative | Microsoft click Id |
msclikid (anyOf 2) | null | Alternative | |
referrer | JSON | Optional | |
referrer (anyOf 1) | string | Alternative | Referrer URL |
referrer (anyOf 2) | null | Alternative | |
url | string | Required within parent | Attribution source type |
userAgent | JSON | Optional | |
userAgent (anyOf 1) | string | Alternative | Browser user agent string |
userAgent (anyOf 2) | null | Alternative | |
utmContent | JSON | Optional | |
utmContent (anyOf 1) | string | Alternative | UTM content parameter |
utmContent (anyOf 2) | null | Alternative | |
utmMedium | JSON | Optional | |
utmMedium (anyOf 1) | string | Alternative | UTM medium parameter |
utmMedium (anyOf 2) | null | Alternative | |
utmSource | JSON | Optional | |
utmSource (anyOf 1) | string | Alternative | UTM source parameter |
utmSource (anyOf 2) | null | Alternative |
Get Contacts By Business Id — response body — contacts item custom Fields item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | string | Optional | Unique identifier of the custom field |
value | string | Optional | Value of the custom field |
Policy, approvals and errors
Section titled “Policy, approvals and errors”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"}