API Reference
Relevant source files
The following files were used as context for generating this wiki page:
The GoHighLevel Clone API is a RESTful interface designed to provide enterprise-grade marketing automation, CRM, and funnel management capabilities. Built primarily with FastAPI, the API follows Domain-Driven Design (DDD) principles and Clean Architecture to ensure scalability, multi-tenancy, and high maintainability. The system leverages JWT-based authentication (via Clerk) and Redis-backed rate limiting to secure account-scoped data.
Sources: README.md:14-22, DOCUMENTATION_SUMMARY.md:25-36
1. Authentication and Security
All API requests, except for public health checks, require authentication. The system uses JWT tokens for identity verification and account-level data isolation.
Authentication Flow
The following diagram illustrates the interaction between the Client, the Authentication Provider (Clerk), and the Backend API.
The authentication flow ensures that every request is tied to a specific tenant through account_id extraction from the JWT.
Sources: README.md:129-130, CHANGELOG.md:46-51, FRONTEND_IMPLEMENTATION_SUMMARY.md:180-185
Rate Limiting
To prevent abuse, the API implements Redis-based distributed rate limiting. By default, accounts are limited to 100 requests per hour or 100 requests per second depending on the specific module configuration.
| Header | Description |
|---|---|
X-RateLimit-Limit | The maximum number of requests allowed |
X-RateLimit-Remaining | The number of requests remaining in the current window |
X-RateLimit-Reset | The time when the rate limit window resets |
Sources: CHANGELOG.md:53-58, FUNNELS_BACKEND_IMPLEMENTATION_REPORT.md:445-447
2. Workflows API
The Workflows API manages the automation engine, including triggers, actions, and conditional logic.
Core Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/workflows | List all workflows for the account (paginated) |
POST | /api/v1/workflows | Create a new workflow (defaults to draft) |
GET | /api/v1/workflows/{id} | Retrieve detailed workflow configuration |
PATCH | /api/v1/workflows/{id} | Update workflow name, status, or steps |
POST | /api/v1/workflows/{id}/activate | Transition workflow to active state |
Sources: CHANGELOG.md:26-30, FRONTEND_IMPLEMENTATION_SUMMARY.md:200-210
Workflow States
Workflows exist in a state machine to prevent accidental execution of unfinished automations.
3. CRM API
The CRM module provides endpoints for managing contacts, companies, pipelines, and tasks.
Contact Management
The system supports rich contact profiles including custom fields (stored as JSONB) and tag associations.
| Parameter | Type | Description |
|---|---|---|
email | String | Unique email address (RFC 5322 compliant) |
first_name | String | Required, 1-100 characters |
custom_fields | JSONB | Flexible key-value pairs for tenant-specific data |
tags | Array | List of tag UUIDs associated with the contact |
Sources: backend/src/crm/README.md:139-145, backend/src/crm/README.md:196-200
Sales Pipelines and Deals
Deals are tracked through user-defined pipeline stages with weighted forecasting.
Visual representation of deal movement through a standard CRM pipeline.
Sources: backend/src/crm/README.md:149-155, backend/src/crm/README.md:205-209
4. Funnels API
The Funnels module manages landing pages, order processing, and conversion analytics. It consists of over 65 endpoints across 5 sub-specifications.
Funnel Lifecycle Architecture
Funnel Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/funnels | Create a new funnel aggregate |
POST | /api/v1/pages/assets | Upload images/videos to S3-compatible storage |
POST | /api/v1/orders | Process payments via Stripe integration |
GET | /api/v1/analytics/funnels/{id}/overview | Retrieve conversion and revenue metrics |
Sources: FUNNELS_BACKEND_IMPLEMENTATION_REPORT.md:104-115, FUNNELS_BACKEND_IMPLEMENTATION_REPORT.md:225-235
5. Analytics and Execution Logs
The API provides Server-Sent Events (SSE) for real-time monitoring of workflow executions and analytics updates.
Real-Time Event Stream
The execution logs use a streaming endpoint to push updates to the frontend without polling.
- Endpoint:
GET /api/v1/workflows/{id}/analytics/stream - Refresh Rate: Updates pushed as state transitions occur (approximately every 5 seconds for dashboard summaries).
Sources: frontend/PHASES_8-15_COMPLETION_REPORT.md:46-55, FRONTEND_IMPLEMENTATION_SUMMARY.md:215-220
Performance Metrics DTO
The API returns a standardized metrics object for dashboards:
total_enrolled: Count of unique contacts entered.active_contacts: Contacts currently in a "wait" or "in-progress" step.completion_rate: Percentage of contacts reaching a "Goal" or "End" step.drop_off_rate: Percentage of contacts exiting before completion.
Sources: frontend/PHASES_8-15_COMPLETION_REPORT.md:18-25, FRONTEND_IMPLEMENTATION_SUMMARY.md:105-110
The API Reference documentation provides a foundation for developers to interact with the GoHighLevel Clone ecosystem, ensuring that all tenant data is securely isolated while providing high-performance automation and CRM capabilities. All endpoints follow the Clean Architecture pattern, separating the presentation layer from the core domain logic.