# List Courses

GET https://services.leadconnectorhq.com/courses/products

List courses in the location. Requires a Location token with courses.readonly. Send Version: v3. Each item is the full course object including customizations.

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `courses.readonly`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | string | No | Page size (1-50) |
| `cursor` | string | No | Opaque cursor from the previous page |
| `search` | string | No | Case-insensitive title search |
| `locationId` | string | Yes | Location id or sub-account id is required. |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/courses/products": {
      "get": {
        "summary": "List Courses",
        "operationId": "listCourses",
        "description": "List courses in the location. Requires a Location token with courses.readonly. Send Version: v3. Each item is the full course object including customizations.",
        "parameters": [
          {
            "name": "limit",
            "required": false,
            "in": "query",
            "description": "Page size (1-50)",
            "example": "15",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "cursor",
            "required": false,
            "in": "query",
            "description": "Opaque cursor from the previous page",
            "example": "eyJjcmVhdGVkQXQiOiIyMDI2LTA0LTIwVDEwOjAwOjAwLjAwMFoiLCJpZCI6IjEyM2U0NTY3LWU4OWItNDJkMy1hNDU2LTQyNjYxNDE3NDAwMSJ9",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Case-insensitive title search",
            "example": "onboarding",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "locationId",
            "required": true,
            "in": "query",
            "description": "Location id or sub-account id is required.",
            "schema": {
              "type": "string",
              "example": "ve9EPM428h8vShlRW1KT",
              "minLength": 1
            }
          },
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseProductsListResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "404": {
            "description": "Not Found"
          },
          "415": {
            "description": "Unsupported Media Type"
          },
          "429": {
            "description": "Too Many Requests"
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "Location-Access": [
              "courses.readonly"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "CourseProductsListResponseDto": {
        "type": "object",
        "properties": {
          "products": {
            "example": [
              {
                "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "title": "My Course",
                "description": "Intro to the course",
                "posterImage": "https://cdn.example.com/course.png",
                "customJs": null,
                "customCss": null,
                "customHeader": null,
                "customFooter": null,
                "commentPrivacy": "public",
                "libraryOrder": 1,
                "createdAt": "2026-04-20T10:00:00.000Z",
                "updatedAt": "2026-04-20T10:00:00.000Z",
                "customizations": {
                  "id": "d1e2f3a4-b5c6-4789-abcd-ef1234567890",
                  "logoImage": "https://cdn.example.com/logo.png",
                  "heroImage": "https://cdn.example.com/hero.png",
                  "heroOverlayColor": "#000000",
                  "heroTextAlignment": "centered",
                  "heroSpacing": "medium",
                  "favicon": "https://cdn.example.com/favicon.ico",
                  "instructorHeading": "Your instructor",
                  "instructorHeadshot": "https://cdn.example.com/instructor.png",
                  "instructorName": "Jane Doe",
                  "instructorTitle": "Lead instructor",
                  "instructorBio": "Teaches this course",
                  "templateId": null,
                  "settings": null,
                  "lessonSettings": null
                }
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Product id",
                  "example": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
                },
                "title": {
                  "type": "string",
                  "description": "Course title",
                  "example": "My Course"
                },
                "description": {
                  "type": "string",
                  "nullable": true
                },
                "posterImage": {
                  "type": "string",
                  "description": "Course poster image URL",
                  "example": "https://cdn.example.com/course.png",
                  "nullable": true
                },
                "customJs": {
                  "type": "string",
                  "nullable": true
                },
                "customCss": {
                  "type": "string",
                  "nullable": true
                },
                "customHeader": {
                  "type": "string",
                  "nullable": true
                },
                "customFooter": {
                  "type": "string",
                  "nullable": true
                },
                "commentPrivacy": {
                  "type": "string",
                  "enum": [
                    "public",
                    "instructorOnly",
                    "publicAndInstructor"
                  ]
                },
                "libraryOrder": {
                  "type": "number"
                },
                "createdAt": {
                  "type": "string",
                  "example": "2026-04-20T10:00:00.000Z"
                },
                "updatedAt": {
                  "type": "string",
                  "example": "2026-04-20T10:00:00.000Z"
                },
                "customizations": {
                  "nullable": true,
                  "example": {
                    "id": "d1e2f3a4-b5c6-4789-abcd-ef1234567890",
                    "logoImage": "https://cdn.example.com/logo.png",
                    "heroImage": "https://cdn.example.com/hero.png",
                    "heroOverlayColor": "#000000",
                    "heroTextAlignment": "centered",
                    "heroSpacing": "medium",
                    "favicon": "https://cdn.example.com/favicon.ico",
                    "instructorHeading": "Your instructor",
                    "instructorHeadshot": "https://cdn.example.com/instructor.png",
                    "instructorName": "Jane Doe",
                    "instructorTitle": "Lead instructor",
                    "instructorBio": "Teaches this course",
                    "templateId": null,
                    "settings": null,
                    "lessonSettings": null
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": "d1e2f3a4-b5c6-4789-abcd-ef1234567890"
                        },
                        "logoImage": {
                          "type": "string",
                          "nullable": true
                        },
                        "heroImage": {
                          "type": "string",
                          "nullable": true
                        },
                        "heroOverlayColor": {
                          "type": "string",
                          "nullable": true
                        },
                        "heroTextAlignment": {
                          "type": "string",
                          "enum": [
                            "left",
                            "right",
                            "centered"
                          ],
                          "nullable": true
                        },
                        "heroSpacing": {
                          "type": "string",
                          "enum": [
                            "xs",
                            "small",
                            "medium",
                            "large"
                          ],
                          "nullable": true
                        },
                        "favicon": {
                          "type": "string",
                          "nullable": true
                        },
                        "instructorHeading": {
                          "type": "string",
                          "nullable": true
                        },
                        "instructorHeadshot": {
                          "type": "string",
                          "nullable": true
                        },
                        "instructorName": {
                          "type": "string",
                          "nullable": true
                        },
                        "instructorTitle": {
                          "type": "string",
                          "nullable": true
                        },
                        "instructorBio": {
                          "type": "string",
                          "nullable": true
                        },
                        "templateId": {
                          "type": "string",
                          "nullable": true
                        },
                        "settings": {
                          "type": "object",
                          "nullable": true,
                          "additionalProperties": true
                        },
                        "lessonSettings": {
                          "type": "object",
                          "nullable": true,
                          "additionalProperties": true
                        }
                      },
                      "required": [
                        "id",
                        "logoImage",
                        "heroImage",
                        "heroOverlayColor",
                        "heroTextAlignment",
                        "heroSpacing",
                        "favicon",
                        "instructorHeading",
                        "instructorHeadshot",
                        "instructorName",
                        "instructorTitle",
                        "instructorBio",
                        "templateId",
                        "settings",
                        "lessonSettings"
                      ],
                      "title": "CourseCustomizationDto"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "title",
                "description",
                "posterImage",
                "customJs",
                "customCss",
                "customHeader",
                "customFooter",
                "commentPrivacy",
                "libraryOrder",
                "createdAt",
                "updatedAt",
                "customizations"
              ],
              "title": "CourseProductDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "description": "Cursor for the next page, or null when there is no next page",
            "example": null,
            "nullable": true
          }
        },
        "required": [
          "products",
          "nextCursor"
        ],
        "title": "CourseProductsListResponseDto"
      }
    }
  }
}
```

## HighLevel SDK Examples

**Node.js** (`@gohighlevel/api-client`)

```javascript
import HighLevel from '@gohighlevel/api-client';

const ghl = new HighLevel({
  privateIntegrationToken: '<PRIVATE_INTEGRATION_TOKEN>'
});

const response = await ghl.courses.listCourses({ locationId: '<LOCATIONID>' });
console.log(response);
```

**Python** (`gohighlevel-api-client`)

```python
from highlevel import HighLevel

client = HighLevel(
    private_integration_token='<PRIVATE_INTEGRATION_TOKEN>'
)

response = await client.courses.list_courses(locationId='<LOCATIONID>')
print(response)
```

**PHP** (`gohighlevel/api-client`)

```php
<?php
require_once 'vendor/autoload.php';

use HighLevel\HighLevel;
use HighLevel\HighLevelConfig;

$config = new HighLevelConfig([
    'privateIntegrationToken' => '<PRIVATE_INTEGRATION_TOKEN>'
]);
$ghl = new HighLevel($config);

$response = $ghl->courses->listCourses(['locationId' => '<LOCATIONID>']);
echo json_encode($response, JSON_PRETTY_PRINT);
```

## Code Examples

**cURL**

```bash
curl -L -X GET 'https://services.leadconnectorhq.com/courses/products?locationId=<LOCATIONID>' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3'
```

**Node.js**

```javascript
const options = {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3'
  }
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/courses/products?locationId=<LOCATIONID>', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/courses/products"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

params = {
    "locationId": "<LOCATIONID>"
}

response = requests.get(url, params=params, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/courses/products?locationId=<LOCATIONID>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
  ],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .get("https://services.leadconnectorhq.com/courses/products?locationId=<LOCATIONID>")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {
  url := "https://services.leadconnectorhq.com/courses/products?locationId=<LOCATIONID>"
  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/courses/products?locationId=<LOCATIONID>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/courses/products?locationId=<LOCATIONID>' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
```
