Intelligent. Executable. Profitable.
Hyper-Scalable Code. Autonomous Architectures. AI-Native Deployments.
A production-ready, enterprise-grade Python integration with GoHighLevel API, engineered by RJ Business Solutions. This package provides clean, scalable access to all major GoHighLevel functionalities including contacts, custom fields, tags, campaigns, workflows, and more.
Founder: Rick Jefferson | AI Systems Architect | Agent Framework Engineer | Full-Stack Code Commander
- 500+ Businesses Engineered across 25+ industries
- $50M+ Revenue Enabled via automation
- 100% Production-Grade Systems deployed
- AI-Native Infrastructure with CrewAI, LangChain, Reflexion
Core Specializations:
- π§ AI & Autonomous Systems - Multi-agent frameworks, CrewAI, LangChain
- βοΈ Cloud Engineering - AWS, GCP, Azure with Terraform, Docker, Kubernetes
- π» Full-Stack Development - Next.js, React, Python, Go, FastAPI
- π Data Engineering - Airflow, Spark, PostgreSQL, Supabase, Vector DBs
- π Complete API Coverage - All working GoHighLevel endpoints
- π§ Credit Repair Ready - Pre-configured custom fields and tags
- β‘ Production Ready - Error handling, logging, and robust request management
- π¨ Enterprise Grade - Clean, scalable architecture for business use
- π± Portable - Single directory that can be moved anywhere
- π§ AI-Native - Built for integration with AI agents and automation
- Python 3.7+
- GoHighLevel account with API access
- API key (JWT token) and Location ID
pip install -r requirements.txt
-
API Key (JWT Token):
- Go to your GoHighLevel account
- Navigate to Settings β API Keys
- Copy your JWT token
-
Location ID:
- Go to Settings β Locations
- Copy your Location ID
from ghl_integration import GHLConfig, GoHighLevelIntegration
# Configure your integration
config = GHLConfig(
api_key="your_jwt_token_here",
location_id="your_location_id_here"
)
# Create integration instance
ghl = GoHighLevelIntegration(config)
# Test connection
if ghl.test_connection():
print("β
Connected to GoHighLevel!")
# Get contacts
contacts = ghl.get_contacts(limit=10)
print(f"Found {len(contacts.get('contacts', []))} contacts")
# Get custom fields
fields = ghl.get_custom_fields()
print(f"Found {len(fields.get('customFields', []))} custom fields")
python quick_start.py
Important: Update the API_KEY
and LOCATION_ID
variables in quick_start.py
first!
@dataclass
class GHLConfig:
api_key: str # JWT token from GoHighLevel
location_id: str # Location ID from GoHighLevel
base_url: str = "https://rest.gohighlevel.com/v1"
timeout: int = 30
def get_contacts(self, limit: int = 100, offset: int = 0) -> Dict[str, Any]:
"""Get all contacts with pagination"""
# Endpoint: GET /contacts/?locationId={locationId}&limit={limit}&offset={offset}
Parameters:
limit
(int): Maximum number of contacts to return (default: 100)offset
(int): Number of contacts to skip (default: 0)
Response:
{
"contacts": [
{
"id": "contact_id",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"phone": "+1234567890",
"customField": {...}
}
],
"total": 150
}
def create_contact(self, contact_data: Dict[str, Any]) -> Dict[str, Any]:
"""Create a new contact"""
# Endpoint: POST /contacts/
Request Body:
{
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"phone": "+1234567890",
"address1": "123 Main St",
"city": "Dallas",
"state": "TX",
"zipCode": "75201",
"customField": {
"Credit Score": 720,
"Service Plan": "Premium"
}
}
Response:
{
"id": "new_contact_id",
"firstName": "John",
"lastName": "Doe",
"email": "john@example.com",
"status": "created"
}
def update_contact(self, contact_id: str, contact_data: Dict[str, Any]) -> Dict[str, Any]:
"""Update an existing contact"""
# Endpoint: PUT /contacts/{contact_id}
def delete_contact(self, contact_id: str) -> Dict[str, Any]:
"""Delete a contact"""
# Endpoint: DELETE /contacts/{contact_id}
def search_contacts(self, query: str, limit: int = 100) -> Dict[str, Any]:
"""Search contacts by name, email, or phone"""
# Endpoint: GET /contacts/search?locationId={locationId}&query={query}&limit={limit}
def get_custom_fields(self) -> Dict[str, Any]:
"""Get all custom fields"""
# Endpoint: GET /custom-fields/
Response:
{
"customFields": [
{
"id": "field_id",
"name": "Credit Score",
"dataType": "NUMERICAL",
"fieldKey": "credit_score",
"picklistOptions": null
}
]
}
def create_custom_field(self, field_data: Dict[str, Any]) -> Dict[str, Any]:
"""Create a custom field"""
# Endpoint: POST /custom-fields/
Request Body:
{
"name": "Company Size",
"dataType": "SINGLE_OPTIONS",
"options": ["1-10", "11-50", "51-200", "200+"]
}
Supported Data Types:
TEXT
- Single line textLARGE_TEXT
- Multi-line textNUMERICAL
- NumbersDATE
- Date fieldsMONETORY
- Currency amountsSINGLE_OPTIONS
- Dropdown with single selectionMULTIPLE_OPTIONS
- Dropdown with multiple selectionRADIO
- Radio button optionsCHECKBOX
- Checkbox optionsPHONE
- Phone number fieldsFILE_UPLOAD
- File upload fields
def update_custom_field(self, field_id: str, field_data: Dict[str, Any]) -> Dict[str, Any]:
"""Update a custom field"""
# Endpoint: PUT /custom-fields/{field_id}
def delete_custom_field(self, field_id: str) -> Dict[str, Any]:
"""Delete a custom field"""
# Endpoint: DELETE /custom-fields/{field_id}
def get_tags(self) -> Dict[str, Any]:
"""Get all tags"""
# Endpoint: GET /tags/?locationId={location_id}
def create_tag(self, tag_data: Dict[str, Any]) -> Dict[str, Any]:
"""Create a new tag"""
# Endpoint: POST /tags/
Request Body:
{
"name": "VIP Client",
"color": "#FFD700"
}
def add_tags_to_contact(self, contact_id: str, tags: List[str]) -> Dict[str, Any]:
"""Add tags to a contact"""
# Endpoint: POST /contacts/{contact_id}/tags
Request Body:
{
"tags": ["VIP Client", "Active", "Premium Plan"]
}
def remove_tags_from_contact(self, contact_id: str, tags: List[str]) -> Dict[str, Any]:
"""Remove tags from a contact"""
# Endpoint: DELETE /contacts/{contact_id}/tags
def get_campaigns(self) -> Dict[str, Any]:
"""Get all campaigns"""
# Endpoint: GET /campaigns/?locationId={location_id}
Note: Campaigns are read-only via API. Create them manually in GoHighLevel UI.
def get_workflows(self) -> Dict[str, Any]:
"""Get all workflows"""
# Endpoint: GET /workflows/?locationId={location_id}
Note: Workflows are read-only via API. Create them manually in GoHighLevel UI.
def get_forms(self) -> Dict[str, Any]:
"""Get all forms"""
# Endpoint: GET /forms/?locationId={location_id}
def get_form_submissions(self, form_id: str) -> Dict[str, Any]:
"""Get form submissions"""
# Endpoint: GET /forms/submissions?locationId={location_id}&formId={form_id}
def test_connection(self) -> bool:
"""Test API connection by attempting to get contacts"""
def get_location_info(self) -> Dict[str, Any]:
"""Get location information"""
# Endpoint: GET /locations/{location_id}
def get_user_info(self) -> Dict[str, Any]:
"""Get current user information"""
# Endpoint: GET /users/
Extends GoHighLevelIntegration
with credit repair specific functionality.
def setup_credit_repair_system(self):
"""Initialize credit repair specific custom fields and tags"""
# Automatically creates:
# - Credit repair custom fields
# - Credit repair tags
# - Service plan options
# - Status tracking
- Credit Score - NUMERICAL
- Credit Report Date - DATE
- Dispute Items - NUMERICAL
- Service Plan - SINGLE_OPTIONS (Basic, Standard, Premium, VIP)
- Start Date - DATE
- Monthly Fee - MONETORY
- Payment Method - SINGLE_OPTIONS (Credit Card, ACH, PayPal, Check)
- Status - SINGLE_OPTIONS (Prospect, Client, Active, Paused, Completed, Cancelled)
- Credit Repair Client
- Prospect, Active Client, Paused Client, Completed Client
- High Priority, Payment Issue, Credit Score Improved
- Disputes Filed, Follow Up Required
- New Lead, Qualified Lead, Unqualified Lead
- VIP Client, Basic Plan, Standard Plan, Premium Plan, VIP Plan
def add_contact_to_credit_repair_system(self, contact_data: Dict[str, Any]) -> Dict[str, Any]:
"""Add a contact to the credit repair system with proper tagging"""
# 1. Creates the contact
# 2. Automatically adds appropriate tags based on:
# - Status (Prospect Client, Active Client, etc.)
# - Service Plan (Basic Plan, Premium Plan, etc.)
# 3. Returns the created contact
go-high-level-integration/
βββ π ghl_integration.py # Core integration module
βββ β‘ quick_start.py # Quick start example
βββ π example_usage.py # Comprehensive examples
βββ π§ͺ test_integration.py # Test your setup
βββ π§ setup.py # Automated setup script
βββ βοΈ config_template.py # Configuration template
βββ π¦ requirements.txt # Python dependencies
βββ π README.md # This comprehensive documentation
βββ π GETTING_STARTED.md # Quick start guide
βββ πͺ setup.bat # Windows batch file
-
Campaigns & Workflows: These are read-only via API. You must create them manually in the GoHighLevel UI.
-
API Limits: GoHighLevel has rate limits. The integration includes automatic retry logic.
-
Authentication: Always use JWT tokens (not OAuth) for direct API access.
-
Custom Fields: The
objectKey
is automatically generated from the field name. -
Production Use: This integration is designed for enterprise use with proper error handling and logging.
-
"Invalid JWT" Error:
- Check your API key is correct
- Ensure you're using the JWT token, not OAuth credentials
-
"Location not found" Error:
- Verify your Location ID is correct
- Check you have access to that location
-
"Custom field already exists" Error:
- This is normal - the field was already created
- The integration handles this gracefully
-
Rate Limiting:
- GoHighLevel limits API calls
- The integration includes delays between requests
Enable detailed logging:
import logging
logging.basicConfig(level=logging.DEBUG)
- Check the troubleshooting section above
- Verify your GoHighLevel credentials
- Check the GoHighLevel API documentation
- Contact GoHighLevel support directly
- Email: info@rickjeffersonsolutions.com
- Website: rjbizsolution.com
- LinkedIn: Rick Jefferson
- GitHub: @rjbizsolution23-wq
This integration is provided by RJ Business Solutions for GoHighLevel users. Use at your own risk in accordance with GoHighLevel's terms of service.
RJ Business Solutions Promise:
"We don't deliver MVPsβwe deploy automated, intelligent infrastructure that works, scales, and makes money."
This integration is based on the official GoHighLevel API documentation and is updated as the API evolves. RJ Business Solutions maintains this integration for enterprise use.
Built with β€οΈ by RJ Business Solutions
Intelligent. Executable. Profitable.