HighLevel: Import Courses
HighLevel courses.importCourses: arguments, response, policy and SDK examples.
← Courses operations · Get started
Operation gohighlevel.import_courses
Provider route: POST /courses/courses-exporter/public/import. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/gohighlevel with npm, or alter-sdk-gohighlevel with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { HighLevelIntegration } from "@alter-ai/gohighlevel";
async function execute(input: Parameters<HighLevelIntegration["courses"]["importCourses"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new HighLevelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.courses.importCourses(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_gohighlevel import HighLevelIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = HighLevelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.courses.import_courses(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | Model | Required within parent | Expand Import Courses — request body — body |
Referenced models: Import Courses — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root |
Schemas
Section titled “Schemas”Import Courses — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
locationId | string | Required within parent | |
products | array | Required within parent | |
products[] | Model | Each item | Expand Import Courses — request body — body products item |
userId | string | Optional |
Referenced models: Import Courses — request body — body products item
Import Courses — request body — body products item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
categories | array | Required within parent | |
categories[] | Model | Each item | Expand Import Courses — request body — body products item categories item |
description | string | Required within parent | |
imageUrl | string | Optional | |
instructorDetails | Model | Optional | Expand Import Courses — request body — body products item instructor Details |
title | string | Required within parent |
Referenced models: Import Courses — request body — body products item categories item, Import Courses — request body — body products item instructor Details
Import Courses — request body — body products item categories item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
posts | array | Optional | |
posts[] | Model | Each item | Expand Import Courses — request body — body products item categories item posts item |
subCategories | array | Optional | |
subCategories[] | Model | Each item | Expand Import Courses — request body — body products item categories item sub Categories item |
thumbnailUrl | string | Optional | |
title | string | Required within parent | |
visibility | string | Required within parent | One of: published, draft |
Referenced models: Import Courses — request body — body products item categories item posts item, Import Courses — request body — body products item categories item sub Categories item
Import Courses — request body — body products item instructor Details
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
description | string | Required within parent | |
name | string | Required within parent |
Import Courses — request body — body products item categories item posts item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
bucketVideoUrl | string | Optional | |
contentType | string | Required within parent | One of: video, assignment, quiz |
description | string | Required within parent | |
postMaterials | array | Optional | |
postMaterials[] | Model | Each item | Expand Import Courses — request body — body products item categories item posts item post Materials item |
thumbnailUrl | string | Optional | |
title | string | Required within parent | |
visibility | string | Required within parent | One of: published, draft |
Referenced models: Import Courses — request body — body products item categories item posts item post Materials item
Import Courses — request body — body products item categories item sub Categories item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
posts | array | Optional | |
posts[] | Model | Each item | Expand Import Courses — request body — body products item categories item posts item |
thumbnailUrl | string | Optional | |
title | string | Required within parent | |
visibility | string | Required within parent | One of: published, draft |
Referenced models: Import Courses — request body — body products item categories item posts item
Import Courses — request body — body products item categories item posts item post Materials item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
title | string | Required within parent | |
type | string | Required within parent | One of: pdf, image, docx, pptx, xlsx, html, dotx, epub, webp, gdoc, mp3, doc, txt, zip, ppt, key, htm, xls, odp, odt, rtf, m4a, ods, mp4, ai, avi, mov, wmv, mkv, wav, flac, ogg, png, jpeg, jpg, gif, bmp, tiff, svg, odg, sxw, sxc, sxi, rar, 7z, json, xml, csv, md, obj, stl, woff, ttf |
url | string | Required within parent |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: gohighlevel.import_courses. Catalog operation: import-courses. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["courses.write"]
Pinned headers: {"Version": "v3"}