User & Auth Endpoints
Authenticate learners and read the current session user.
BadgeLeaderboard1 ptFetch badge leaderboard
Returns the badge leaderboard for the learning instance, showing the top-ranked learners by badge count along with the award type used for ranking. This is useful for displaying competitive gamification widgets. It also returns the current user's own position on the leaderboard, even if they are not in the top results. The user context and leaderboard personalization can be set via an `authToken` header.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| limit | Int | No | The maximum number of leaders to return in the leaderboard. If omitted, the server's default limit applies. |
Returns
| Field | Type | Description |
|---|---|---|
| awardType | AwardType | The award type used as the basis for ranking learners on this leaderboard. |
| leaders | [BadgeLeader] | An ordered list of top-ranked learners, each with their rank, badge total, and user profile information. |
| currentUserPosition | BadgeLeader | The current user's rank and badge total on the leaderboard, returned regardless of whether they appear in the top leaders list. |
Example
query BadgeLeaderboard {
BadgeLeaderboard(limit: 10) {
awardType {
id
label
pluralLabel
includeOnDashboard
icon
}
leaders {
rank
total
user {
id
firstName
lastName
email
name
}
}
currentUserPosition {
rank
total
user {
id
firstName
lastName
email
}
}
}
}Example Response
{
"data": {
"BadgeLeaderboard": {
"awardType": {
"id": "award-type-001",
"label": "Course Completion",
"pluralLabel": "Course Completions",
"includeOnDashboard": true,
"icon": "star"
},
"leaders": [
{
"rank": 1,
"total": 42,
"user": {
"id": "user-456",
"firstName": "Alice",
"lastName": "Smith",
"email": "[email protected]",
"name": "Alice Smith"
}
},
{
"rank": 2,
"total": 35,
"user": {
"id": "user-789",
"firstName": "Bob",
"lastName": "Jones",
"email": "[email protected]",
"name": "Bob Jones"
}
}
],
"currentUserPosition": {
"rank": 14,
"total": 18,
"user": {
"id": "user-123",
"firstName": "Jane",
"lastName": "Doe",
"email": "[email protected]"
}
}
}
},
"awardType": null,
"leaders": null,
"currentUserPosition": null
}CompanyDetails1 ptFetch company details
Returns high-level information about a Thought Industries learning instance, including the company name, subdomain, and appearance settings such as logo, brand colors, fonts, favicon, custom CSS, and global navigation links. Optionally accepts a user ID to scope the response to a specific user's context. Use this query to bootstrap a branded UI or retrieve instance-level configuration.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| user | ID | No | Optional ID of a user to scope the company details response to that user's context. |
Returns
| Field | Type | Description |
|---|---|---|
| name | String | The display name of the company or learning instance. |
| subdomain | String | The subdomain identifier for the learning instance. |
| settings | AppearanceSettings | Appearance and branding configuration including logo, colors, fonts, favicon, custom CSS, and navigation links. |
Example
query CompanyDetails {
CompanyDetails(user: "user_abc123") {
name
subdomain
settings {
id
logoAsset
accentColor
secondaryColor
linkColor
font
altFont
favicon
backgroundAsset
backgroundAssetTiled
retinaLogo
customCss
globalNavigationLinks {
label
href
}
}
}
}Example Response
{
"data": {
"CompanyDetails": {
"name": "Acme Learning Co.",
"subdomain": "acme",
"settings": {
"id": "settings_001",
"logoAsset": "https://cdn.acme.com/logo.png",
"accentColor": "#FF5733",
"secondaryColor": "#3498DB",
"linkColor": "#2980B9",
"font": "Inter",
"altFont": "Merriweather",
"favicon": "https://cdn.acme.com/favicon.ico",
"backgroundAsset": "https://cdn.acme.com/bg.jpg",
"backgroundAssetTiled": false,
"retinaLogo": true,
"customCss": ".header { font-weight: bold; }",
"globalNavigationLinks": [
{
"label": "Home",
"href": "/"
},
{
"label": "Catalog",
"href": "/catalog"
}
]
}
}
},
"name": "example",
"subdomain": "example",
"settings": null
}CompanyTranslations1 ptFetch company translations by namespace
Returns all configured translation strings for the learning instance, grouped by language, within a specified namespace. Use `lms` as the namespace to retrieve platform UI translations, or `emails` to retrieve email template translations. Each entry in the result includes the language code and a JSON object of key-value translation pairs. This is useful for building multilingual interfaces or auditing the translation configuration of your instance.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| namespace | TranslationNamespace! | Yes | The namespace is used to specify the content category for the translations. Accepts values of `lms` for platform content and `emails` for email content. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | A unique identifier for the translation set entry. |
| lang | String! | The BCP 47 language code for this set of translations (e.g., `en`, `fr`, `de`). |
| translations | JSON! | A JSON object containing translation key-value pairs for the specified namespace and language. |
Example
query CompanyTranslations {
CompanyTranslations(namespace: lms) {
id
lang
translations
}
}Example Response
{
"data": {
"CompanyTranslations": [
{
"id": "trans_en_lms_001",
"lang": "en",
"translations": {
"welcome_message": "Welcome to the Learning Portal",
"start_course": "Start Course",
"my_courses": "My Courses"
}
},
{
"id": "trans_fr_lms_001",
"lang": "fr",
"translations": {
"welcome_message": "Bienvenue sur le portail d'apprentissage",
"start_course": "Commencer le cours",
"my_courses": "Mes cours"
}
}
]
},
"id": "abc-123",
"lang": "example",
"translations": {}
}CurrentUser1 ptFetch the currently authenticated user
Returns the full User object for the currently authenticated user, including profile details (name, email, bio), purchased courses and bundles, allocated licenses, learning path allocations, waitlisted courses, attended meetings, client associations, custom reference fields, and aggregate statistics such as certificate and completed course counts. Returns null if no user is authenticated. This is the primary query for bootstrapping a learner or admin session. The user context can be overridden by passing an `authToken` header.
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | Unique identifier of the user. |
| String | User's email address. | |
| firstName | String | User's first name. |
| lastName | String | User's last name. |
| name | String | User's full display name. |
| roleKey | String | The user's role within the platform. |
| purchasedCourses | [PurchasedCourse!] | Courses the user has purchased, including status and certificate information. |
| purchasedBundles | [PurchasedBundle!] | Bundles the user has purchased. |
| activeLicense | License | The user's currently active license. |
| allocatedLicenses | [AllocatedLicense!] | Licenses that have been allocated to this user. |
| allocatedLearningPaths | [AllocatedLearningPath!] | Learning paths allocated to this user. |
| attendedMeetings | [UserAttendedMeeting!] | Meetings the user has attended. |
| waitlistedCourses | [WaitlistedCourse!] | Courses the user is currently waitlisted for. |
| adminClients | [Client] | Clients for which this user has admin access. |
| client | Client | The primary client/organization this user belongs to. |
| disabled | Boolean! | Whether the user account is disabled. |
| mustVerifyEmail | Boolean! | Whether the user must verify their email before proceeding. |
| certificatesCount | Int! | Total number of certificates earned by the user. |
| completedCoursesCount | Int! | Number of courses the user has completed. |
| startedCoursesCount | Int! | Number of courses the user has started. |
| availableCoursesCount | Int! | Number of courses currently available to the user. |
| balance | Float | The user's current credit balance. |
| customFields | JSON | Arbitrary custom field data attached to the user. |
| recommendedTags | [UserRecommendedTag!] | Tags recommended for this user, with boost weights for personalization. |
| recommendedSlugs | [UserRecommendedSlug!] | Content slugs recommended for this user, with boost weights. |
Example
query CurrentUser {
CurrentUser {
id
email
firstName
lastName
name
roleKey
lang
preferredCurrency
disabled
mustVerifyEmail
certificatesCount
completedCoursesCount
startedCoursesCount
availableCoursesCount
balance
purchasedCourses {
courseId
status
certificateIssuedAt
}
activeLicense {
id
name
}
client {
id
name
}
}
}Example Response
{
"data": {
"CurrentUser": {
"id": "usr_abc123",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Doe",
"name": "Jane Doe",
"roleKey": "learner",
"lang": "en",
"preferredCurrency": "USD",
"disabled": false,
"mustVerifyEmail": false,
"certificatesCount": 4,
"completedCoursesCount": 8,
"startedCoursesCount": 11,
"availableCoursesCount": 15,
"balance": 50,
"purchasedCourses": [
{
"courseId": "crs_xyz789",
"status": "active",
"certificateIssuedAt": "2024-02-20T00:00:00.000Z"
}
],
"activeLicense": {
"id": "lic_001",
"name": "Enterprise License"
},
"client": {
"id": "cli_001",
"name": "Acme Corp"
}
}
},
"id": "abc-123",
"email": "example",
"firstName": "example",
"abbreviatedName": "example",
"asset": "example",
"lastName": "example",
"name": "example",
"lastActiveAt": "2026-01-01T00:00:00Z",
"bio": "example",
"twoFactorEnabled": false,
"firstInitial": "example",
"lastInitial": "example",
"invitedByName": "example",
"shouldHighlight": false,
"purchasedCourses": null,
"purchasedBundles": null,
"activeLicense": null,
"allocatedLicenses": null,
"allocatedLearningPaths": null,
"attendedMeetings": null,
"waitlistedCourses": null,
"adminClients": null,
"roleKey": "example",
"address1": "example",
"address2": "example",
"city": "example",
"state": "example",
"zipCode": "example",
"country": "example",
"telephone": "example",
"stripeCustomerId": "abc-123",
"externalCustomerId": "abc-123",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"sfAccountId": "abc-123",
"sfContactId": "abc-123",
"shippingName": "example",
"client": null,
"clientId": "abc-123",
"ref1": "example",
"ref2": "example",
"ref3": "example",
"ref4": "example",
"ref5": "example",
"ref6": "example",
"ref7": "example",
"ref8": "example",
"ref9": "example",
"ref10": "example",
"lang": "example",
"preferredCurrency": "example",
"customFields": {},
"recommendedTags": null,
"recommendedSlugs": null,
"accessedFlows": [
"example"
],
"disabled": false,
"learnerUserId": "abc-123",
"managerUserId": "abc-123",
"balance": 0,
"mustVerifyEmail": false,
"certificatesCount": 0,
"collaborationsCount": 0,
"availableCoursesCount": 0,
"startedCoursesCount": 0,
"completedCoursesCount": 0
}Returns null when no authenticated user session exists. This is a high-cost query due to the depth of nested objects available — request only the fields you need.
Languages1 ptFetch supported languages
Returns the list of languages enabled on the learning instance. Each language entry includes a display label, a language code, an optional selector label (used in language-picker UI elements), and a flag indicating whether the language is a custom addition. Use this query to populate language selectors, validate supported locales, or understand the multilingual configuration of your instance.
Returns
| Field | Type | Description |
|---|---|---|
| id | ID | A unique identifier for the language record. |
| label | String! | The human-readable display name of the language (e.g., "English", "French"). |
| code | String! | The BCP 47 language code for the language (e.g., `en`, `fr`). |
| selectorLabel | String | An optional label used in language-picker UI components, which may differ from the standard label. |
| isCustom | Boolean | Indicates whether this language was added as a custom language rather than being a built-in supported language. |
Example
query Languages {
Languages {
id
label
code
selectorLabel
isCustom
}
}Example Response
{
"data": {
"Languages": [
{
"id": "lang_001",
"label": "English",
"code": "en",
"selectorLabel": "English (US)",
"isCustom": false
},
{
"id": "lang_002",
"label": "French",
"code": "fr",
"selectorLabel": "Français",
"isCustom": false
},
{
"id": "lang_003",
"label": "Acme Corporate Speak",
"code": "en-acme",
"selectorLabel": "Acme English",
"isCustom": true
}
]
},
"id": "abc-123",
"label": "example",
"code": "example",
"selectorLabel": "example",
"isCustom": false
}LearningPathCurrentUserAwardTotals1 ptFetch current user's award totals for a learning path
Returns the aggregated award totals that the currently authenticated learner has earned across all resources (courses or learning paths) within a specified learning path, identified by its slug. Each entry in the result describes the award type, the resource it was earned from, and the total amount accumulated. This is useful for building progress dashboards, award summaries, or gamification displays. The results are scoped to the current user — pass an `authToken` header to set the user context.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| slug | Slug! | Yes | The slug identifier of the learning path for which to retrieve the current user's award totals. |
Returns
| Field | Type | Description |
|---|---|---|
| resource | AwardResource | The resource (Course or LearningPath) from which the awards were earned. Use inline fragments to access type-specific fields. |
| resourceId | ID! | The ID of the resource from which awards were earned. |
| awardType | AwardType! | The type of award, including its label, icon, and dashboard visibility settings. |
| total | Float! | The total quantity of this award type earned by the current user for the given resource. |
Example
query GetLearningPathAwardTotals($slug: Slug!) {
LearningPathCurrentUserAwardTotals(slug: $slug) {
resourceId
total
awardType {
id
label
pluralLabel
icon
includeOnDashboard
}
resource {
... on Course {
id
title
slug
}
... on LearningPath {
id
name
slug
}
}
}
}Example Response
{
"data": {
"LearningPathCurrentUserAwardTotals": [
{
"resourceId": "course_abc123",
"total": 3,
"awardType": {
"id": "award_type_001",
"label": "Credit",
"pluralLabel": "Credits",
"icon": "star",
"includeOnDashboard": true
},
"resource": {
"id": "course_abc123",
"title": "Foundations of Leadership",
"slug": "foundations-of-leadership"
}
},
{
"resourceId": "course_def456",
"total": 1.5,
"awardType": {
"id": "award_type_001",
"label": "Credit",
"pluralLabel": "Credits",
"icon": "star",
"includeOnDashboard": true
},
"resource": {
"id": "course_def456",
"title": "Advanced Communication",
"slug": "advanced-communication"
}
}
]
},
"resource": null,
"resourceId": "abc-123",
"awardType": null,
"total": 0
}This query is user-scoped. You must provide an `authToken` header to identify the learner; without it, results may be empty or reflect an unauthenticated context.
TermsAndConditions1 ptFetch terms and conditions
Returns the global terms and conditions text configured for the learning instance. Use this query to display the platform's terms to users during registration, enrollment, or other consent workflows. This query takes no arguments and requires no user context.
Returns
| Field | Type | Description |
|---|---|---|
| globalTerms | String | The full text of the global terms and conditions for the learning instance. |
Example
query TermsAndConditions {
TermsAndConditions {
globalTerms
}
}Example Response
{
"data": {
"TermsAndConditions": {
"globalTerms": "By accessing this platform, you agree to abide by the terms and conditions set forth herein. All content is provided for educational purposes only. Unauthorized redistribution is prohibited."
}
},
"globalTerms": "example"
}UserArchivedContent1 ptFetch full content details for the current user's archived items
Returns a non-nullable list of full Content objects representing the content that the currently authenticated user has archived. Unlike `UserArchives`, which returns lightweight archive metadata, this query returns the complete Content type — including pricing, tags, badge information, and availability details — for each archived item. Use this when you need to render rich content cards in an archived items view.
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | Unique identifier of the content item. |
| title | String | Display title of the content item. |
| slug | Slug! | URL-friendly identifier for the content item. |
| kind | ContentKind | The type of content (e.g. course, webinar, learningPath). |
| status | Status | Publication status of the content. |
| description | String | Full description of the content item. |
| asset | String | URL of the content's thumbnail or hero image. |
| priceInCents | Int | Price of the content in cents. |
| authors | [String] | List of author names associated with this content. |
| tags | [Tag] | Tags associated with the content item. |
| prices | [ItemPrice!] | Multi-currency pricing details. |
| waitlistingEnabled | Boolean! | Whether waitlisting is enabled. |
| isActive | Boolean! | Whether the content is currently active. |
| url | AbsoluteOrRelativeURL | URL to the content detail page. |
| badgeUrl | String | URL to the badge image earned for this content. |
Example
query UserArchivedContent {
UserArchivedContent {
id
title
slug
kind
status
description
asset
priceInCents
authors
tags {
id
label
}
waitlistingEnabled
isActive
url
}
}Example Response
{
"data": {
"UserArchivedContent": [
{
"id": "crs_abc001",
"title": "Data Science Fundamentals",
"slug": "data-science-fundamentals",
"kind": "course",
"status": "archived",
"description": "A beginner-friendly introduction to data science concepts.",
"asset": "https://cdn.example.com/images/data-science.jpg",
"priceInCents": 4999,
"authors": [
"Jane Smith"
],
"tags": [
{
"id": "tag_001",
"label": "Data Science"
},
{
"id": "tag_002",
"label": "Beginner"
}
],
"waitlistingEnabled": false,
"isActive": true,
"url": "/courses/data-science-fundamentals"
}
]
},
"id": "abc-123",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"expiresAt": "2026-01-01T00:00:00Z",
"courseGroup": "example",
"title": "example",
"sessionTitle": "example",
"ribbon": null,
"slug": "example",
"kind": "courseGroup",
"metaTitle": "example",
"language": "example",
"metaDescription": "example",
"displayCourse": "abc-123",
"displayCourseSlug": "example",
"displayDate": "2026-01-01T00:00:00Z",
"availabilityStatus": "example",
"asset": "example",
"assetAltText": "example",
"freeWithRegistration": false,
"priceInCents": 0,
"suggestedRetailPriceInCents": 0,
"alternativePricingType": "membership",
"alternativePricingRef": 0,
"rating": 0,
"description": "example",
"sku": "example",
"hasChildren": false,
"tags": null,
"status": "draft",
"customFields": {},
"authors": [
"example"
],
"authorsAndInstructors": [
"example"
],
"contentTypeLabel": "example",
"contentTypeAssetAspectRatio": "example",
"waitlistCount": 0,
"seatsLimit": 0,
"enrollmentCount": 0,
"source": "example",
"publishDate": "2026-01-01T00:00:00Z",
"courseStartDate": "2026-01-01T00:00:00Z",
"courseEndDate": "2026-01-01T00:00:00Z",
"enrollmentStartDate": "2026-01-01T00:00:00Z",
"enrollmentEndDate": "2026-01-01T00:00:00Z",
"timeZone": "example",
"meetingStartDate": "2026-01-01T00:00:00Z",
"coursePresold": false,
"courseGracePeriodEnded": false,
"currentUserMayReschedule": false,
"isActive": false,
"embeddedEnabled": false,
"altDescriptionBody": "example",
"hideCourseDescription": false,
"annotationsEnabled": false,
"currentUserUnmetCoursePrerequisites": [
"abc-123"
],
"currentUserUnmetLearningPathPrerequisites": [
"abc-123"
],
"currentUserDueDate": "2026-01-01T00:00:00Z",
"url": "example",
"waitlistingEnabled": false,
"waitlistingTriggered": false,
"canAddToQueue": false,
"bulkPurchasingEnabled": false,
"prices": null,
"location": null,
"state": "example",
"acceptBadgeUrl": "example",
"issuedAt": "2026-01-01T00:00:00Z",
"badgeUrl": "example",
"credlyBadgeExpiresAt": "2026-01-01T00:00:00Z",
"imageUrl": "example",
"badgeName": "example",
"completedPassedDueDate": false
}This query always returns a non-null list (`[Content!]!`). The user is identified by the `authToken` header.
UserArchives1 ptFetch the current user's archived content records
Returns a list of ArchivedContent records representing content that the currently authenticated user has archived. Each record includes metadata about the archived resource such as its name, archival date, status, and whether it can be reinstated. This is helpful for building an archived content management view in a learner portal.
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | Unique identifier of the archived content record. |
| name | String | Display name of the archived content. |
| resourceType | String | The type of resource that was archived (e.g., Course). |
| status | String | Current status of the archived record. |
| archivedAt | Date | Timestamp when the content was archived. |
| reinstatable | Boolean! | Whether the user can reinstate this archived content. |
| waitlistActive | Boolean! | Whether a waitlist is currently active for this content. |
| user | ID | ID of the user who archived the content. |
| resource | ID | ID of the archived content resource. |
| company | Company | The company/tenant context associated with this archived record. |
Example
query UserArchives {
UserArchives {
id
name
resourceType
status
archivedAt
reinstatable
waitlistActive
user
resource
}
}Example Response
{
"data": {
"UserArchives": [
{
"id": "arc_xyz789",
"name": "Introduction to Machine Learning",
"resourceType": "Course",
"status": "archived",
"archivedAt": "2024-03-15T10:30:00.000Z",
"reinstatable": true,
"waitlistActive": false,
"user": "usr_def456",
"resource": "crs_ghi123"
}
]
},
"id": "abc-123",
"company": null,
"user": "abc-123",
"resource": "abc-123",
"resourceType": "example",
"status": "example",
"archivedAt": "2026-01-01T00:00:00Z",
"name": "example",
"reinstatable": false,
"waitlistActive": false
}The user context is set via the `authToken` request header.
UserCertificateFields1 ptFetch user certificate fields
Returns the list of certificate fields configured for the learning instance. Certificate fields define what information appears on learner certificates and transcripts — for example, learner name, course name, completion date, award type, custom field values, and unique identifiers. Each field specifies its type, display label, and whether it should be included on the transcript or external certificate. Providing an `authToken` header scopes the response to the context of a specific user, which may influence which fields are surfaced.
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | The unique identifier of the certificate field. |
| type | CertificateFieldType! | The type of data this field represents on the certificate (e.g., `nameLabel`, `contentCompletionDate`, `awardLabel`, `identifier`). |
| label | String! | The display label shown for this field on the certificate or transcript. |
| includeOnTranscript | Boolean! | Whether this field is included when generating a learner transcript. |
| includeOnExternalCertificate | Boolean! | Whether this field is included on externally shareable certificates. |
| text | String | Static text content for fields of type `textLabel`. |
| awardType | AwardType | The award type object associated with this field, populated when the field type is `awardLabel`. |
| awardTypeId | ID | The ID of the associated award type for `awardLabel` fields. |
| customField | CustomField | The content custom field object associated with this certificate field, for `contentFieldLabel` types. |
| customFieldSlug | Slug | The slug of the associated content custom field. |
| sessionCustomContentFieldSlug | Slug | The slug of the session-level custom content field associated with this certificate field. |
| userCustomField | UserCustomField | The user custom field object associated with this certificate field, for `userFieldLabel` types. |
| userCustomFieldSlug | Slug | The slug of the associated user custom field. |
| identifierPrefix | String | An optional prefix string prepended to generated certificate identifier values. |
| identifierBodyLength | Int | The character length of the randomly generated body portion of a certificate identifier. |
| hasIdentifierPrefix | Boolean | Indicates whether this identifier field uses a prefix. |
| dateFormat | CertificateDateFormatType | The format used to display dates on the certificate (e.g., `usLong`, `iso8601`, `euroShort`). |
Example
query UserCertificateFields {
UserCertificateFields {
id
type
label
includeOnTranscript
includeOnExternalCertificate
text
dateFormat
identifierPrefix
identifierBodyLength
hasIdentifierPrefix
awardTypeId
awardType {
id
label
pluralLabel
icon
includeOnDashboard
deleted
}
customFieldSlug
customField {
id
label
slug
indexed
multiple
}
userCustomFieldSlug
userCustomField {
id
label
slug
type
required
}
sessionCustomContentFieldSlug
}
}Example Response
{
"data": {
"UserCertificateFields": [
{
"id": "certfield_001",
"type": "nameLabel",
"label": "Learner Name",
"includeOnTranscript": true,
"includeOnExternalCertificate": true,
"text": null,
"dateFormat": null,
"identifierPrefix": null,
"identifierBodyLength": null,
"hasIdentifierPrefix": false,
"awardTypeId": null,
"awardType": null,
"customFieldSlug": null,
"customField": null,
"userCustomFieldSlug": null,
"userCustomField": null,
"sessionCustomContentFieldSlug": null
},
{
"id": "certfield_002",
"type": "contentCompletionDate",
"label": "Completion Date",
"includeOnTranscript": true,
"includeOnExternalCertificate": true,
"text": null,
"dateFormat": "usLong",
"identifierPrefix": null,
"identifierBodyLength": null,
"hasIdentifierPrefix": false,
"awardTypeId": null,
"awardType": null,
"customFieldSlug": null,
"customField": null,
"userCustomFieldSlug": null,
"userCustomField": null,
"sessionCustomContentFieldSlug": null
},
{
"id": "certfield_003",
"type": "awardLabel",
"label": "Credits Earned",
"includeOnTranscript": true,
"includeOnExternalCertificate": false,
"text": null,
"dateFormat": null,
"identifierPrefix": null,
"identifierBodyLength": null,
"hasIdentifierPrefix": false,
"awardTypeId": "award_type_007",
"awardType": {
"id": "award_type_007",
"label": "Credit",
"pluralLabel": "Credits",
"icon": "star",
"includeOnDashboard": true,
"deleted": false
},
"customFieldSlug": null,
"customField": null,
"userCustomFieldSlug": null,
"userCustomField": null,
"sessionCustomContentFieldSlug": null
},
{
"id": "certfield_004",
"type": "identifier",
"label": "Certificate ID",
"includeOnTranscript": true,
"includeOnExternalCertificate": true,
"text": null,
"dateFormat": null,
"identifierPrefix": "CERT-",
"identifierBodyLength": 8,
"hasIdentifierPrefix": true,
"awardTypeId": null,
"awardType": null,
"customFieldSlug": null,
"customField": null,
"userCustomFieldSlug": null,
"userCustomField": null,
"sessionCustomContentFieldSlug": null
}
]
},
"id": "abc-123",
"type": "nameLabel",
"label": "example",
"includeOnTranscript": false,
"includeOnExternalCertificate": false,
"text": "example",
"awardType": null,
"awardTypeId": "abc-123",
"customField": null,
"customFieldSlug": "example",
"sessionCustomContentFieldSlug": "example",
"userCustomField": null,
"userCustomFieldSlug": "example",
"identifierPrefix": "example",
"identifierBodyLength": 0,
"hasIdentifierPrefix": false,
"dateFormat": "iso8601"
}The response can be user-scoped by including an `authToken` header in the request. Without it, the query returns instance-level certificate field configuration. This query returns `null` if no certificate fields have been configured.
UserCertificates1 ptFetch certificates earned by a user
Returns certificates that the current user has earned or been granted, including details about the certificate template, the associated course or learning path resource, issuance and expiration dates, and downloadable URLs. Optionally filter by a search query string or include expired certificates in the results. The user context can be overridden by supplying an `authToken` header.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| query | String | No | An optional search string to filter certificates, for example by resource title. |
| includeExpiredCertificates | Boolean | No | When set to `true`, expired certificates are included in the results. Defaults to `false`. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | Unique identifier of the certificate. |
| certificateTemplate | CertificateTemplate | The template used to generate this certificate, including design and expiration configuration. |
| user | User! | The user who earned or was granted this certificate. |
| issuedAt | Date! | The date and time the certificate was issued. |
| url | AbsoluteOrRelativeURL! | The URL where the certificate can be viewed. |
| pdfAsset | AbsoluteOrRelativeURL | A direct URL to the PDF version of the certificate, if available. |
| resource | CertificateResource | The course or learning path this certificate was issued for. |
| resourceType | CertificateResourceType | Indicates whether the resource is a `course` or `learningPath`. |
| resourceTypeLabel | String | A human-readable label for the resource type. |
| resourceId | ID | The ID of the course or learning path this certificate is associated with. |
| progressWasReset | Boolean! | Whether the user's progress was reset as part of a recertification cycle. |
| expirationDate | Date | The date on which this certificate expires, if applicable. |
| didExpire | Boolean! | Whether the certificate has passed its expiration date. |
| deleted | Boolean! | Whether the certificate record has been soft-deleted. |
| recertificationDate | Date | The date by which the user should recertify, if applicable. |
| isExpired | Boolean! | Whether the certificate is currently expired. |
| source | String | The source system or integration that generated the certificate. |
| contentItem | Content | The content item associated with this certificate, providing catalog-level metadata. |
| isExternal | Boolean! | Whether the certificate was issued by an external system. |
| externalResourceTitle | String | The title of the external resource associated with the certificate, if applicable. |
| identifier | String | An optional human-readable certificate identifier or number. |
Example
query UserCertificates($query: String, $includeExpiredCertificates: Boolean) {
UserCertificates(query: $query, includeExpiredCertificates: $includeExpiredCertificates) {
id
issuedAt
expirationDate
didExpire
isExpired
progressWasReset
deleted
url
pdfAsset
resourceType
resourceTypeLabel
resourceId
identifier
isExternal
externalResourceTitle
certificateTemplate {
id
title
asset
isExpired
}
user {
id
email
firstName
lastName
}
}
}
# Variables:
# { "includeExpiredCertificates": false }Example Response
{
"data": {
"UserCertificates": [
{
"id": "cert_001",
"issuedAt": "2024-01-20T14:00:00Z",
"expirationDate": "2025-01-20T14:00:00Z",
"didExpire": false,
"isExpired": false,
"progressWasReset": false,
"deleted": false,
"url": "/certificates/cert_001",
"pdfAsset": "https://cdn.example.com/certificates/cert_001.pdf",
"resourceType": "course",
"resourceTypeLabel": "Course",
"resourceId": "course_456",
"identifier": "CERT-2024-001",
"isExternal": false,
"externalResourceTitle": null,
"certificateTemplate": {
"id": "tmpl_01",
"title": "Course Completion Certificate",
"asset": "https://cdn.example.com/templates/completion.png",
"isExpired": false
},
"user": {
"id": "user_123",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Doe"
}
}
]
},
"id": "abc-123",
"certificateTemplate": null,
"user": null,
"issuedAt": "2026-01-01T00:00:00Z",
"url": "example",
"pdfAsset": "example",
"resource": null,
"resourceType": "course",
"resourceTypeLabel": "example",
"resourceId": "abc-123",
"progressWasReset": false,
"expirationDate": "2026-01-01T00:00:00Z",
"didExpire": false,
"deleted": false,
"recertificationDate": "2026-01-01T00:00:00Z",
"isExpired": false,
"source": "example",
"contentItem": null,
"isExternal": false,
"externalResourceTitle": "example",
"identifier": "example"
}UserContentGroups1 ptFetch content group counts for the current user
Returns a list of ContentGroup objects representing the counts of various content groupings available to the current user — such as the number of active content items, learning paths, completed items, certificates, bookmark folders, and waitlisted courses. This is ideal for rendering summary statistics or navigation badges in a learner dashboard. You can optionally filter the results by passing a search query string, and control whether expired certificates are included in the certificate count.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| query | String | No | This query argument allows you to filter content on various fields such as tags, authors, and custom content fields. Some example queries are: `tags:"Premium Package"`, `difficulty:Easy`, `authors:"Jack"`. See documentation here: https://support.thoughtindustries.com/hc/en-us/articles/360046307253-Writing-a-Search-Query |
| includeExpiredCertificates | Boolean | No | When true, expired certificates are included in the certificates group count. Defaults to false. |
Returns
| Field | Type | Description |
|---|---|---|
| kind | ContentGroupKind! | The category of content group (e.g., contentItems, certificates, learningPaths). |
| count | Int! | The number of items the current user has in this content group. |
Example
query UserContentGroups {
UserContentGroups(query: "tags:\"Premium Package\"", includeExpiredCertificates: false) {
kind
count
}
}Example Response
{
"data": {
"UserContentGroups": [
{
"kind": "contentItems",
"count": 12
},
{
"kind": "completedItems",
"count": 5
},
{
"kind": "certificates",
"count": 3
},
{
"kind": "learningPaths",
"count": 2
},
{
"kind": "bookmarkFolders",
"count": 1
},
{
"kind": "waitlistedCourses",
"count": 1
},
{
"kind": "archivedContentItems",
"count": 4
}
]
},
"kind": "contentItems",
"count": 0
}UserContentItems3 ptsFetch content items accessible to a user
Returns a list of content items that the current user has access to, such as enrolled or purchased courses, learning paths, and other content types. Results can be filtered by a search query string, narrowed to specific content kinds, and sorted in various ways. Supplying an `authToken` header changes the user context for this operation. This query carries an additional API cost of 3 points.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| query | String | No | This query argument allows you to filter content on various fields such as tags, authors, and custom content fields. Some example queries are: `tags:"Premium Package"`, `difficulty:Easy`, `authors:"Jack"`. See documentation here: https://support.thoughtindustries.com/hc/en-us/articles/360046307253-Writing-a-Search-Query |
| kind | [ContentKind!] | No | Filters results to only include content of the specified kinds (e.g., `course`, `learningPath`). |
| sortColumn | SortColumn | No | The field by which results should be sorted. |
| sortDirection | SortDirection | No | The direction of the sort, either ascending or descending. |
| sortdeprecated | String | No | A raw sort string for advanced sorting scenarios. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | Unique identifier of the content item. |
| title | String | Display title of the content item. |
| slug | Slug! | URL-friendly slug for the content item. |
| kind | ContentKind | The type of content (e.g., course, learningPath, webinar). |
| status | Status | Publication status of the content item. |
| availabilityStatus | String | A human-readable string describing the content's current availability. |
| asset | String | URL of the content item's thumbnail or cover image. |
| priceInCents | Int | Price of the content item in the smallest currency unit (e.g., cents). |
| isActive | Boolean! | Whether the content item is currently active and accessible. |
| tags | [Tag] | Tags associated with this content item. |
| currentUserDueDate | Date | The due date for the current user to complete this content, if set. |
Example
query UserContentItems($query: String, $kind: [ContentKind!], $sortColumn: SortColumn, $sortDirection: SortDirection) {
UserContentItems(query: $query, kind: $kind, sortColumn: $sortColumn, sortDirection: $sortDirection) {
id
title
slug
kind
status
availabilityStatus
asset
priceInCents
isActive
courseStartDate
courseEndDate
currentUserDueDate
tags {
id
label
}
authors
}
}
# Variables:
# {
# "query": "tags:\"Premium Package\"",
# "kind": ["course", "learningPath"],
# "sortColumn": "title",
# "sortDirection": "asc"
# }Example Response
{
"data": {
"UserContentItems": [
{
"id": "cg_001",
"title": "Advanced Data Analytics",
"slug": "advanced-data-analytics",
"kind": "course",
"status": "published",
"availabilityStatus": "available",
"asset": "https://cdn.example.com/images/data-analytics.jpg",
"priceInCents": 4999,
"isActive": true,
"courseStartDate": null,
"courseEndDate": null,
"currentUserDueDate": "2024-12-31T00:00:00Z",
"tags": [
{
"id": "tag_101",
"label": "Premium Package"
}
],
"authors": [
"Dr. Alice Smith"
]
},
{
"id": "lp_002",
"title": "Data Science Learning Path",
"slug": "data-science-learning-path",
"kind": "learningPath",
"status": "published",
"availabilityStatus": "available",
"asset": "https://cdn.example.com/images/data-science-lp.jpg",
"priceInCents": 0,
"isActive": true,
"courseStartDate": null,
"courseEndDate": null,
"currentUserDueDate": null,
"tags": [
{
"id": "tag_101",
"label": "Premium Package"
}
],
"authors": []
}
]
},
"id": "abc-123",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"expiresAt": "2026-01-01T00:00:00Z",
"courseGroup": "example",
"title": "example",
"sessionTitle": "example",
"ribbon": null,
"slug": "example",
"kind": "courseGroup",
"metaTitle": "example",
"language": "example",
"metaDescription": "example",
"displayCourse": "abc-123",
"displayCourseSlug": "example",
"displayDate": "2026-01-01T00:00:00Z",
"availabilityStatus": "example",
"asset": "example",
"assetAltText": "example",
"freeWithRegistration": false,
"priceInCents": 0,
"suggestedRetailPriceInCents": 0,
"alternativePricingType": "membership",
"alternativePricingRef": 0,
"rating": 0,
"description": "example",
"sku": "example",
"hasChildren": false,
"tags": null,
"status": "draft",
"customFields": {},
"authors": [
"example"
],
"authorsAndInstructors": [
"example"
],
"contentTypeLabel": "example",
"contentTypeAssetAspectRatio": "example",
"waitlistCount": 0,
"seatsLimit": 0,
"enrollmentCount": 0,
"source": "example",
"publishDate": "2026-01-01T00:00:00Z",
"courseStartDate": "2026-01-01T00:00:00Z",
"courseEndDate": "2026-01-01T00:00:00Z",
"enrollmentStartDate": "2026-01-01T00:00:00Z",
"enrollmentEndDate": "2026-01-01T00:00:00Z",
"timeZone": "example",
"meetingStartDate": "2026-01-01T00:00:00Z",
"coursePresold": false,
"courseGracePeriodEnded": false,
"currentUserMayReschedule": false,
"isActive": false,
"embeddedEnabled": false,
"altDescriptionBody": "example",
"hideCourseDescription": false,
"annotationsEnabled": false,
"currentUserUnmetCoursePrerequisites": [
"abc-123"
],
"currentUserUnmetLearningPathPrerequisites": [
"abc-123"
],
"currentUserDueDate": "2026-01-01T00:00:00Z",
"url": "example",
"waitlistingEnabled": false,
"waitlistingTriggered": false,
"canAddToQueue": false,
"bulkPurchasingEnabled": false,
"prices": null,
"location": null,
"state": "example",
"acceptBadgeUrl": "example",
"issuedAt": "2026-01-01T00:00:00Z",
"badgeUrl": "example",
"credlyBadgeExpiresAt": "2026-01-01T00:00:00Z",
"imageUrl": "example",
"badgeName": "example",
"completedPassedDueDate": false
}This query has an additional cost of 3 API points.
UserCourseAwardCounts1 ptFetch award counts for the current user on a course
Returns a list of award types and the number of each award the current user has earned for a specific course. Awards are configured per-course and may represent continuing education credits, completion badges, or other achievement types. The authenticated user is determined by the `authToken` header — without it, this query returns counts for the anonymous/default user context. Use this query to display a learner's earned credentials or credits on a course completion screen or dashboard.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| courseId | ID! | Yes | The unique ID of the course for which to retrieve the current user's award counts. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | The unique identifier of the award type. |
| label | String | The display name of the award type (e.g., 'CPE Credits', 'Certificate'). |
| icon | AwardTypeIcon | The icon identifier used to visually represent this award type. |
| count | Int | The number of this award type the current user has earned for the course. |
Example
query GetUserCourseAwardCounts {
UserCourseAwardCounts(courseId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890") {
id
label
icon
count
}
}Example Response
{
"data": {
"UserCourseAwardCounts": [
{
"id": "award-type-001",
"label": "CPE Credits",
"icon": "star",
"count": 4
},
{
"id": "award-type-002",
"label": "Completion Badge",
"icon": "check",
"count": 1
}
]
},
"id": "abc-123",
"label": "example",
"icon": "fullStar",
"count": 0
}Results are scoped to the currently authenticated user. Pass an `authToken` request header to identify the learner. Without an auth token, results reflect the anonymous user context and will typically return empty counts.
UserCourseCollaborations1 ptFetch the current user's collaboration count for a course
Returns the total number of discussions and comment threads the currently authenticated user has contributed to within a specific course. This integer count is useful for gamification displays, learner dashboards, or analytics surfaces that track community engagement. The user context is set via the `authToken` request header — without it, the count reflects the anonymous user and will typically be zero.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| courseId | ID! | Yes | The unique ID of the course for which to retrieve the current user's collaboration count. |
Returns
| Field | Type | Description |
|---|---|---|
| UserCourseCollaborations | Int! | The total number of comments and discussion threads the current user has made in the specified course. |
Example
query GetUserCourseCollaborations {
UserCourseCollaborations(courseId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890")
}Example Response
{
"data": {
"UserCourseCollaborations": 7
}
}Results are scoped to the currently authenticated user. Pass an `authToken` request header to identify the learner. The count includes all comments and threaded replies made by the user within the course's discussion areas.
UserEarnedBadgeBoard1 ptFetch user earned and unearned badge board
Returns a board showing all badges that the current user has earned as well as all badges they have not yet earned. This is useful for displaying a learner's badge progress and gamification status on a profile or dashboard. The user context is determined by the authenticated session or by an `authToken` header passed with the request.
Returns
| Field | Type | Description |
|---|---|---|
| earnedBadges | [EarnedBadge] | A list of badges the current user has already earned, each including details about the badge definition and the associated user. |
| unearnedBadges | [Badge] | A list of badges available on the instance that the current user has not yet earned, including award type and threshold information. |
Example
query UserEarnedBadgeBoard {
UserEarnedBadgeBoard {
earnedBadges {
id
deleted
user {
id
email
firstName
lastName
name
}
badge {
id
label
asset
awardThreshold
awardType {
id
label
}
}
}
unearnedBadges {
id
label
asset
awardThreshold
awardType {
id
label
pluralLabel
includeOnDashboard
icon
}
}
}
}Example Response
{
"data": {
"UserEarnedBadgeBoard": {
"earnedBadges": [
{
"id": [
"badge-earn-001"
],
"deleted": false,
"user": {
"id": "user-123",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Doe",
"name": "Jane Doe"
},
"badge": {
"id": "badge-001",
"label": "Quick Learner",
"asset": "https://cdn.example.com/badges/quick-learner.png",
"awardThreshold": 5,
"awardType": {
"id": "award-type-001",
"label": "Course Completion"
}
}
}
],
"unearnedBadges": [
{
"id": "badge-002",
"label": "Expert",
"asset": "https://cdn.example.com/badges/expert.png",
"awardThreshold": 20,
"awardType": {
"id": "award-type-001",
"label": "Course Completion",
"pluralLabel": "Course Completions",
"includeOnDashboard": true,
"icon": "star"
}
}
]
}
},
"earnedBadges": null,
"unearnedBadges": null
}The user context is resolved from the active session. Pass an `authToken` header to scope the results to a specific user.
UserRecentContent4 ptsFetch recently viewed content for a user
Returns a list of content items that the current user has most recently accessed, ordered by recency. A maximum of 25 items is returned regardless of the limit argument. Use this to power "Continue learning" or "Recently viewed" UI sections. The user context can be changed by providing an `authToken` header. This query carries an additional API cost of 4 points.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| limit | Int | No | The maximum number of recently viewed content items to return. Regardless of this value, at most 25 items will be returned. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | Unique identifier of the content item. |
| title | String | Display title of the content item. |
| slug | Slug! | URL-friendly slug for the content item. |
| kind | ContentKind | The type of content (e.g., course, learningPath, webinar). |
| asset | String | URL of the content item's thumbnail or cover image. |
| availabilityStatus | String | A human-readable string describing the content's current availability. |
| isActive | Boolean! | Whether the content item is currently active and accessible. |
| url | AbsoluteOrRelativeURL | The URL to navigate to this content item. |
| currentUserDueDate | Date | The due date for the current user on this content item, if set. |
| tags | [Tag] | Tags categorizing this content item. |
Example
query UserRecentContent($limit: Int) {
UserRecentContent(limit: $limit) {
id
title
slug
kind
asset
assetAltText
availabilityStatus
isActive
url
currentUserDueDate
tags {
id
label
}
}
}
# Variables:
# { "limit": 5 }Example Response
{
"data": {
"UserRecentContent": [
{
"id": "cg_101",
"title": "Introduction to Python",
"slug": "introduction-to-python",
"kind": "course",
"asset": "https://cdn.example.com/images/python-intro.jpg",
"assetAltText": "Python programming course thumbnail",
"availabilityStatus": "available",
"isActive": true,
"url": "/learn/introduction-to-python",
"currentUserDueDate": null,
"tags": [
{
"id": "tag_50",
"label": "Programming"
}
]
},
{
"id": "lp_202",
"title": "Cloud Engineering Path",
"slug": "cloud-engineering-path",
"kind": "learningPath",
"asset": "https://cdn.example.com/images/cloud-engineering.jpg",
"assetAltText": "Cloud engineering learning path thumbnail",
"availabilityStatus": "available",
"isActive": true,
"url": "/learn/cloud-engineering-path",
"currentUserDueDate": "2024-09-30T00:00:00Z",
"tags": [
{
"id": "tag_51",
"label": "Cloud"
}
]
}
]
},
"id": "abc-123",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"expiresAt": "2026-01-01T00:00:00Z",
"courseGroup": "example",
"title": "example",
"sessionTitle": "example",
"ribbon": null,
"slug": "example",
"kind": "courseGroup",
"metaTitle": "example",
"language": "example",
"metaDescription": "example",
"displayCourse": "abc-123",
"displayCourseSlug": "example",
"displayDate": "2026-01-01T00:00:00Z",
"availabilityStatus": "example",
"asset": "example",
"assetAltText": "example",
"freeWithRegistration": false,
"priceInCents": 0,
"suggestedRetailPriceInCents": 0,
"alternativePricingType": "membership",
"alternativePricingRef": 0,
"rating": 0,
"description": "example",
"sku": "example",
"hasChildren": false,
"tags": null,
"status": "draft",
"customFields": {},
"authors": [
"example"
],
"authorsAndInstructors": [
"example"
],
"contentTypeLabel": "example",
"contentTypeAssetAspectRatio": "example",
"waitlistCount": 0,
"seatsLimit": 0,
"enrollmentCount": 0,
"source": "example",
"publishDate": "2026-01-01T00:00:00Z",
"courseStartDate": "2026-01-01T00:00:00Z",
"courseEndDate": "2026-01-01T00:00:00Z",
"enrollmentStartDate": "2026-01-01T00:00:00Z",
"enrollmentEndDate": "2026-01-01T00:00:00Z",
"timeZone": "example",
"meetingStartDate": "2026-01-01T00:00:00Z",
"coursePresold": false,
"courseGracePeriodEnded": false,
"currentUserMayReschedule": false,
"isActive": false,
"embeddedEnabled": false,
"altDescriptionBody": "example",
"hideCourseDescription": false,
"annotationsEnabled": false,
"currentUserUnmetCoursePrerequisites": [
"abc-123"
],
"currentUserUnmetLearningPathPrerequisites": [
"abc-123"
],
"currentUserDueDate": "2026-01-01T00:00:00Z",
"url": "example",
"waitlistingEnabled": false,
"waitlistingTriggered": false,
"canAddToQueue": false,
"bulkPurchasingEnabled": false,
"prices": null,
"location": null,
"state": "example",
"acceptBadgeUrl": "example",
"issuedAt": "2026-01-01T00:00:00Z",
"badgeUrl": "example",
"credlyBadgeExpiresAt": "2026-01-01T00:00:00Z",
"imageUrl": "example",
"badgeName": "example",
"completedPassedDueDate": false
}Regardless of the `limit` argument, this query returns a maximum of 25 items. This query has an additional cost of 4 API points.
UserWaitlist1 ptFetch content on the current user's waitlist
Returns a list of Content items that the currently authenticated user is on the waitlist for. This is useful for building a learner dashboard that surfaces waitlisted courses or events so users can track their position. The user context is determined by the `authToken` header — if no authenticated user is present the result will be empty or null depending on server behavior.
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | Unique identifier of the content item. |
| title | String | Display title of the content item. |
| slug | Slug! | URL-friendly identifier for the content item. |
| kind | ContentKind | The type of content (e.g. course, webinar, learningPath). |
| waitlistCount | Int | Number of users currently on the waitlist for this content. |
| seatsLimit | Int | Maximum number of seats available for this content. |
| waitlistingEnabled | Boolean! | Whether waitlisting is enabled for this content. |
| waitlistingTriggered | Boolean! | Whether the waitlist has been activated (i.e., seats are full). |
| status | Status | Publication status of the content (e.g. published, draft). |
| url | AbsoluteOrRelativeURL | URL to the content detail page. |
| courseStartDate | Date | Date on which the course begins. |
| enrollmentStartDate | Date | Date on which enrollment opens. |
| ribbon | Ribbon | Optional ribbon label and color displayed on the content card. |
| prices | [ItemPrice!] | Pricing information for the content across currencies. |
| location | Location | Physical location details for in-person events. |
Example
query UserWaitlist {
UserWaitlist {
id
title
slug
kind
waitlistCount
seatsLimit
waitlistingEnabled
waitlistingTriggered
courseStartDate
enrollmentStartDate
status
url
}
}Example Response
{
"data": {
"UserWaitlist": [
{
"id": "crs_abc123",
"title": "Advanced JavaScript Patterns",
"slug": "advanced-javascript-patterns",
"kind": "course",
"waitlistCount": 14,
"seatsLimit": 30,
"waitlistingEnabled": true,
"waitlistingTriggered": true,
"courseStartDate": "2024-09-01T00:00:00.000Z",
"enrollmentStartDate": "2024-08-01T00:00:00.000Z",
"status": "published",
"url": "/courses/advanced-javascript-patterns"
}
]
},
"id": "abc-123",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"expiresAt": "2026-01-01T00:00:00Z",
"courseGroup": "example",
"title": "example",
"sessionTitle": "example",
"ribbon": null,
"slug": "example",
"kind": "courseGroup",
"metaTitle": "example",
"language": "example",
"metaDescription": "example",
"displayCourse": "abc-123",
"displayCourseSlug": "example",
"displayDate": "2026-01-01T00:00:00Z",
"availabilityStatus": "example",
"asset": "example",
"assetAltText": "example",
"freeWithRegistration": false,
"priceInCents": 0,
"suggestedRetailPriceInCents": 0,
"alternativePricingType": "membership",
"alternativePricingRef": 0,
"rating": 0,
"description": "example",
"sku": "example",
"hasChildren": false,
"tags": null,
"status": "draft",
"customFields": {},
"authors": [
"example"
],
"authorsAndInstructors": [
"example"
],
"contentTypeLabel": "example",
"contentTypeAssetAspectRatio": "example",
"waitlistCount": 0,
"seatsLimit": 0,
"enrollmentCount": 0,
"source": "example",
"publishDate": "2026-01-01T00:00:00Z",
"courseStartDate": "2026-01-01T00:00:00Z",
"courseEndDate": "2026-01-01T00:00:00Z",
"enrollmentStartDate": "2026-01-01T00:00:00Z",
"enrollmentEndDate": "2026-01-01T00:00:00Z",
"timeZone": "example",
"meetingStartDate": "2026-01-01T00:00:00Z",
"coursePresold": false,
"courseGracePeriodEnded": false,
"currentUserMayReschedule": false,
"isActive": false,
"embeddedEnabled": false,
"altDescriptionBody": "example",
"hideCourseDescription": false,
"annotationsEnabled": false,
"currentUserUnmetCoursePrerequisites": [
"abc-123"
],
"currentUserUnmetLearningPathPrerequisites": [
"abc-123"
],
"currentUserDueDate": "2026-01-01T00:00:00Z",
"url": "example",
"waitlistingEnabled": false,
"waitlistingTriggered": false,
"canAddToQueue": false,
"bulkPurchasingEnabled": false,
"prices": null,
"location": null,
"state": "example",
"acceptBadgeUrl": "example",
"issuedAt": "2026-01-01T00:00:00Z",
"badgeUrl": "example",
"credlyBadgeExpiresAt": "2026-01-01T00:00:00Z",
"imageUrl": "example",
"badgeName": "example",
"completedPassedDueDate": false
}The user is identified via the `authToken` request header. Without a valid auth token this query returns an empty list.
CreateCertificateFromUpload1 ptCreate certificate from uploaded image
Creates a new certificate record for a user by supplying the URL of a previously uploaded image asset along with optional field mappings. This is useful when you want to issue a certificate based on a custom image upload rather than a template rendered by the platform. The operation returns a fully populated `Certificate` object, including the associated user, certificate template details, resource information, expiration state, and a direct URL to the certificate. The acting user can be controlled by passing an `authToken` header.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| asset | URL! | Yes | The publicly accessible URL of the uploaded image to use as the certificate asset. |
| certificateUploadFields | [CertificateUploadField!] | No | An optional list of field mappings that define additional metadata or label values to associate with the uploaded certificate image. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | Unique identifier for the newly created certificate. |
| certificateTemplate | CertificateTemplate | The certificate template associated with this certificate, including layout, expiration, and recertification settings. |
| user | User! | The user to whom the certificate was issued. |
| issuedAt | Date! | The date on which the certificate was issued. |
| url | AbsoluteOrRelativeURL! | The URL where the certificate can be viewed. |
| pdfAsset | AbsoluteOrRelativeURL | URL to the PDF version of the certificate, if available. |
| resource | CertificateResource | The course or learning path resource associated with this certificate. |
| resourceType | CertificateResourceType | Whether the certificate is associated with a `course` or `learningPath`. |
| resourceTypeLabel | String | Human-readable label for the resource type. |
| resourceId | ID | The ID of the associated course or learning path resource. |
| progressWasReset | Boolean! | Indicates whether the user's progress was reset as part of recertification. |
| expirationDate | Date | The date on which this certificate expires, if applicable. |
| didExpire | Boolean! | Indicates whether the certificate has already expired. |
| deleted | Boolean! | Indicates whether the certificate has been deleted. |
| recertificationDate | Date | The date by which the user must recertify, if applicable. |
| isExpired | Boolean! | Indicates whether the certificate is currently in an expired state. |
| source | String | The source or origin of the certificate (e.g., 'upload'). |
| contentItem | Content | The content catalog item associated with this certificate. |
| isExternal | Boolean! | Indicates whether the certificate was issued for an external resource. |
| externalResourceTitle | String | Title of the external resource, when `isExternal` is true. |
| identifier | String | A human-readable identifier or reference code for the certificate. |
Example
mutation CreateCertificateFromUpload(
$asset: URL!
$certificateUploadFields: [CertificateUploadField!]
) {
CreateCertificateFromUpload(
asset: $asset
certificateUploadFields: $certificateUploadFields
) {
id
issuedAt
url
pdfAsset
isExpired
expirationDate
didExpire
deleted
progressWasReset
resourceType
resourceTypeLabel
resourceId
recertificationDate
source
isExternal
externalResourceTitle
identifier
user {
id
email
firstName
lastName
name
}
certificateTemplate {
id
title
resourceType
asset
expirationDays
isExpired
}
resource {
... on Course {
id
title
slug
}
... on LearningPath {
id
name
slug
}
}
contentItem {
id
title
slug
kind
}
}
}Example Response
{
"data": {
"CreateCertificateFromUpload": {
"id": "cert_abc123",
"issuedAt": "2024-06-15",
"url": "/certificates/cert_abc123",
"pdfAsset": "/certificates/cert_abc123.pdf",
"isExpired": false,
"expirationDate": "2025-06-15",
"didExpire": false,
"deleted": false,
"progressWasReset": false,
"resourceType": "course",
"resourceTypeLabel": "Course",
"resourceId": "course_789",
"recertificationDate": null,
"source": "upload",
"isExternal": false,
"externalResourceTitle": null,
"identifier": "CERT-2024-00123",
"user": {
"id": "user_456",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Doe",
"name": "Jane Doe"
},
"certificateTemplate": {
"id": "tmpl_001",
"title": "Course Completion Certificate",
"resourceType": "course",
"asset": "https://assets.example.com/cert-template.png",
"expirationDays": 365,
"isExpired": false
},
"resource": {
"id": "course_789",
"title": "Introduction to GraphQL",
"slug": "intro-to-graphql"
},
"contentItem": {
"id": "content_321",
"title": "Introduction to GraphQL",
"slug": "intro-to-graphql",
"kind": "course"
}
}
},
"id": "abc-123",
"certificateTemplate": null,
"user": null,
"issuedAt": "2026-01-01T00:00:00Z",
"url": "example",
"pdfAsset": "example",
"resource": null,
"resourceType": "course",
"resourceTypeLabel": "example",
"resourceId": "abc-123",
"progressWasReset": false,
"expirationDate": "2026-01-01T00:00:00Z",
"didExpire": false,
"deleted": false,
"recertificationDate": "2026-01-01T00:00:00Z",
"isExpired": false,
"source": "example",
"contentItem": null,
"isExternal": false,
"externalResourceTitle": "example",
"identifier": "example"
}The acting user for this mutation can be overridden by passing an `authToken` header. Without it, the certificate is issued to the currently authenticated user.
CreateLearner1 ptCreate a learner
Creates a new learner account within the learning instance. You must provide the learner's email address, first name, and last name. Optionally, you can associate the new user with a specific client by passing `clientId`, and pre-assign them to one or more licenses by providing a list of `licenseIds`. The mutation returns a full `User` object representing the newly created learner. The acting user context (used for permission checks) is resolved from the `authToken` header.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| String! | Yes | The email address for the new learner account. Must be unique within the learning instance. | |
| firstName | String! | Yes | The learner's first name. |
| lastName | String! | Yes | The learner's last name. |
| clientId | ID | No | The ID of the client (tenant) to associate the new learner with. If omitted, the learner is created under the default client. |
| licenseIds | [ID!] | No | An optional list of license IDs to assign to the learner upon creation. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | The unique identifier of the newly created user. |
| String | The learner's email address. | |
| firstName | String | The learner's first name. |
| lastName | String | The learner's last name. |
| name | String | The learner's full display name. |
| abbreviatedName | String | A shortened version of the learner's name. |
| asset | String | URL of the learner's profile image. |
| bio | String | The learner's biography or profile description. |
| createdAt | Date | Timestamp when the learner account was created. |
| updatedAt | Date | Timestamp when the learner account was last updated. |
| disabled | Boolean! | Whether the learner's account is currently disabled. |
| mustVerifyEmail | Boolean! | Whether the learner must verify their email before accessing content. |
| client | Client | The client (tenant) the learner is associated with. |
| clientId | ID | The ID of the client the learner belongs to. |
| activeLicense | License | The learner's currently active license. |
| allocatedLicenses | [AllocatedLicense!] | All licenses allocated to this learner, including their role and status. |
| purchasedCourses | [PurchasedCourse!] | Courses the learner has purchased or been enrolled in. |
| purchasedBundles | [PurchasedBundle!] | Content bundles the learner has purchased. |
| allocatedLearningPaths | [AllocatedLearningPath!] | Learning paths allocated to this learner. |
| certificatesCount | Int! | Total number of certificates earned by the learner. |
| completedCoursesCount | Int! | Number of courses the learner has completed. |
| startedCoursesCount | Int! | Number of courses the learner has started. |
| availableCoursesCount | Int! | Number of courses currently available to the learner. |
| collaborationsCount | Int! | Number of collaborations the learner is part of. |
| roleKey | String | The learner's role key within the platform. |
| customFields | JSON | Any custom metadata fields associated with the learner. |
| lang | String | The learner's preferred language code. |
| preferredCurrency | String | The learner's preferred currency for purchases. |
Example
mutation CreateLearner {
CreateLearner(
email: "[email protected]",
firstName: "Alex",
lastName: "Johnson",
clientId: "client_001",
licenseIds: ["license_101", "license_202"]
) {
id
email
firstName
lastName
name
createdAt
disabled
mustVerifyEmail
certificatesCount
completedCoursesCount
availableCoursesCount
client {
id
name
}
activeLicense {
id
name
}
}
}Example Response
{
"data": {
"CreateLearner": {
"id": "user_new789",
"email": "[email protected]",
"firstName": "Alex",
"lastName": "Johnson",
"name": "Alex Johnson",
"createdAt": "2024-03-22T09:00:00Z",
"disabled": false,
"mustVerifyEmail": false,
"certificatesCount": 0,
"completedCoursesCount": 0,
"availableCoursesCount": 5,
"client": {
"id": "client_001",
"name": "Acme Corp"
},
"activeLicense": {
"id": "license_101",
"name": "Standard Learner License"
}
}
},
"id": "abc-123",
"email": "example",
"firstName": "example",
"abbreviatedName": "example",
"asset": "example",
"lastName": "example",
"name": "example",
"lastActiveAt": "2026-01-01T00:00:00Z",
"bio": "example",
"twoFactorEnabled": false,
"firstInitial": "example",
"lastInitial": "example",
"invitedByName": "example",
"shouldHighlight": false,
"purchasedCourses": null,
"purchasedBundles": null,
"activeLicense": null,
"allocatedLicenses": null,
"allocatedLearningPaths": null,
"attendedMeetings": null,
"waitlistedCourses": null,
"adminClients": null,
"roleKey": "example",
"address1": "example",
"address2": "example",
"city": "example",
"state": "example",
"zipCode": "example",
"country": "example",
"telephone": "example",
"stripeCustomerId": "abc-123",
"externalCustomerId": "abc-123",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"sfAccountId": "abc-123",
"sfContactId": "abc-123",
"shippingName": "example",
"client": null,
"clientId": "abc-123",
"ref1": "example",
"ref2": "example",
"ref3": "example",
"ref4": "example",
"ref5": "example",
"ref6": "example",
"ref7": "example",
"ref8": "example",
"ref9": "example",
"ref10": "example",
"lang": "example",
"preferredCurrency": "example",
"customFields": {},
"recommendedTags": null,
"recommendedSlugs": null,
"accessedFlows": [
"example"
],
"disabled": false,
"learnerUserId": "abc-123",
"managerUserId": "abc-123",
"balance": 0,
"mustVerifyEmail": false,
"certificatesCount": 0,
"collaborationsCount": 0,
"availableCoursesCount": 0,
"startedCoursesCount": 0,
"completedCoursesCount": 0
}If a user with the supplied email already exists, this mutation will return an error. Ensure `licenseIds` reference licenses belonging to the specified `clientId` to avoid allocation errors.
CreateLearners1 ptCreate multiple learners
Creates one or more learner accounts within the learning instance in a single operation. You pass an array of `LearnerInput` objects, and the API returns the newly created `User` records with their full profile data. This is the right mutation to use when bulk-provisioning users from an external system, such as an HR platform or an SSO directory sync. The behavior of the mutation can be scoped to a specific user by passing an `authToken` header.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| learners | [LearnerInput!]! | Yes | An array of learner input objects containing the profile data for each user to be created. |
Returns
| Field | Type | Description |
|---|---|---|
| id | ID! | The unique identifier for the newly created user. |
| String | The user's email address. | |
| firstName | String | The user's first name. |
| lastName | String | The user's last name. |
| name | String | The user's full display name. |
| abbreviatedName | String | An abbreviated form of the user's name. |
| asset | String | URL of the user's profile avatar image. |
| lastActiveAt | Date | Timestamp of the user's most recent activity. |
| bio | String | The user's biographical text. |
| twoFactorEnabled | Boolean | Whether two-factor authentication is enabled for the user. |
| firstInitial | String | The first initial of the user's first name. |
| lastInitial | String | The first initial of the user's last name. |
| invitedByName | String | Name of the user who invited this learner. |
| shouldHighlight | Boolean! | Whether the user should be visually highlighted in listings. |
| purchasedCourses | [PurchasedCourse!] | List of courses the user has purchased, including enrollment status and certificate info. |
| purchasedBundles | [PurchasedBundle!] | List of bundles the user has purchased. |
| activeLicense | License | The license currently active for this user. |
| allocatedLicenses | [AllocatedLicense!] | All licenses allocated to this user and their roles. |
| allocatedLearningPaths | [AllocatedLearningPath!] | Learning paths that have been allocated to this user. |
| attendedMeetings | [UserAttendedMeeting!] | Meetings the user has attended, with dates and meeting details. |
| waitlistedCourses | [WaitlistedCourse!] | Courses the user is currently waitlisted for. |
| adminClients | [Client] | Client organizations this user administers. |
| roleKey | String | The key identifying the user's role within the system. |
| address1 | String | Primary street address line. |
| address2 | String | Secondary street address line. |
| city | String | City of the user's address. |
| state | String | State or province of the user's address. |
| zipCode | String | Postal/ZIP code of the user's address. |
| country | String | Country of the user's address. |
| telephone | String | The user's phone number. |
| stripeCustomerId | ID | The Stripe customer ID associated with this user. |
| externalCustomerId | ID | An external system customer ID linked to this user. |
| createdAt | Date | Timestamp when the user account was created. |
| updatedAt | Date | Timestamp when the user account was last updated. |
| sfAccountId | ID | Salesforce Account ID linked to this user. |
| sfContactId | ID | Salesforce Contact ID linked to this user. |
| shippingName | String | Name to use for physical shipping. |
| client | Client | The client organization this user belongs to. |
| clientId | ID | The ID of the client organization this user belongs to. |
| ref1 | String | Custom reference field 1 for external system mapping. |
| ref2 | String | Custom reference field 2 for external system mapping. |
| ref3 | String | Custom reference field 3 for external system mapping. |
| ref4 | String | Custom reference field 4 for external system mapping. |
| ref5 | String | Custom reference field 5 for external system mapping. |
| ref6 | String | Custom reference field 6 for external system mapping. |
| ref7 | String | Custom reference field 7 for external system mapping. |
| ref8 | String | Custom reference field 8 for external system mapping. |
| ref9 | String | Custom reference field 9 for external system mapping. |
| ref10 | String | Custom reference field 10 for external system mapping. |
| lang | String | The user's preferred interface language code. |
| preferredCurrency | String | The user's preferred currency code for pricing. |
| customFields | JSON | Arbitrary custom field data associated with the user. |
| recommendedTags | [UserRecommendedTag!] | Content tags recommended for this user with boost weights. |
| recommendedSlugs | [UserRecommendedSlug!] | Content slugs recommended for this user with boost weights. |
| accessedFlows | [String!] | List of onboarding or experience flows the user has accessed. |
| disabled | Boolean! | Whether the user account is currently disabled. |
| learnerUserId | ID | ID of the associated learner-role user record. |
| managerUserId | ID | ID of the associated manager-role user record. |
| balance | Float | The user's current credit balance. |
| mustVerifyEmail | Boolean! | Whether the user must verify their email before proceeding. |
| certificatesCount | Int! | Total number of certificates the user has earned. |
| collaborationsCount | Int! | Total number of collaborations the user is part of. |
| availableCoursesCount | Int! | Number of courses available to the user. |
| startedCoursesCount | Int! | Number of courses the user has started. |
| completedCoursesCount | Int! | Number of courses the user has completed. |
Example
mutation CreateLearners($learners: [LearnerInput!]!) {
CreateLearners(learners: $learners) {
id
email
firstName
lastName
name
createdAt
disabled
clientId
ref1
ref2
}
}
# Variables:
# {
# "learners": [
# {
# "email": "[email protected]",
# "firstName": "Jane",
# "lastName": "Doe",
# "ref1": "dept-engineering"
# },
# {
# "email": "[email protected]",
# "firstName": "John",
# "lastName": "Smith"
# }
# ]
# }Example Response
{
"data": {
"CreateLearners": [
{
"id": "usr_01HX1A2B3C4D5E6F",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Doe",
"name": "Jane Doe",
"createdAt": "2024-05-01T10:00:00Z",
"disabled": false,
"clientId": "clt_9876543210",
"ref1": "dept-engineering",
"ref2": null
},
{
"id": "usr_01HX1A2B3C4D5E7G",
"email": "[email protected]",
"firstName": "John",
"lastName": "Smith",
"name": "John Smith",
"createdAt": "2024-05-01T10:00:01Z",
"disabled": false,
"clientId": "clt_9876543210",
"ref1": null,
"ref2": null
}
]
},
"id": "abc-123",
"email": "example",
"firstName": "example",
"abbreviatedName": "example",
"asset": "example",
"lastName": "example",
"name": "example",
"lastActiveAt": "2026-01-01T00:00:00Z",
"bio": "example",
"twoFactorEnabled": false,
"firstInitial": "example",
"lastInitial": "example",
"invitedByName": "example",
"shouldHighlight": false,
"purchasedCourses": null,
"purchasedBundles": null,
"activeLicense": null,
"allocatedLicenses": null,
"allocatedLearningPaths": null,
"attendedMeetings": null,
"waitlistedCourses": null,
"adminClients": null,
"roleKey": "example",
"address1": "example",
"address2": "example",
"city": "example",
"state": "example",
"zipCode": "example",
"country": "example",
"telephone": "example",
"stripeCustomerId": "abc-123",
"externalCustomerId": "abc-123",
"createdAt": "2026-01-01T00:00:00Z",
"updatedAt": "2026-01-01T00:00:00Z",
"sfAccountId": "abc-123",
"sfContactId": "abc-123",
"shippingName": "example",
"client": null,
"clientId": "abc-123",
"ref1": "example",
"ref2": "example",
"ref3": "example",
"ref4": "example",
"ref5": "example",
"ref6": "example",
"ref7": "example",
"ref8": "example",
"ref9": "example",
"ref10": "example",
"lang": "example",
"preferredCurrency": "example",
"customFields": {},
"recommendedTags": null,
"recommendedSlugs": null,
"accessedFlows": [
"example"
],
"disabled": false,
"learnerUserId": "abc-123",
"managerUserId": "abc-123",
"balance": 0,
"mustVerifyEmail": false,
"certificatesCount": 0,
"collaborationsCount": 0,
"availableCoursesCount": 0,
"startedCoursesCount": 0,
"completedCoursesCount": 0
}This mutation creates users in bulk. If an `authToken` header is provided, the operation is performed in the context of that user. Duplicate email addresses may cause errors depending on platform configuration.
Login1 ptLog in a user
Authenticates a user with their email address and password. The mutation validates credentials, checks email verification status, and performs other account state checks. On success, it returns an authentication token (authToken) string that can be passed as the `authToken` header in subsequent API requests to authenticate as that user. On failure, an appropriate error is returned describing the reason (e.g. invalid credentials, unverified email).
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| String! | Yes | The email of the Current User attempting to log in. | |
| password | String! | Yes | The password of the Current User attempting to log in. |
Returns
| Field | Type | Description |
|---|---|---|
| Login | String! | The authentication token to use in the `authToken` header for subsequent authenticated requests. |
Example
mutation Login {
Login(
email: "[email protected]"
password: "s3cur3P@ssword!"
)
}Example Response
{
"data": {
"Login": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c2VyXzAwMSIsImlhdCI6MTcxMDAwMDAwMH0.placeholder_signature"
}
}The returned token should be supplied as the value of the `authToken` header — not as a URL parameter — in all subsequent API calls that require authentication.
Logout1 ptLog out the current user
Logs out the currently authenticated user and immediately invalidates their authentication token. After this mutation succeeds, any further requests using the same token will be rejected. Use this mutation when ending a user session or rotating credentials. The user to log out is determined by the `authToken` header supplied with the request.
Returns
| Field | Type | Description |
|---|---|---|
| Logout | Boolean! | Returns `true` if the logout was successful and the token has been invalidated. |
Example
mutation Logout {
Logout
}Example Response
{
"data": {
"Logout": true
}
}The `authToken` header must be present and valid for this mutation to succeed. Once invalidated, the token cannot be reused.
RedeemBalance1 ptRedeem user balance for content
This mutation allows a user to spend their credit balance to access a piece of content. It adds the content to the user's purchased courses, deducts the appropriate amount from their balance, and records a credit redemption action event. Currently, only the `courses` content type is supported via the `BalanceContentType` enum. The return value is a URL — for articles and videos it is the direct content URL, while for all other content types (including courses) it is the learner dashboard URL.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| contentType | BalanceContentType! | Yes | Currently only available for `courses` |
| contentId | UUID! | Yes | The UUID of the content item to redeem the user's balance against. |
Returns
| Field | Type | Description |
|---|---|---|
| RedeemBalance | AbsoluteOrRelativeURL | A URL to redirect the user to after redemption. For articles and videos this is the content URL; for all other content types this is the learner dashboard URL. |
Example
mutation RedeemBalance {
RedeemBalance(
contentType: courses
contentId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
)
}Example Response
{
"data": {
"RedeemBalance": "/dashboard"
}
}Currently only `courses` is a valid value for `contentType`. The mutation operates in the context of the authenticated user; ensure the correct user token is provided.
RedeemRegistrationAndRedemptionCodes1 ptRedeem registration and redemption codes
Redeems one or more pre-validated registration or redemption codes on behalf of a user. Pass an array of code strings that have already been validated. The outcome of this mutation is user-scoped — provide an `authToken` header to associate the redemption with a specific user. Returns a boolean indicating whether the redemption was successful.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| validatedRedemptionCodes | [String!]! | Yes | A non-empty list of redemption or registration code strings to redeem. These codes should have been pre-validated using `ValidateRedemptionCode` or `ValidateRegistrationCode` before being passed here. |
Returns
| Field | Type | Description |
|---|---|---|
| redeemed | Boolean! | Indicates whether all provided codes were successfully redeemed. |
Example
mutation RedeemRegistrationAndRedemptionCodes {
RedeemRegistrationAndRedemptionCodes(
validatedRedemptionCodes: ["WELCOME2024", "COURSE-ABC-XYZ"]
) {
redeemed
}
}Example Response
{
"data": {
"RedeemRegistrationAndRedemptionCodes": {
"redeemed": true
}
},
"redeemed": false
}Codes should be validated before calling this mutation. Pass an `authToken` header to bind the redemption to a specific user; otherwise the currently authenticated session user is used.
SelectCurrentUserActiveLicense1 ptSelect active license for current user
Changes which license is currently active for the authenticated user. When a user belongs to multiple licenses, this mutation lets you switch their active context to a specific license by ID. The active license affects what content and branding the user sees. Because this mutation operates on the "current user," it respects the `authToken` header — supplying that header lets you perform the switch on behalf of a specific user.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| licenseId | ID! | Yes | The ID of the License that should be set to 'active' for the CurrentUser. |
Returns
| Field | Type | Description |
|---|---|---|
| SelectCurrentUserActiveLicense | Boolean! | Returns true if the active license was successfully updated for the current user. |
Example
mutation SelectCurrentUserActiveLicense {
SelectCurrentUserActiveLicense(licenseId: "lic_abc123")
}Example Response
{
"data": {
"SelectCurrentUserActiveLicense": true
}
}UnenrollFromWaitlist1 ptUnenroll current user from a waitlist
Removes the currently authenticated user from the waitlist for a specific content item. This is useful when a learner no longer wants to be notified or enrolled when a seat becomes available. The operation targets the content item identified by the provided ID, and the acting user can be overridden by supplying an `authToken` header.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| id | ID! | Yes | The ID of the content item (e.g., a course) from whose waitlist the current user should be removed. |
Returns
| Field | Type | Description |
|---|---|---|
| Boolean | Boolean! | Returns true if the user was successfully removed from the waitlist, false otherwise. |
Example
mutation UnenrollFromWaitlist {
UnenrollFromWaitlist(id: "course_abc123")
}Example Response
{
"data": {
"UnenrollFromWaitlist": true
}
}ValidateRedemptionCode1 ptValidate a redemption code
Checks the status of a single redemption code before attempting to redeem it. The mutation returns three boolean flags: whether the code is currently valid, whether it has already been redeemed, and whether it has expired. Use this mutation as a pre-flight check before calling `RedeemRegistrationAndRedemptionCodes`. The result can be user-scoped by providing an `authToken` header.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| code | String! | Yes | The redemption code string to validate. |
Returns
| Field | Type | Description |
|---|---|---|
| valid | Boolean! | Whether the redemption code is currently valid and eligible to be redeemed. |
| alreadyRedeemed | Boolean! | Whether the redemption code has already been used. |
| codeExpired | Boolean! | Whether the redemption code has passed its expiration date. |
Example
mutation ValidateRedemptionCode {
ValidateRedemptionCode(code: "COURSE-ABC-XYZ") {
valid
alreadyRedeemed
codeExpired
}
}Example Response
{
"data": {
"ValidateRedemptionCode": {
"valid": true,
"alreadyRedeemed": false,
"codeExpired": false
}
},
"valid": false,
"alreadyRedeemed": false,
"codeExpired": false
}This mutation does not consume the code — it only checks its status. A code may be invalid due to either already being redeemed or being expired; check all three flags independently.
ValidateRegistrationCode1 ptValidate a registration code
Checks whether a registration code is valid and available for use. Unlike the redemption code validator, this mutation does not include an expiry check — it returns only whether the code is valid and whether it has already been redeemed. Use this as a pre-flight check before calling `RedeemRegistrationAndRedemptionCodes`. Provide an `authToken` header to scope the validation to a specific user.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
| code | String! | Yes | The registration code string to validate. |
Returns
| Field | Type | Description |
|---|---|---|
| valid | Boolean! | Whether the registration code is currently valid and eligible to be redeemed. |
| alreadyRedeemed | Boolean! | Whether the registration code has already been used. |
Example
mutation ValidateRegistrationCode {
ValidateRegistrationCode(code: "WELCOME2024") {
valid
alreadyRedeemed
}
}Example Response
{
"data": {
"ValidateRegistrationCode": {
"valid": true,
"alreadyRedeemed": false
}
},
"valid": false,
"alreadyRedeemed": false
}Registration codes do not have expiry dates exposed through this mutation; use `ValidateRedemptionCode` if expiry checking is needed. This mutation does not consume the code.