Skip to content

Alba-rosa/highlevel-api-rust

Repository files navigation

Tests

Highlevel Api

Unofficial Rust SDK for the GoHighLevel (HighLevel) API.

Disclaimer: This library is in heavy development. Many features are not tested yet and may contain bugs or incomplete implementations. Use at your own risk.

This project is an independent, community-maintained SDK. It is not affiliated with, endorsed by, or sponsored by GoHighLevel or HighLevel.

The SDK targets API version 2021-07-28. The official OpenAPI specs (per-resource JSON files) are published at GoHighLevel/highlevel-api-docs. A merged OpenAPI spec is available at this gist.

Quick Start

Add to your Cargo.toml:

[dependencies]
highlevel-api = "0.1"
use highlevel_api::{HighLevel, HighLevelConfig};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = HighLevel::new(
        HighLevelConfig::new("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .with_redirect_uri("https://your-app.example.com/oauth/callback"),
    );

    let token = std::env::var("HIGHLEVEL_TOKEN").expect("HIGHLEVEL_TOKEN not set");
    client.set_access_token(token).await;

    let pipelines = client.pipelines().list("YOUR_LOCATION_ID").await?;
    for p in &pipelines.pipelines {
        println!("{} ({} stages)", p.name, p.stages.len());
    }

    Ok(())
}

Tested Features

  • OAuth 2.0 (authorization URL, code exchange, token refresh, expiry tracking)
  • Blogs
  • Businesses
  • Calendars
  • Campaigns
  • Companies
  • Contacts (search, get, create, update, delete, upsert, tags, notes, tasks)
  • Conversations
  • Courses
  • Custom Fields
  • Custom Menus
  • Forms
  • Funnels
  • Invoices
  • Links
  • Locations
  • Medias
  • Opportunities
  • Payments
  • Pipelines
  • Products
  • Snapshots
  • Social Planner
  • Surveys
  • Tags
  • Users
  • Webhooks
  • Workflows