HighLevel: Search Conversations
HighLevel conversations.searchConversation: arguments, response, policy and SDK examples.
← Conversations operations · Get started
Operation gohighlevel.search_conversation
Provider route: GET /conversations/search. 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["conversations"]["searchConversation"]>[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.conversations.searchConversation(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.conversations.search_conversation(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Required within parent | Additional keys: not allowed |
query.locationId | string | Required within parent | |
query.contactId | string | Optional | |
query.assignedTo | string | Optional | |
query.followers | string | Optional | |
query.mentions | string | Optional | |
query.query | string | Optional | |
query.sort | string | Optional | One of: asc, desc |
query.startAfterDate | JSON | Optional | |
query.id | string | Optional | |
query.limit | number | Optional | |
query.lastMessageType | string | Optional | One of: TYPE_CALL, TYPE_SMS, TYPE_RCS, TYPE_EMAIL, TYPE_SMS_REVIEW_REQUEST, TYPE_WEBCHAT, TYPE_SMS_NO_SHOW_REQUEST, TYPE_CAMPAIGN_SMS, TYPE_CAMPAIGN_CALL, TYPE_CAMPAIGN_EMAIL, TYPE_CAMPAIGN_VOICEMAIL, TYPE_FACEBOOK, TYPE_CAMPAIGN_FACEBOOK, TYPE_CAMPAIGN_MANUAL_CALL, TYPE_CAMPAIGN_MANUAL_SMS, TYPE_GMB, TYPE_CAMPAIGN_GMB, TYPE_REVIEW, TYPE_INSTAGRAM, TYPE_WHATSAPP, TYPE_CUSTOM_SMS, TYPE_CUSTOM_EMAIL, TYPE_CUSTOM_PROVIDER_SMS, TYPE_CUSTOM_PROVIDER_EMAIL, TYPE_IVR_CALL, TYPE_ACTIVITY_CONTACT, TYPE_ACTIVITY_INVOICE, TYPE_ACTIVITY_PAYMENT, TYPE_ACTIVITY_OPPORTUNITY, TYPE_LIVE_CHAT, TYPE_LIVE_CHAT_INFO_MESSAGE, TYPE_ACTIVITY_APPOINTMENT, TYPE_FACEBOOK_COMMENT, TYPE_INSTAGRAM_COMMENT, TYPE_CUSTOM_CALL, TYPE_INTERNAL_COMMENT, TYPE_ACTIVITY_EMPLOYEE_ACTION_LOG, TYPE_TIKTOK, TYPE_TIKTOK_COMMENT, TYPE_ACTIVITY_WHATSAPP, TYPE_FORM_SUBMISSION, TYPE_SMS_REACTION |
query.lastMessageAction | string | Optional | One of: automated, manual |
query.lastMessageDirection | string | Optional | One of: inbound, outbound |
query.status | string | Optional | One of: all, read, unread, starred, recents |
query.sortBy | string | Optional | One of: last_manual_message_date, last_message_date, score_profile, overdue_at, due_at |
query.sortScoreProfile | string | Optional | |
query.scoreProfile | string | Optional | |
query.scoreProfileMin | number | Optional | |
query.scoreProfileMax | number | Optional | |
query.startDate | number | Optional | |
query.endDate | number | Optional |
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 Search Conversations — response body |
Referenced models: Search Conversations — response body
Schemas
Section titled “Schemas”Search Conversations — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
conversations | array | Required within parent | The list of all conversations found for the given query |
conversations[] | Model | Each item | Expand Search Conversations — response body — conversations item |
total | JSON | Required within parent | |
total (anyOf 1) | number | Alternative | Total Number of results found for the given query |
total (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Referenced models: Search Conversations — response body — conversations item
Search Conversations — response body — conversations item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
contactId | string | Required within parent | Contact Id |
contactName | string | Required within parent | Alternative display name for the contact - used when full name is not available |
email | string | Required within parent | Primary email address of the contact |
fullName | string | Required within parent | Complete name of the contact (first and last name) |
id | string | Required within parent | Conversation Id |
lastMessageBody | string | Required within parent | Content of the most recent message in the conversation |
lastMessageType | string | Required within parent | Channel/type of the most recent message (SMS, Email, Call, etc) Known values: TYPE_CALL, TYPE_SMS, TYPE_RCS, TYPE_EMAIL, TYPE_SMS_REVIEW_REQUEST, TYPE_WEBCHAT, TYPE_SMS_NO_SHOW_REQUEST, TYPE_CAMPAIGN_SMS, TYPE_CAMPAIGN_CALL, TYPE_CAMPAIGN_EMAIL, TYPE_CAMPAIGN_VOICEMAIL, TYPE_FACEBOOK, TYPE_CAMPAIGN_FACEBOOK, TYPE_CAMPAIGN_MANUAL_CALL, TYPE_CAMPAIGN_MANUAL_SMS, TYPE_GMB, TYPE_CAMPAIGN_GMB, TYPE_REVIEW, TYPE_INSTAGRAM, TYPE_WHATSAPP, TYPE_CUSTOM_SMS, TYPE_CUSTOM_EMAIL, TYPE_CUSTOM_PROVIDER_SMS, TYPE_CUSTOM_PROVIDER_EMAIL, TYPE_IVR_CALL, TYPE_ACTIVITY_CONTACT, TYPE_ACTIVITY_INVOICE, TYPE_ACTIVITY_PAYMENT, TYPE_ACTIVITY_OPPORTUNITY, TYPE_LIVE_CHAT, TYPE_LIVE_CHAT_INFO_MESSAGE, TYPE_ACTIVITY_APPOINTMENT, TYPE_FACEBOOK_COMMENT, TYPE_INSTAGRAM_COMMENT, TYPE_CUSTOM_CALL, TYPE_INTERNAL_COMMENT, TYPE_ACTIVITY_EMPLOYEE_ACTION_LOG, TYPE_TIKTOK, TYPE_TIKTOK_COMMENT, TYPE_ACTIVITY_WHATSAPP, TYPE_FORM_SUBMISSION, TYPE_SMS_REACTION |
locationId | string | Required within parent | Location Id |
phone | string | Required within parent | Primary phone number of the contact |
type | string | Required within parent | Primary channel/type of the conversation (Phone, Email, etc) Known values: TYPE_PHONE, TYPE_EMAIL, TYPE_FB_MESSENGER, TYPE_REVIEW, TYPE_GROUP_SMS |
unreadCount | JSON | Required within parent | |
unreadCount (anyOf 1) | number | Alternative | Number of unread messages in this conversation |
unreadCount (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: gohighlevel.search_conversation. Catalog operation: search-conversation. 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: ["conversations.readonly"]
Pinned headers: {"Version": "v3"}