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
locationIdfrom Settings > Business Info - A REST client like Postman, Insomnia, or
curlinstalled
Set Up Authentication
The pipeline getter uses standard Bearer token authentication.
- Go to Settings > Integrations > Private Integrations
- Select or create a PIT with opportunities scope (read access is sufficient)
- 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 endpointsname— The human-readable pipeline namestages— An array of stage objects, each with its ownid,name, andpositionlocationId— The sub-account this pipeline belongs toshowInFunnelandshowInPieChart— 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
locationIdparameter. This field is required.
Test Your Setup
Validate your pipeline retrieval with these steps:
- Run the GET call and confirm you receive a
pipelinesarray - Count the pipelines returned and compare to what you see in Opportunities > Pipelines in the dashboard
- For each pipeline, verify the stage names and ordering match the dashboard
- Copy one
pipelineIdand onepipelineStageIdfrom the response - 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.