GoHighLevel API v2 & Developer Ecosystem
Architect custom SaaS extensions, build marketplace apps with @gohighlevel/marketplace-cli, verify cryptographic Ed25519 webhooks, and automate sub-account provisioning with official SDKs.
Google Ads & SEO practitioner since 2014
Direct Architectural Answer:
GoHighLevel API v2 provides production-ready RESTful endpoints governed by OAuth 2.0 with granular permission scopes, Ed25519 cryptographic webhook verification, official TypeScript and Python SDKs, Custom Objects schemas, and terminal automation via @gohighlevel/marketplace-cli.
- Official SDK (@gohighlevel/api-client) implements MongoDB/Redis session storage, auto 401 token refresh, and burst rate-limit retry.
- Webhooks are signed with asymmetric Ed25519 signatures in the x-ghl-signature header to prevent payload tampering and spoofing.
- Marketplace CLI (@gohighlevel/marketplace-cli) enables humans and autonomous AI agents to validate schemas and execute local action tests.
- Custom Objects API (schemas, records, relations, associations) unlocks enterprise multi-entity data models inside standard sub-accounts.
OAuth 2.0 & Scopes
Granular scopes (contacts.write, conversations.readonly) with automatic refresh token rotation and shared sub-account connection contexts.
Ed25519 Signed Webhooks
Cryptographically verified event streaming for ContactCreate, AppointmentCreate, OpportunityStageUpdate, and InvoicePaid.
Marketplace CLI & AI Agents
Interactive or flag-driven CLI workflows for humans and LLMs. Validate JSON app schemas, test actions in isolation, and deploy with zero portal friction.
The 38 Official GoHighLevel Repositories: Architectural Matrix
Our engineering audit of the public GoHighLevel GitHub organization reveals how modern microservices, mobile telephony, and client SDKs interoperate.
highlevel-api-sdk
Official Client SDK
Complete TypeScript client for API v2 with MongoDB session storage, auto 401 token refresh, and token-bucket burst limit retry.
marketplace-cli
Developer CLI Suite
Command-line tool (@gohighlevel/marketplace-cli) designed for humans and AI agents to scaffold, type-generate, and deploy marketplace apps.
highlevel-api-docs
Public API v2 Spec
Public OpenAPI/Swagger definitions for Contacts, Conversations, Calendars, Pipelines, Invoices, Snapshots, and Custom Objects.
ghl-agent-sdk & ghl-ai-plugins
AI Agent Framework
Multi-channel conversational agent runtime with tool execution, autonomous appointment booking, and dynamic workflow triggers.
ghl-marketplace-app-template
App Architecture Template
Enterprise starter scaffold demonstrating SSO iframe handshake, OAuth2 authorization code callback, and sub-account tokens.
highlevel-api-python
Official Python Client
Python library (gohighlevel-api-client) supporting OAuth2 flows, contact upserts, deal opportunities, and data pipelines.
flutter_twilio_voice & libphonenumber
VoIP Telephony Engine
Production mobile dialer integration utilizing Twilio Voice SDK with real-time AsYouType E.164 phone formatting and call syncing.
hyperdx & nodejs-logging
Observability Infrastructure
Distributed OpenTelemetry tracing, session replays, ClickHouse analytics, and Stackdriver logging for high-throughput webhook pipelines.
Enterprise SDK & Webhook Middleware Architectures
Extracted directly from the official highlevel-api-sdk and ghl-marketplace-app-template repositories.
import HighLevel, { MongoDBSessionStorage, LogLevel } from '@gohighlevel/api-client';
// Initialize HighLevel SDK with persistent session storage and automatic 429 burst retry
const ghl = new HighLevel({
clientId: process.env.GHL_CLIENT_ID,
clientSecret: process.env.GHL_CLIENT_SECRET,
sessionStorage: new MongoDBSessionStorage(
process.env.MONGODB_URI,
'ghl_enterprise_vault',
'oauth_sessions'
),
logLevel: LogLevel.INFO,
rateLimitRetry: {
maxRetries: 3, // Automatically backs off and retries when X-RateLimit-Remaining is 0
maxDelayMs: 10000, // Capped maximum wait interval per burst cycle
baseDelayMs: 1000 // Exponential backoff base delay for responses missing headers
}
});
// Programmatic Contact Upsert with Location Scoping
async function syncContact(locationId: string, email: string, customData: Record<string, any>) {
const contact = await ghl.contacts.upsertContact({
email,
phone: customData.phone,
name: customData.name,
tags: ['Enterprise-API-Sync', 'SQL-Connected'],
customFields: [
{ id: 'ext_account_id', value: customData.accountId },
{ id: 'lead_score', value: customData.score }
]
}, {
headers: { locationId }
});
return contact;
}import express from 'express';
import HighLevel from '@gohighlevel/api-client';
const app = express();
const ghl = new HighLevel({
webhookPublicKey: process.env.WEBHOOK_SIGNATURE_PUBLIC_KEY // Base64 or PEM Ed25519 public key
});
// Preserve raw body buffer for byte-level cryptographic signature verification
app.use(express.json({
verify: (req: any, _res, buf) => { req.rawBody = buf; }
}));
// Official SDK verification middleware automatically checks x-ghl-signature
// Handles INSTALL (token generation across sub-accounts) and UNINSTALL lifecycle events
app.use('/api/webhooks/ghl', ghl.webhooks.subscribe());
app.post('/api/webhooks/ghl', async (req: any, res) => {
// Reject spoofed or tampered requests immediately
if (req.isSignatureValid === false && !req.skippedSignatureVerification) {
return res.status(401).json({ error: 'Tampered webhook payload: Ed25519 signature invalid' });
}
const { type, locationId, data } = req.body;
switch (type) {
case 'OpportunityStageUpdate':
await processPipelineProgression(locationId, data);
break;
case 'InvoicePaid':
await provisionCustomerEntitlement(locationId, data);
break;
}
res.status(200).json({ status: 'verified_and_processed' });
});# 1. Install CLI globally
$ npm install -g @gohighlevel/marketplace-cli
# 2. Authenticate without browser popup (ideal for CI/CD and AI Agents)
$ ghl login --no-browser
# 3. Scaffold app directory with local JSON schema validation
$ ghl app create --name "Enterprise Postgres Sync" --type "custom_integration"
# 4. Pull declarative types & local schema files
$ ghl app pull --with-types
# 5. Execute dry-run action testing with sample payload
$ ghl app actions test syncDeal --input '{"dealId": "deal_0918", "stage": "Closed Won"}'
# 6. Push validated changes directly to Developer Portal
$ ghl app push --forceAPI v2 Rate Limit Specifications & Headers
GoHighLevel enforces a two-tier token bucket algorithm: short-term burst limits and aggregate daily limits. Every API v2 response includes telemetry headers:
| Header Key | Data Type | Description | SDK Behavior |
|---|---|---|---|
| X-RateLimit-Max | Integer | Maximum requests allowed per burst interval. | Parsed for concurrency throttling. |
| X-RateLimit-Interval-Milliseconds | Integer (ms) | Duration of the active burst bucket window. | Sleep duration before retrying rejected request. |
| X-RateLimit-Remaining | Integer | Available capacity remaining in current burst bucket. | Triggers immediate 429 backoff when 0. |
| X-RateLimit-Limit-Daily | Integer | Total daily quota allocated to the OAuth client. | Used to report quota utilization metrics. |
| X-RateLimit-Daily-Remaining | Integer | Total remaining API calls for today before hard block. | When 0, SDK throws error immediately (no retry). |
Developer API v2 & Custom Integrations: 20 Frequently Asked Questions
Build on the GoHighLevel Developer Platform
Launch your custom integration, test OAuth 2.0 endpoints, and experience the full developer toolset with full platform access.
No Obligation To Buy - Cancel Anytime. 14 Days Full Access.
Learn it, check it, use it
The evidence and tools behind this page
Our mission: help small businesses and agencies make better marketing decisions with plain-English guides, real research and free tools you can use without signing up.
The science: Switching between tools has a cost
In a lab study, interrupted work was finished faster but with more stress, frustration and time pressure. (Source: Mark, Gudith & Klocke, CHI 2008)
Scenario walkthrough
A labelled example of the setup, step by step. Not a real business; no results claimed.
Moving agency clients into one onboarding and reporting system