/uxie-ghl-factory:ghl-membershipsfrom uxie-ghl-factory
Builds and operates GoHighLevel Memberships via the internal API: courses, chapters with drip/gating, lessons, quizzes, assignments, offers, themes, credentials, enrollment, progress, and submissions.
Ships in uxie-ghl-factory. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
MCP routing: If the
uxie-ghl-internal-mcpserver is registered in this session, prefer itsbuild_course/list_coursestools over running this skill's scripts directly — the tools wrap this same engine behind confirmation gates and post-build verification. Fall back to this skill's own scripts when the server is not registered.
Writes to a GHL account via the undocumented internal Memberships API.
${CLAUDE_PLUGIN_ROOT}/docs/write-rails.md.${CLAUDE_PLUGIN_ROOT}/docs/auth-jwt-capture.md — §8 is the Memberships section.
The admin rail is §1 plus a sourceid header; the member rail is a different token class.
Memberships auth is looser than the workflow builder — no iframe origin, no origin/referer.
Do not port the workflow CORS handling here.GHL_TOKEN='<LC JWT>' GHL_LOC='<locationId>' \
node ${CLAUDE_PLUGIN_ROOT}/skills/ghl-memberships/scripts/build-course.mjs <spec.json> [--dry-run]
--dry-run validates the spec without touching the account — always run it first.
Spec format + a worked example: references/example-spec.json and references/course-spec.md.
One command produces: course → chapters (order, drip, nesting, gating) → lessons (rich HTML body,
video/audio upload, PDF attachments, external embeds) → quizzes with questions → assignments →
free offer (draft; published only when the spec says publish: true) → branded theme → credential template attached to auto-issue on completion
→ optional enrollment. Then it verifies every item by read-back and prints a teardown command.
Remove: node scripts/build-course.mjs --delete <productId>
⚠️ Offers and credential templates do NOT cascade — delete those separately.
GHL_TOKEN='<LC JWT>' GHL_LOCATION='<locationId>' node ${CLAUDE_PLUGIN_ROOT}/skills/ghl-memberships/scripts/conformance.mjs
Runs the real admin lifecycle live and asserts on effects, not status codes (grant → member appears → revoke → member gone), re-checks the documented traps, and tears down. 21 passed / 0 failed / 4 skipped. This is an undocumented API that drifts — run this before trusting the reference on any account you haven't touched recently. The 4 skips are member-session writes that cannot run unattended (see Limits).
The public Courses API (2026-09-24) returned the same courses as the internal rail on the sandbox (2026-10-29).
generated from the rail ledger (mcp-internal/catalog/rail-ledger.json) — do not edit; the whole ledger is ghl-orientation/references/rail-ledger.md.
| Job | Decision | Routed today | Internal | Public |
|---|---|---|---|---|
| read | pool-internal | internal | list_courses | courses-v3__list-courses, courses-v3__get-course, courses-v3__list-categories, courses-v3__list-lessons, courses-v3__get-lesson, courses-v3__list-offers |
| create | undecided | internal | build_course | courses-v3__create-course, courses-v3__create-category, courses-v3__create-lesson, courses-v3__create-offer |
| edit | undecided | public | raw_request:PUT /membership/locations/{locationId}/products/{id}, raw_request:PUT /membership/locations/{locationId}/categories/{id}, raw_request:PUT /membership/locations/{locationId}/posts/{postId} | courses-v3__update-course, courses-v3__update-category, courses-v3__update-lesson, courses-v3__sequence-categories, courses-v3__sequence-lessons, courses-v3__update-offer |
| delete | undecided | public | raw_request:DELETE /membership/locations/{locationId}/products/{id}, raw_request:DELETE /membership/locations/{locationId}/categories/{id}, raw_request:DELETE /membership/locations/{locationId}/posts/{postId} | courses-v3__delete-course, courses-v3__delete-category, courses-v3__delete-lesson, courses-v3__delete-offer |
| enrol | undecided | internal | raw_request:POST /membership/smart-list/attach-offer-user | courses-v3__create-enrollment, courses-v3__delete-enrollment |
| bulk | undecided | internal | raw_request:POST /membership/locations/{locationId}/assessments/quiz/questions | courses-v3__get-quiz-questions, courses-v3__upsert-quiz-questions |
| logs | undecided | internal | raw_request:GET /membership/locations/{locationId}/products/user-progress/{productId} | courses-v3__list-bulk-progress, courses-v3__list-enrollments, courses-v3__review-assessment |
Internal only: media, DRM, themes; clone; certificates; analytics. Public only: synchronous enrolment that says alreadyEnrolled; progress and review; import.
Product (course) → Category (chapter, self-nesting) → Post (lesson)
Offer = access gate Theme = per-product design tokens
Credential template + attachment = certificate/badge, auto-issued on completion
A post carries rich-HTML description (the body) + ONE primary media + N post_materials.
| Module | Use for |
|---|---|
engine/api.mjs | products, categories, posts, video/audio upload, PDF materials, offers, theme, setEmbed, parseIframe |
engine/members.mjs | invite, magicLink, grantOffer/revokeOffer, publishOffer, productProgress, allMembers, waitForEnrollment |
engine/assessments.mjs | quiz + addQuestions, assignments, listSubmissions, grade |
engine/credentials.mjs | template CRUD, issue, listIssued, attach (auto-issue on completion) |
engine/communities.mjs | admin group CRUD + CommunitiesMember (portal rail: join, createPost) |
contentType is a CLOSED MySQL ENUM: video | audio | quiz | assignment — or OMIT it.
GHL has no text lesson type. A text lesson is a video-typed post with the text in its description: send
contentType: 'video' explicitly and put the text in description. Do not read a video read-back on a text
lesson as a bug. text/embed/html/pdf/file/link all return
500 Data truncated for column 'content_type'. There is no embed or PDF lesson type.POST /posts SILENTLY DROPS embedJson. It returns 200 and the embed is simply
absent on read-back. Create the post, then PUT it (api.setEmbed()). The server mints
metaData.embedMediaId itself — you never create that id, which is why no "embed media"
endpoint exists.quizId !== postId. POST /assessments/quiz creates it; re-read via
getQuizByPost(postId) to get the quiz's own id, which is what the questions endpoint wants.credentials.attach() → certificate-attachments, eventType: product_complete).GET /categories?posts=true omits
post_materials and asset_urls. Verify lessons with GET /posts/{id} or you get false negatives.products/apply-theme — saving alone does nothing.user-purchase/no-of-users lies about enrollment — it counts purchases, returns 0 for an
admin-attached member. Verify with products/user-progress.
7b. The grant's own 200 lies too, and it is the worse of the two.
POST /membership/smart-list/attach-offer-user answers
200 {ok:true, msg:"…successfully queued"} for an empty body, for fabricated ids, and for
the wrong key names — proven on the test sub-account, with a nonexistent sibling path answering
404 as the control. Two operators have been told a grant was queued and granted nothing. The
body is {contactId, offerId, source:'admin'} — singular contactId, no locationId (that
rides on the sourceid header). Then read back: members.waitForEnrollment(productId, {expectContactIds}), which looks for those contacts. A non-empty check is not a check —
it passes on a member who was already there.path that signed-url/upload returns without.
Client supplies durationInSeconds (ffprobe).fd-tour-overlay, Pendo #pendo-base) swallowing the click, or a
too-narrow network filter — GHL splits one feature's read and write across membership/,
courses/, services/ and clientportal-middleware/. Re-check with a host-level filter
before concluding a flow is client-side.createGroup sends marketplaceLocationId (the UI's Discovery switch ON) unless discovery: false (2026-10
switch, default ON as in the UI; OFF omits the key — that the group then stays off the marketplace is the switch's
stated purpose, not separately observed). Ask the operator which they want for a private client community.settings.moderationSettings.blockedKeywords
and the admin group PUT writes them (the portal read then shows them, proven 2026-10-30). Read the row and send
settings back whole with your change. Owner and admin posts are never held, so testing a keyword as the
owner proves nothing; the held queue and member reports are portal-only (403).newsletter push OFF (no push control on that row) — do not copy the UI's body.assessments.grade(),
learner submission, user-post-completion. All member-session-bound; each was driven live through
the real portal and verified by read-back, but a field the UI sends and we failed to record would
only surface on first use. grade() is marked in-source.400 Integrations not found. The enum is onetime (or subscription); one_time and recurring return 500. Checkout is unproven. Only free is proven end to end.status: active, but no member has completed a course to watch it issue.altType: "category") is implied by the response shape,
not verified — attach() only exposes product level.Course editing is public-only (Xander, D3, 2026-11-06). Use execute_action on the ghl-multi server with these action ids. Every
write takes dry_run: true first; read the preview; then send the same call with confirm: true where the server asks.
After every write, read the course back with the internal get_course (one read: title, offers, normalised tree) and compare.
| Job | Action | Notes |
|---|---|---|
| change a lesson | courses-v3__update-lesson {productId, lessonId, …fields} | partial body: only the fields you send change (measured 2026-11-06) |
| change a chapter | courses-v3__update-category {productId, categoryId, …fields} | partial body (measured) |
| change the course | courses-v3__update-course {productId, …fields} | partial body (measured) |
| reorder chapters | courses-v3__sequence-categories {productId, ids} | ids lists every chapter in order (measured) |
| reorder lessons in a chapter | courses-v3__sequence-lessons {productId, categoryId, ids} | ids lists every lesson of that chapter in order (measured) |
| move a lesson to another chapter | courses-v3__update-lesson with categoryId, then sequence-lessons on the new chapter | two calls, see trap 3 |
| remove a lesson | courses-v3__delete-lesson {productId, lessonId} | 204; the lesson then 404s (measured) |
| remove a chapter | courses-v3__delete-category {productId, categoryId} | cascades: its lessons go with it (trap 2) |
| remove a course | courses-v3__delete-course {productId} | 204 (measured on a probe product) |
| add a lesson or chapter | courses-v3__create-lesson / courses-v3__create-category | create as visibility: "draft" unless the user has asked to publish |
Traps (the first three are measured on the sandbox; the rest are from the same runs):
ids. What the server
does with unnamed lessons is unknown, so do not rely on them keeping their place.delete-category, list the chapter's lessons (get_course) and say so to
the user. The internal route also cascades (measured), so this is not a rail difference.update-lesson with categoryId moves the
lesson but does not renumber it (measured). Follow it with sequence-lessons on the new chapter, naming every lesson in order,
or the moved lesson can collide with an existing number.courses-v3__delete-offer returns 204, but a later get-offer returns 200
with an empty body. Verify an offer removal with get_course (the offers list), not with get-offer (bl-801).courses-v3__upsert-quiz-questions to edit questions. It replaces the whole question set (measured: two
questions gone when one was sent) and the option text is not read back. To add questions, use edit_quiz_questions (below).visibility: "published" or any *-publish); any paid offer; any enrolment or grant that e-mails a member (G4). A dry run of these is fine.set_course_access {locationId, contactId, offerId, action: grant|revoke, confirm}. Preview first (no account call; sends says
whether a grant e-mails the member: unknown for a grant, not yet measured; false for a revoke). Confirmed, it reads the course membership, sends
the change, reads it again, and reports granted, already-had, revoked, already-absent or queued-unconfirmed. Trust the outcome, never the 200.courses-v3__create-enrollment (201 new, 200 alreadyEnrolled), courses-v3__delete-enrollment (revoke), courses-v3__list-enrollments (read back)./membership/offers/{id}
returns the draft, with the location and feature flags, bl-321).sends before confirming.get_course_progress {locationId, courseId, email?} walks every page and returns each student's course percent (completedPercentage),
the user's e-mail and lastLogin, plus a per-course summary. complete: false (with failure) means the walk did not finish: do not read a
partial list as the whole course. The internal route gives no lesson counts, so completedLessons is null there.lastActivity on that tool is the last login, not the last lesson. Do not read it as lesson activity.courses-v3__list-bulk-progress {contactId, productIds} returns totalLessons and completedLessons for a student, and
courses-v3__list-category-progress and courses-v3__list-completions give per-chapter progress and completions.totalLessons: 0 for a student on a course with 6 lessons. The likely cause is that
the lessons were draft (a count of published lessons only). This is untested: it needs a published lesson, which is a gated publish. Until it is settled,
do not trust a 0/0 lesson count without checking the lessons' visibility first.edit_quiz_questions {locationId, quizId, add: [{title, questionType, explanation?, options: [{statement, isCorrect}]}], confirm?}.
quizId is the quiz id (the one GET …/assessments/quiz/{postId} returns), not the lesson id. Preview first (no write). A single-choice question
needs exactly one correct option; duplicate question text in one batch is refused before anything is sent.edit_quiz_questions re-posts every stored question in full, then the additions, and it is refused
before any POST when a stored question's option text cannot be read. It reads the quiz again on a separate request and reports added only when that
read matches the expected set by content (question ids change on every save, so they are not compared, and a question id kept from before an edit is stale); otherwise unverified, with the full before list. A failed batch POST is read back the same way (the route replaces, so a failed POST may still have changed the set): the result carries postFailed with the HTTP status, and the after read.
Its replace argument is refused. Do not reach for upsert-quiz-questions (trap 6).courses-v3__list-assessments {productId, status?, pageSize?, pageNumber?}, courses-v3__get-assessment {productId, assessmentId}, and courses-v3__review-assessment (PUT) with body {status: passed | failed | processing, score?, feedback?}. A grade is visible to
the learner. Only a submitted attempt can be graded, so the grading route needs a learner who has submitted in the portal.Assessments.grade() is observed only (transcribed from the admin UI) and needs a member session. Do not present it as a tool.70-research/2026-11-06-communities-paid-channels-and-know-about.md.These operations have no typed tool. Each one was proven on the sandbox (the write, then a read on a separate request, then a restore), so the
route and body shape below are evidence, not a guess. Send them with raw_request {locationId, method, path, body, confirm: true}. Preview first
where the tool offers it, and never send a body whose keys you have not read first: several of these writes replace the whole object.
PUT /membership/locations/{locationId}/products/{productId} with the FULL product
object (read it with GET on the same path first). The custom fields are customCss, customJs, customHeader, customFooter. Proven: set to a TEST
value, read back on a separate GET, restored to null. Clearing a field back to null works; an empty string is not the same and is not used.PUT /membership/locations/{locationId}/products/customizations/{customizationId}, with
the customization record read first (GET /membership/locations/{locationId}/products/{productId}, the customizations block). Proven: name, title and
bio set and read back, the heading read back unchanged, then restored.PUT /clientclub/portal-settings/{locationId} with the
full document. The keys the GET carries must equal the read value, except the one test field. Keys the GET does not carry are sent only as the form's
own defaults. Proven for portalBannerText and for app permissions: set, read back on a separate GET, restored. Once a portal name is set the UI
cannot clear it (an empty name is refused before any request), so a name is a one-way write on a sandbox.POST /clientclub/{locationId}/users/invite with {locationId, email: [address]}; returns 201 with {success: true}. Proven: the portal settings read (invitedUsers) went from absent to a count of 1 on two separate reads after the invite. The invite e-mails the address: send it only with an approval that names the address, and read the user back afterwards.DELETE /membership/locations/{locationId}/products/{id}. It deletes the course. Deleting a product does not delete its offers, so clean up the offers separately. Proven: the course is gone from the list on a separate read after the delete. Delete only a TEST-CONF course you created for the test.DELETE /membership/locations/{locationId}/offers/{id} returns 200 {ok:1}, but the offer stays on the product record on a separate read (the course Offers list shows nothing). Do not rely on it to delete an offer: the delete is accepted but not applied, the same finding as the public delete-offer route.PUT /membership/locations/{locationId}/comments/{commentId} edits a comment; DELETE /membership/locations/{locationId}/comments/{commentId} removes it. Read the comment first with GET on the same path and send the full object on the PUT. Proven: set and read back on a separate GET, then restored.POST /assets-drm/assets/signed-url/upload with {source:"courses", entityId:"{locationId}", type:"videos", mimeType:"video/mp4"}, then PUT the raw bytes to the signed URL, then POST /assets-drm/assets for the assetsLicenseId). Then POST /membership/locations/{locationId}/videos with {url, title, postId:"{lessonId}", assetsLicenseId, id}. Note: the path returned by the upload needs a leading slash before the assets call.PUT /courses/locations/{locationId}/product-themes/{productId}/theme/{themeId} saves the full themeData tree. Without the next step the course keeps its old theme: PUT /membership/locations/{locationId}/products/apply-theme/{productId}?template_id=NeoClassic (empty body) applies it. Proven: the UI save and the apply both returned 200; a replay of the theme save (weight bold, read back on a separate GET, then restored) was read back; the product customization was unchanged after the apply.POST /communities/{locationId}/groups with {name, slug, description, locationId, marketplaceLocationId, branding:{}} returns 201. Creating a group does not list it on the Gokollab marketplace: the listing is a separate outward step and is not done here.POST /clientclub/notification-preferences/{locationId} with {category, notifications:{EXPIRE_CERTIFICATE:{config:{email, sms}, email_template}}, locationId}; returns 201. The page has no save button: unchecking sends the POST. Read the current value first on the page (the GET behind the page is not in the catalogue, so this row does not name it). Proven: the page read (200), the change (201), and the restore (201, same route, email set back to 1).PUT /courses/locations/{locationId}/assessments/{submissionId}/review with {score, status:"passed"|"failed", feedback}; returns 200 with {error:false, updated:true}. Note the /courses path, not /membership. Proven: the grade save returned 200, and an admin read of the same submission on a separate request showed it.PUT /membership/locations/{locationId}/settings/site-info/{siteInfoId} carries the title. Proven: the title was set to a TEST value and read back on a separate GET, then restored to empty and read back. The same restore save also sent PUT /membership/locations/{locationId}/settings/domain/{id} and PUT .../settings/builder-settings/{id} with their values unchanged (200 each); those two routes are not proven as writes.POST /membership/locations/{locationId}/products/clone/{productId} with {locations: [locationId]} returns the new productIds. Proven: the clone was read back on a separate GET (its title carried the "- Clone" suffix). The clone is a new course, so it stays as residue on a sandbox; delete it only by its own id.
Not covered here: the course analytics dashboards (their data comes from read-only summary queries that the catalogue does not carry yet), the course
analytics progress view (no proven write), and learner-side rendering. Those stay as the corpus describes them.Proven on the sandbox with a read on a separate request after each write. The template is the credential's design; a credential is issued from it.
GET /certificates/locations/{locationId}/templates → {templates: [{_id, title, ...}]}.POST /certificates/locations/{locationId}/templates with {title, ...}, confirm: true. Returns 201. Read it back on a separate
list GET (_id and title). Create only with an explicit approval naming the type. A created template stays as residue unless it is deleted with the route below.PATCH /certificates/locations/{locationId}/templates/{templateId} with {locationId, title, ...}; send the body keys you change.
Proven: the title change read back on a separate list GET. Rules measured on the sandbox: the endpoint refuses an empty title (send the unchanged
title with every PATCH); the merge keeps keys you omit; the designer's templateJson cannot be cleared back to an empty string through this route
(a restore to "" is stored as the two-character string "", not the empty value). Read the template first and send the exact before value for any
key you restore.DELETE /certificates/locations/{locationId}/templates/{templateId}, with confirm. It returns 200 with
type: TEMPLATE_DELETED. Read back on a separate list GET: the id is gone. Delete only a template you created for the test, by its own id.references/course-spec.md — spec format.
Semantics and capture evidence: the corpus surface knowledge/corpus/memberships-courses/, the
source of truth for anything this file summarises. The endpoint index is search_endpoints
on the internal MCP: every /membership/*, /courses/*, /certificates/* and /clientclub/*
route, mined from the memberships front-end's own source — most never exercised here.
describe_endpoint gives the exact raw_request, and raw_request sends the sourceid this
surface's front-end pins. The engine modules above remain the way to WRITE: a catalogued route is
a path, not a proven write.
engine/api.mjs (opens in a new tab)engine/api.test.mjs (opens in a new tab)engine/assessments.mjs (opens in a new tab)engine/assessments.test.mjs (opens in a new tab)engine/auth.mjs (opens in a new tab)engine/communities.mjs (opens in a new tab)engine/communities.test.mjs (opens in a new tab)engine/course-builder.mjs (opens in a new tab)engine/course-builder.test.mjs (opens in a new tab)engine/credentials.mjs (opens in a new tab)engine/members.mjs (opens in a new tab)engine/members.test.mjs (opens in a new tab)references/course-spec.md (opens in a new tab)references/example-spec.json (opens in a new tab)scripts/build-course.mjs (opens in a new tab)scripts/build-course.test.mjs (opens in a new tab)scripts/cli-gateway.mjs (opens in a new tab)scripts/cli-gateway.test.mjs (opens in a new tab)scripts/conformance-flags.mjs (opens in a new tab)scripts/conformance-flags.test.mjs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
22 skills in this plugin
/create-ghl-workflowUse when programmatically creating, building, or publishing a GoHighLevel / HighLevel workflow, or adding triggers/actions/steps to one, via the internal builder API — e.g. "create a GHL workflow", "add a webhook/email step via API", "build a HighLevel automation programmatically", or when a workflow step created via API saves but won't open in the builder. Write counterpart to get-ghl-workflow-json (read-only). Draft-first; publish when the approved plan says the workflow goes live (no separate yes)./get-ghl-workflow-jsonCapture, export, and validate GoHighLevel / HighLevel workflow JSON from the workflow builder's read-only internal endpoints. Use when the user asks to get, download, export, inspect, archive, harvest, or troubleshoot raw workflow JSON/config; workflow trigger JSON; sticky notes; step counts; workflow settings; trigger/action catalogs; or when they provide an app.gohighlevel.com location/workflow URL and want the underlying JSON. Uses browser JWT interception, human-paced throttling, and read-only GET requests only./get-ghl-workflow-logsRead the RUNTIME of a GoHighLevel / HighLevel workflow — its execution logs, enrollment history, and per-step contact counts — from the builder's read-only internal endpoints. Use whenever the user wants to know what a workflow actually DID at runtime rather than how it's configured — for example "why are contacts stuck", "did this workflow actually send the email/SMS", "show me the execution logs", "run history", "enrollment history", "which step is everyone sitting at", "why did this step fail / get skipped", "is this branch dead", "how many contacts went down this path", "who exited early and why", or when they give an app.gohighlevel.com workflow URL and ask what happened to the contacts in it. This is the runtime sibling of get-ghl-workflow-json (which exports the static config). Uses browser JWT interception, human-paced throttling, and read-only GET requests only — never mutates enrollments.npx claudepluginhub uxieee/uxie-ghl-factory --plugin uxie-ghl-factoryOther plugins' skills for the same job