> ## Documentation Index
> Fetch the complete documentation index at: https://docs.teamfollowup.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the public API base URL: https://api.teamfollowup.ai/api.
> Authenticate public API requests with Authorization: Bearer YOUR_API_KEY.
> Use product-owned terms: agents, campaigns, projects (GoHighLevel sub-accounts), contacts, calls, outcomes, skills, cadences, phone numbers.
> Scope requests by locationId rather than projectName.
> Read the guide linked from each API reference group before recommending an endpoint.

# GoHighLevel resources

> The tags, calendars, custom fields and custom values your agent works with live in GoHighLevel. These endpoints read them so you can wire skills and workflows by id.

Your agent books into a GoHighLevel calendar, applies GoHighLevel tags, and
writes GoHighLevel custom fields. Every one of those has an id inside the
sub-account, and the settings that use them want the id, not the label. These
endpoints read the sub-account so you never have to guess.

Nothing here writes to GoHighLevel. Writes happen through the agent's
[skills](/skills/overview) and the campaign's
[workflow](/campaign-workflows/overview).

## What you can read

| Resource           | Fields                                              | You need it for                                                                                                        |
| ------------------ | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **Tags**           | `id`, `name`                                        | The `add_tag` and `check_tag` skills, `activeTags` and `inactiveTags` on a campaign, and `add-tag` workflow nodes.     |
| **Calendars**      | `id`, `name`, `calendarType`, `active`              | The `appointment_booking` skill's calendar and the workflow's `humanCallbackCalendarId`.                               |
| **Custom fields**  | `id`, `name`, `fieldKey`, `placeholder`, `dataType` | Reading lead data into the prompt, and `set-field` workflow nodes. `fieldKey` looks like `contact.what_service`.       |
| **Custom values**  | `id`, `name`, `fieldKey`, `placeholder`, `value`    | Business-wide constants such as the office address. `fieldKey` is the merge tag, `{{ custom_values.office_address }}`. |
| **Contact lookup** | The contact, or `contact: null`                     | Finding a GoHighLevel contact by phone number before a test call or an enrolment.                                      |

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's `fieldKey` 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](/agents/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:

| Code                      | Means                                                | Fix                                                |
| ------------------------- | ---------------------------------------------------- | -------------------------------------------------- |
| `GHL_NOT_CONNECTED`       | The project has never been connected.                | Connect it from the dashboard.                     |
| `SUBACCOUNT_DISCONNECTED` | It was connected and the credential no longer works. | Reconnect it. The project reads as `disconnected`. |
| `REAUTH_REQUIRED`         | GoHighLevel wants a fresh authorisation.             | Reauthorise from the dashboard.                    |

See [Agencies, projects and sub-accounts](/concepts/projects) 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](/master-agent/overview)
  binds assets by name.
* The lookup finds a contact by phone number only.

## In the API

* [List GHL tags](/api-reference/ghl/list-ghl-tags) and
  [List GHL calendars](/api-reference/ghl/list-ghl-calendars)
* [List agent GHL custom fields](/api-reference/ghl/list-agent-ghl-custom-fields) and
  [List location GHL custom fields](/api-reference/ghl/list-location-ghl-custom-fields)
* [List agent GHL custom values](/api-reference/ghl/list-agent-ghl-custom-values) and
  [List location GHL custom values](/api-reference/ghl/list-location-ghl-custom-values)
* [Lookup GHL contact](/api-reference/ghl/lookup-ghl-contact)
* Every field above is defined in the [Glossary](/glossary#gohighlevel)

## Related

* [Built around GoHighLevel](/concepts/built-on-ghl) explains why the platform
  keeps no CRM of its own.
* [Campaign workflows](/campaign-workflows/overview) consume these ids.
