What you can read
Custom fields and custom values come in two flavours of endpoint: by agent,
under
/api/agent-builder/agents/{id}/ghl-custom-fields, which resolves the
agent’s own project, and by location, under
/api/agent-builder/locations/{locationId}/ghl-custom-fields, for when you
have the locationId and no agent yet. Calendars and tags are read by
location only.
Using them in the prompt
A custom field’sfieldKey can be dropped into the agent’s prompt. The value
for the lead being called is filled in at dial time, so the agent can open with
“you asked about a kitchen remodel” rather than “you asked about our
services”. See The prompt.
When the connection is not healthy
Every read here depends on the project’s GoHighLevel connection. Three error codes tell you what kind of broken it is:
See Agencies, projects and sub-accounts for project
states.
Boundaries
- These endpoints read the live sub-account. A tag created in GoHighLevel a second ago is already here.
- Ids are per sub-account. A calendar id from one client’s sub-account means nothing in another’s. This is why a master agent binds assets by name.
- The lookup finds a contact by phone number only.
In the API
- List GHL tags and List GHL calendars
- List agent GHL custom fields and List location GHL custom fields
- List agent GHL custom values and List location GHL custom values
- Lookup GHL contact
- Every field above is defined in the Glossary
Related
- Built around GoHighLevel explains why the platform keeps no CRM of its own.
- Campaign workflows consume these ids.
