Skip to main content
PPL
Step-by-Step Setup 5-10 minutes

Pipeline Getter Setup

Pipelines & Opportunities Basic
Need more detail? Read the full guide for config deep-dives and best practices.

Pipeline Getter Setup

Retrieve all pipelines and their stages from your GoHighLevel account. This endpoint provides the pipeline and stage IDs you need for creating opportunities, searching, and managing statuses.

Prerequisites

Before you begin, confirm the following:

  • A GoHighLevel sub-account with at least one pipeline configured
  • A Private Integration Token (PIT) with the opportunities scope enabled
  • Your locationId from Settings > Business Info
  • A REST client like Postman, Insomnia, or curl installed

Set Up Authentication

The pipeline getter uses standard Bearer token authentication.

  1. Go to Settings > Integrations > Private Integrations
  2. Select or create a PIT with opportunities scope (read access is sufficient)
  3. Copy the token:
export GHL_TOKEN="your-private-integration-token"
export LOCATION_ID="your-location-id"

Required headers:

Authorization: Bearer $GHL_TOKEN
Version: 2021-07-28

No Content-Type header is needed since this is a read-only GET request with no body.

Make Your First Call

The endpoint is GET /opportunities/pipelines with locationId as a query parameter.

Retrieve all pipelines:

curl -X GET "https://services.leadconnectorhq.com/opportunities/pipelines?locationId=$LOCATION_ID" \
  -H "Authorization: Bearer $GHL_TOKEN" \
  -H "Version: 2021-07-28"

This single call returns every pipeline in the sub-account along with all their stages, ordering, and configuration details. There are no additional filter parameters since most accounts have a manageable number of pipelines.

Handle the Response

A successful 200 response returns a pipelines array. Each pipeline object includes:

  • id — The pipeline ID you pass to opportunity create, search, and upsert endpoints
  • name — The human-readable pipeline name
  • stages — An array of stage objects, each with its own id, name, and position
  • locationId — The sub-account this pipeline belongs to
  • showInFunnel and showInPieChart — Visibility settings per stage

Example response structure:

{
  "pipelines": [
    {
      "id": "abc123",
      "name": "Sales Pipeline",
      "stages": [
        {"id": "stage-1", "name": "New Lead", "position": 0},
        {"id": "stage-2", "name": "Qualified", "position": 1},
        {"id": "stage-3", "name": "Proposal Sent", "position": 2}
      ]
    }
  ]
}

Use the id from a pipeline and id from a stage when calling other opportunity endpoints. Stage position values indicate the order they appear on the pipeline board.

Common errors:

  • 401 — Token invalid or expired. Regenerate your PIT.
  • 422 — Missing locationId parameter. This field is required.

Test Your Setup

Validate your pipeline retrieval with these steps:

  1. Run the GET call and confirm you receive a pipelines array
  2. Count the pipelines returned and compare to what you see in Opportunities > Pipelines in the dashboard
  3. For each pipeline, verify the stage names and ordering match the dashboard
  4. Copy one pipelineId and one pipelineStageId from the response
  5. Use those IDs in a test call to the Opportunity CRUD endpoint to confirm they are valid

If you see fewer pipelines than expected, check that your PIT is scoped to the correct sub-account. Pipelines from other sub-accounts will not appear.

Next Steps

Read the full Pipeline Getter guide for tips on caching pipeline data and mapping stages dynamically. Use the retrieved IDs with Opportunity CRUD to create deals, or pass them to Opportunity Search for filtered queries by pipeline and stage.

Stay sharp. New guides and playbooks as they drop.