ghl-sdk
Unofficial async Rust SDK for the GoHighLevel (HighLevel) API 2.0.
- Auth: Private Integration Tokens (
pit-…), raw OAuth access tokens, or full OAuth 2.0 with automatic refresh and pluggableTokenStores. Agency→location token exchange (Ghl::as_location) for multi-tenant work. - Resilience: retries with exponential backoff + jitter,
Retry-Aftersupport on 429s, idempotent-only retry on 5xx/transport errors, live rate-limit headroom viaGhl::rate_status(). - Pagination: GoHighLevel's cursor scheme handled for you, exposed as
Streams. - Config: builder parameters or environment variables (
GHL_PIT_TOKEN,GHL_ACCESS_TOKEN,GHL_BASE_URL) — explicit parameters always win. - Secret hygiene: tokens are
secrecytypes, redacted from allDebugoutput. - Forward-compatible types: unknown response fields are preserved in an
extramap instead of breaking deserialization.
use ;
use TryStreamExt;
async
Typed service coverage today: contacts, opportunities, conversations, calendars, locations, plus OAuth/token exchange. Every other endpoint across GoHighLevel's 45 modules / 1,203 operations (API v2 and v3) is reachable through ghl.request_raw() — arbitrary method/path/query/body with the same auth, retry, and rate-limit handling — or the get_raw() / post_raw() helpers.
For typed request/response bodies on those endpoints, enable the models feature to get 2,417 generated DTOs from ghl-models:
= { = "0.3", = ["models"] }
= { = "0.3", = ["invoices"] }
Looking for the AI-agent side? See ghl-mcp, the MCP server built on this SDK.
License: MIT or Apache-2.0. Not affiliated with HighLevel Inc.