Expand description
Rust data models (DTOs) for the GoHighLevel (HighLevel) CRM API — 2417 types generated from HighLevel’s official OpenAPI specifications.
Both API versions are covered side by side: v2 (1081 types, the
current stable API, Version: 2021-07-28) and v3 (1336 types,
Version: v3).
[dependencies]
ghl-models = { version = "0.3", features = ["invoices", "payments"] }ⓘ
use ghl_models::v2::invoices::{CreateInvoiceDto, InvoiceItemDto};
let invoice = CreateInvoiceDto {
alt_id: location_id,
alt_type: "location".into(), // the only legal value
name: "August retainer".into(),
currency: "USD".into(),
..Default::default()
};§Every module is a cargo feature
Nothing is enabled by default, because compiling everything means thousands
of structs: one module builds in ~1.3s, all 45 take ~30s. Use
features = ["full"] only for exploration.
v3 renames three modules and adds one: ad-manager→ad-publishing,
social-media-posting→social-planner, saas-api→saas, plus a new
chat-widget.
§Generation conventions
| Convention | Why |
|---|---|
Fields the spec marks required are non-Option | Matches the spec; you can’t forget a mandatory field |
Everything else is Option<T> with skip_serializing_if | Partial updates serialize to only what you set |
Arrays are Vec<T> with #[serde(default)] | An absent list reads as empty rather than erroring |
String enums stay String — allowed values are in each field’s doc comment | GoHighLevel adds enum values without notice; a closed Rust enum would turn that into a deserialization failure |
Anonymous nested objects and multi-branch compositions are serde_json::Value | The spec doesn’t name them |
A single-$ref allOf wrapper resolves to the referenced type | Those are description wrappers, not real composition |
| Unknown response fields are ignored, never rejected | Upstream additions can’t break your build |
§Related crates
ghl-sdk— the async API client (auth, retries, rate limits, pagination). Re-exports this crate under itsmodelsfeature.ghl-mcp— MCP server exposing GoHighLevel to AI agents.
§Further reading
- Usage guide
- Full API reference — every endpoint, struct, and enum value, per module
Regenerate with xtask/generate_models.py after HighLevel updates its specs.
Not affiliated with HighLevel Inc.