# GHL Courses API **Endpoints:** 1 **Base URL:** `https://rest.gohighlevel.com/v1` **Version Header(s):** `2021-07-28` --- ## Endpoints - [POST /courses/courses-exporter/public/import](#post--courses-courses-exporter-public-import) — Import Courses --- ## POST /courses/courses-exporter/public/import **Summary:** Import Courses Import Courses through public channels **Version Header:** `2021-07-28` **Operation ID:** `import-courses` ### cURL ```bash curl -X POST 'https://rest.gohighlevel.com/v1/courses/courses-exporter/public/import' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Version: 2021-07-28' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: YourApp/1.0' \ -d '{}' # See request body schema below ``` ### Python (http.client) ```python import http.client import json conn = http.client.HTTPSConnection('rest.gohighlevel.com') headers = { 'Authorization': 'Bearer YOUR_API_TOKEN', 'Version': '2021-07-28', 'Content-Type': 'application/json', 'Accept': 'application/json', 'User-Agent': 'YourApp/1.0', } payload = json.dumps({}) conn.request('POST', '/v1/courses/courses-exporter/public/import', body=payload, headers=headers) response = conn.getresponse() data = json.loads(response.read().decode()) print(json.dumps(data, indent=2)) conn.close() ``` ### n8n HTTP Node ```json { "name": "GHL - POST import", "type": "n8n-nodes-base.httpRequest", "parameters": { "method": "POST", "url": "https://rest.gohighlevel.com/v1/courses/courses-exporter/public/import", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "sendHeaders": true, "headerParameters": { "parameters": [ { "name": "Authorization", "value": "Bearer YOUR_API_TOKEN" }, { "name": "Version", "value": "2021-07-28" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Accept", "value": "application/json" }, { "name": "User-Agent", "value": "YourApp/1.0" } ] }, "sendBody": true, "bodyParameters": { "parameters": [] }, "options": {} } } ``` **To use in n8n:** 1. Add an HTTP Request node 2. Switch to JSON mode (Parameters → use RAW JSON) 3. Paste the JSON above 4. Update `YOUR_API_TOKEN` with your actual GHL API key ### Request Body Schema - **locationId** (string) (required) - **userId** (string) - **products** (array of ProductInterface) (required) ### Response Codes | Code | Description | Schema | |------|-------------|--------| | `201` | | — | ### ⚠️ Special Notes & Quirks > ⚠️ **User-Agent Required:** All GHL API requests require a `User-Agent` HTTP header. Requests without it may be rejected with a 403 error. --- *Documentation generated from GHL OpenAPI specifications. Verify against official docs for latest changes.*