ghllisted
Install: claude install-skill LUIZOTAVIOENGENHARIADIGITAL/ghl-claude-skill
# GHL — GoHighLevel CRM operator
Operates a single GoHighLevel sub-account via a **Private Integration Token (PIT)** on the
**API v2** (`services.leadconnectorhq.com`).
## Credentials (NEVER hardcode)
This skill reads everything from environment variables — there are no secrets in this file or
in `scripts/ghl.py`:
- **`GHL_TOKEN`** — Private Integration Token, looks like `pit-xxxxxxxx-xxxx-...`
- **`GHL_LOCATION`** — the sub-account `locationId`
- **`GHL_VERSION`** — API version header (defaults to `2021-07-28`)
Create a PIT in your sub-account: **Settings → Private Integrations → Create new integration**,
and grant scopes for Contacts, Opportunities, Custom Fields, Tags (and anything else you need).
Then export the vars (or use a `.env` — see the repo README).
## ⚠️ Gotchas (the things that waste hours — never forget)
1. **A browser User-Agent is mandatory.** Without one, GHL's Cloudflare blocks the request with
**Error 1010 "Access denied"** (403). `curl` sends a UA by default, but `python-urllib` and
most default HTTP libs do NOT. `scripts/ghl.py` already injects a UA — if you use `requests`
or `fetch`, copy the same header.
2. **API v2 does NOT create everything — some things are UI-only.** Confirmed on real accounts:
- *Pipelines/stages*: a PIT typically returns **401** (no scope to create them).
- *Workflows*: `POST /workflows/` returns **404** (only `GET` lists them).
- *Smart Lists*: no API endpoint at all.
- So those must be built **in the U