agentleFS
TargetDialTargetDial/ghl-skill/ghl/SKILL.md

ghl

Skill4 starsChanged 8 months agoMITView on GitHub

GoHighLevel (GHL) API reference for managing contacts, sending documents/contracts, working with opportunities, and financial data (invoices, payments, subscriptions). Use when building GHL integrations, sending quotes, managing CRM data, or pulling financial reports.

  • Sends data out

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. obra/muse-skills★ 20same name
    2. donatassimkus/claude-ai-skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

Files
SKILL.md

GoHighLevel API Skill

Manage GoHighLevel CRM and financial operations -- send quotes/contracts, search contacts, manage opportunities, list invoices/subscriptions/transactions -- via the GHL REST API v2.

How to Use This Skill

Invocation: /ghl <command>

Examples:

/ghl list templates
/ghl search contacts "John Smith"
/ghl send quote

Step 0: Authenticate (ALWAYS do this first)

GHL uses Private Integration Tokens (static Bearer tokens) for API access.

  1. Read the config file:
    Read ~/.config/ghl/config.json
  2. Config format:
    {
      "token": "pit-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "locationId": "location_id_here",
      "userId": "user_id_here"
    }
  3. Use in every request:
    TOKEN="pit-xxx..."
  4. If config missing, tell the user:

    "GHL config not found. Create ~/.config/ghl/config.json with your Private Integration Token, locationId, and userId."

  5. To get a Private Integration Token: Agency Settings > Private Integrations > Create > Add scopes > Save > Copy token.

Quick Reference

  • Base URL: https://services.leadconnectorhq.com
  • Auth header: Authorization: Bearer <TOKEN>
  • Version header: Version: 2021-07-28 (REQUIRED on all requests)
  • Content-Type: application/json
  • Accept: application/json
  • Merge fields: Templates use {{contact.name}}, {{opportunity.custom_field}} etc. -- auto-populated from linked records on send

Common Operations

List Document/Contract Templates

curl -s -X GET "https://services.leadconnectorhq.com/proposals/templates?locationId=$LOCATION_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Version: 2021-07-28" \
  -H "Accept: application/json"

Returns array of templates with IDs and names. Use template IDs when sending.


Send Template (Send a Quote/Contract)

curl -s -X POST "https://services.leadconnectorhq.com/proposals/templates/send" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Version: 2021-07-28" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "templateId": "template_id_here",
    "userId": "user_id_here",
    "sendDocument": true,
    "locationId": "location_id_here",
    "contactId": "contact_id_here",
    "opportunityId": "opportunity_id_here"
  }'

Required fields: templateId, userId, locationId, contactId Optional fields: sendDocument (boolean), opportunityId

  • sendDocument: true sends immediately; false (or omit) creates as draft
  • opportunityId links the document to an opportunity -- merge fields from that opportunity will populate
  • Merge fields like {{contact.name}} auto-populate from the contact/opportunity records

Search Contacts

curl -s -X GET "https://services.leadconnectorhq.com/contacts/?locationId=$LOCATION_ID&query=John&limit=20" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Version: 2021-07-28" \
  -H "Accept: application/json"

Query params: locationId (required), query (search string), limit (max results)


Get Single Contact

curl -s -X GET "https://services.leadconnectorhq.com/contacts/$CONTACT_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Version: 2021-07-28" \
  -H "Accept: application/json"

Search Opportunities

curl -s -X GET "https://services.leadconnectorhq.com/opportunities/search?location_id=$LOCATION_ID&q=CompanyName" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Version: 2021-07-28" \
  -H "Accept: application/json"

Quote Sending Workflow (End-to-End)

  1. List templates -- GET /proposals/templates?locationId=X
  2. Pick a template by name/ID
  3. Search for contact -- GET /contacts/?locationId=X&query=name
  4. Optionally find opportunity -- GET /opportunities/search?location_id=X&q=name
  5. Send template -- POST /proposals/templates/send with templateId, contactId, locationId, userId
  6. Merge fields auto-populate from contact/opportunity data

CLI tool: python scripts/ghl-send-quote.py automates this entire flow interactively.


Error Handling

StatusMeaningAction
401Invalid or expired tokenCheck token in ghl-config.json, regenerate in GHL dashboard
400Bad request / validationCheck required fields, verify IDs exist
422Unprocessable entityTemplate or contact ID may be invalid
429Rate limitedWait and retry

Financial Operations

List Invoices

curl -s -X GET "https://services.leadconnectorhq.com/invoices/?altId=$LOCATION_ID&altType=location&limit=20&offset=0" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Version: 2021-07-28" \
  -H "Accept: application/json"

List Subscriptions

curl -s -X GET "https://services.leadconnectorhq.com/payments/subscriptions?altId=$LOCATION_ID&altType=location&limit=20&offset=0" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Version: 2021-07-28" \
  -H "Accept: application/json"

List Transactions

curl -s -X GET "https://services.leadconnectorhq.com/payments/transactions?altId=$LOCATION_ID&altType=location&limit=20&offset=0" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Version: 2021-07-28" \
  -H "Accept: application/json"

List Orders

curl -s -X GET "https://services.leadconnectorhq.com/payments/orders?altId=$LOCATION_ID&altType=location&limit=20&offset=0" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Version: 2021-07-28" \
  -H "Accept: application/json"

List Recurring Invoice Schedules

curl -s -X GET "https://services.leadconnectorhq.com/invoices/schedule?altId=$LOCATION_ID&altType=location&limit=20&offset=0" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Version: 2021-07-28" \
  -H "Accept: application/json"

Detailed Documentation

  • Authentication: See api-reference/authentication.md
  • OAuth 2.0: See api-reference/oauth.md (full OAuth flow, token exchange, refresh, scopes, rate limits, gotchas)
  • Proposals/Templates: See api-reference/proposals.md
  • Contacts: See api-reference/contacts.md
  • Payments: See api-reference/payments.md (transactions, orders, subscriptions, coupons)
  • Invoices: See api-reference/invoices.md (invoices, templates, schedules, estimates, text2pay)

Notes

  • GHL docs are notoriously sparse. When hitting unknown endpoints, test with curl first and document the actual response schema.
  • Private Integration Tokens don't expire but can be revoked. They're scoped to the agency/sub-account.
  • The Version: 2021-07-28 header is required on ALL v2 API calls. Without it, requests fail silently or return unexpected formats.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.