Skip to main content

User & Auth Endpoints

Authenticate learners and read the current session user.

QueryBadgeLeaderboard1 pt

Fetch 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

NameTypeDescription
limitIntThe maximum number of leaders to return in the leaderboard. If omitted, the server's default limit applies.

Returns

FieldTypeDescription
awardTypeAwardTypeThe 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.
currentUserPositionBadgeLeaderThe 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
}
QueryCompanyDetails1 pt

Fetch 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

NameTypeDescription
userIDOptional ID of a user to scope the company details response to that user's context.

Returns

FieldTypeDescription
nameStringThe display name of the company or learning instance.
subdomainStringThe subdomain identifier for the learning instance.
settingsAppearanceSettingsAppearance 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
}
QueryCompanyTranslations1 pt

Fetch 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

NameTypeDescription
namespaceTranslationNamespace!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

FieldTypeDescription
idID!A unique identifier for the translation set entry.
langString!The BCP 47 language code for this set of translations (e.g., `en`, `fr`, `de`).
translationsJSON!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": {}
}
QueryCurrentUser1 pt

Fetch 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

FieldTypeDescription
idID!Unique identifier of the user.
emailStringUser's email address.
firstNameStringUser's first name.
lastNameStringUser's last name.
nameStringUser's full display name.
roleKeyStringThe 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.
activeLicenseLicenseThe 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.
clientClientThe primary client/organization this user belongs to.
disabledBoolean!Whether the user account is disabled.
mustVerifyEmailBoolean!Whether the user must verify their email before proceeding.
certificatesCountInt!Total number of certificates earned by the user.
completedCoursesCountInt!Number of courses the user has completed.
startedCoursesCountInt!Number of courses the user has started.
availableCoursesCountInt!Number of courses currently available to the user.
balanceFloatThe user's current credit balance.
customFieldsJSONArbitrary 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.

QueryLanguages1 pt

Fetch 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

FieldTypeDescription
idIDA unique identifier for the language record.
labelString!The human-readable display name of the language (e.g., "English", "French").
codeString!The BCP 47 language code for the language (e.g., `en`, `fr`).
selectorLabelStringAn optional label used in language-picker UI components, which may differ from the standard label.
isCustomBooleanIndicates 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
}
QueryLearningPathCurrentUserAwardTotals1 pt

Fetch 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

NameTypeDescription
slugSlug!The slug identifier of the learning path for which to retrieve the current user's award totals.

Returns

FieldTypeDescription
resourceAwardResourceThe resource (Course or LearningPath) from which the awards were earned. Use inline fragments to access type-specific fields.
resourceIdID!The ID of the resource from which awards were earned.
awardTypeAwardType!The type of award, including its label, icon, and dashboard visibility settings.
totalFloat!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.

QueryTermsAndConditions1 pt

Fetch 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

FieldTypeDescription
globalTermsStringThe 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"
}
QueryUserArchivedContent1 pt

Fetch 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

FieldTypeDescription
idID!Unique identifier of the content item.
titleStringDisplay title of the content item.
slugSlug!URL-friendly identifier for the content item.
kindContentKindThe type of content (e.g. course, webinar, learningPath).
statusStatusPublication status of the content.
descriptionStringFull description of the content item.
assetStringURL of the content's thumbnail or hero image.
priceInCentsIntPrice 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.
waitlistingEnabledBoolean!Whether waitlisting is enabled.
isActiveBoolean!Whether the content is currently active.
urlAbsoluteOrRelativeURLURL to the content detail page.
badgeUrlStringURL 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.

QueryUserArchives1 pt

Fetch 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

FieldTypeDescription
idID!Unique identifier of the archived content record.
nameStringDisplay name of the archived content.
resourceTypeStringThe type of resource that was archived (e.g., Course).
statusStringCurrent status of the archived record.
archivedAtDateTimestamp when the content was archived.
reinstatableBoolean!Whether the user can reinstate this archived content.
waitlistActiveBoolean!Whether a waitlist is currently active for this content.
userIDID of the user who archived the content.
resourceIDID of the archived content resource.
companyCompanyThe 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.

QueryUserCertificateFields1 pt

Fetch 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

FieldTypeDescription
idID!The unique identifier of the certificate field.
typeCertificateFieldType!The type of data this field represents on the certificate (e.g., `nameLabel`, `contentCompletionDate`, `awardLabel`, `identifier`).
labelString!The display label shown for this field on the certificate or transcript.
includeOnTranscriptBoolean!Whether this field is included when generating a learner transcript.
includeOnExternalCertificateBoolean!Whether this field is included on externally shareable certificates.
textStringStatic text content for fields of type `textLabel`.
awardTypeAwardTypeThe award type object associated with this field, populated when the field type is `awardLabel`.
awardTypeIdIDThe ID of the associated award type for `awardLabel` fields.
customFieldCustomFieldThe content custom field object associated with this certificate field, for `contentFieldLabel` types.
customFieldSlugSlugThe slug of the associated content custom field.
sessionCustomContentFieldSlugSlugThe slug of the session-level custom content field associated with this certificate field.
userCustomFieldUserCustomFieldThe user custom field object associated with this certificate field, for `userFieldLabel` types.
userCustomFieldSlugSlugThe slug of the associated user custom field.
identifierPrefixStringAn optional prefix string prepended to generated certificate identifier values.
identifierBodyLengthIntThe character length of the randomly generated body portion of a certificate identifier.
hasIdentifierPrefixBooleanIndicates whether this identifier field uses a prefix.
dateFormatCertificateDateFormatTypeThe 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.

QueryUserCertificates1 pt

Fetch 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

NameTypeDescription
queryStringAn optional search string to filter certificates, for example by resource title.
includeExpiredCertificatesBooleanWhen set to `true`, expired certificates are included in the results. Defaults to `false`.

Returns

FieldTypeDescription
idID!Unique identifier of the certificate.
certificateTemplateCertificateTemplateThe template used to generate this certificate, including design and expiration configuration.
userUser!The user who earned or was granted this certificate.
issuedAtDate!The date and time the certificate was issued.
urlAbsoluteOrRelativeURL!The URL where the certificate can be viewed.
pdfAssetAbsoluteOrRelativeURLA direct URL to the PDF version of the certificate, if available.
resourceCertificateResourceThe course or learning path this certificate was issued for.
resourceTypeCertificateResourceTypeIndicates whether the resource is a `course` or `learningPath`.
resourceTypeLabelStringA human-readable label for the resource type.
resourceIdIDThe ID of the course or learning path this certificate is associated with.
progressWasResetBoolean!Whether the user's progress was reset as part of a recertification cycle.
expirationDateDateThe date on which this certificate expires, if applicable.
didExpireBoolean!Whether the certificate has passed its expiration date.
deletedBoolean!Whether the certificate record has been soft-deleted.
recertificationDateDateThe date by which the user should recertify, if applicable.
isExpiredBoolean!Whether the certificate is currently expired.
sourceStringThe source system or integration that generated the certificate.
contentItemContentThe content item associated with this certificate, providing catalog-level metadata.
isExternalBoolean!Whether the certificate was issued by an external system.
externalResourceTitleStringThe title of the external resource associated with the certificate, if applicable.
identifierStringAn 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"
}
QueryUserContentGroups1 pt

Fetch 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

NameTypeDescription
queryStringThis 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
includeExpiredCertificatesBooleanWhen true, expired certificates are included in the certificates group count. Defaults to false.

Returns

FieldTypeDescription
kindContentGroupKind!The category of content group (e.g., contentItems, certificates, learningPaths).
countInt!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
}
QueryUserContentItems3 pts

Fetch 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

NameTypeDescription
queryStringThis 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!]Filters results to only include content of the specified kinds (e.g., `course`, `learningPath`).
sortColumnSortColumnThe field by which results should be sorted.
sortDirectionSortDirectionThe direction of the sort, either ascending or descending.
sortdeprecatedStringA raw sort string for advanced sorting scenarios.

Returns

FieldTypeDescription
idID!Unique identifier of the content item.
titleStringDisplay title of the content item.
slugSlug!URL-friendly slug for the content item.
kindContentKindThe type of content (e.g., course, learningPath, webinar).
statusStatusPublication status of the content item.
availabilityStatusStringA human-readable string describing the content's current availability.
assetStringURL of the content item's thumbnail or cover image.
priceInCentsIntPrice of the content item in the smallest currency unit (e.g., cents).
isActiveBoolean!Whether the content item is currently active and accessible.
tags[Tag]Tags associated with this content item.
currentUserDueDateDateThe 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.

QueryUserCourseAwardCounts1 pt

Fetch 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

NameTypeDescription
courseIdID!The unique ID of the course for which to retrieve the current user's award counts.

Returns

FieldTypeDescription
idID!The unique identifier of the award type.
labelStringThe display name of the award type (e.g., 'CPE Credits', 'Certificate').
iconAwardTypeIconThe icon identifier used to visually represent this award type.
countIntThe 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.

QueryUserCourseCollaborations1 pt

Fetch 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

NameTypeDescription
courseIdID!The unique ID of the course for which to retrieve the current user's collaboration count.

Returns

FieldTypeDescription
UserCourseCollaborationsInt!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.

QueryUserEarnedBadgeBoard1 pt

Fetch 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

FieldTypeDescription
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.

QueryUserRecentContent4 pts

Fetch 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

NameTypeDescription
limitIntThe maximum number of recently viewed content items to return. Regardless of this value, at most 25 items will be returned.

Returns

FieldTypeDescription
idID!Unique identifier of the content item.
titleStringDisplay title of the content item.
slugSlug!URL-friendly slug for the content item.
kindContentKindThe type of content (e.g., course, learningPath, webinar).
assetStringURL of the content item's thumbnail or cover image.
availabilityStatusStringA human-readable string describing the content's current availability.
isActiveBoolean!Whether the content item is currently active and accessible.
urlAbsoluteOrRelativeURLThe URL to navigate to this content item.
currentUserDueDateDateThe 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.

QueryUserWaitlist1 pt

Fetch 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

FieldTypeDescription
idID!Unique identifier of the content item.
titleStringDisplay title of the content item.
slugSlug!URL-friendly identifier for the content item.
kindContentKindThe type of content (e.g. course, webinar, learningPath).
waitlistCountIntNumber of users currently on the waitlist for this content.
seatsLimitIntMaximum number of seats available for this content.
waitlistingEnabledBoolean!Whether waitlisting is enabled for this content.
waitlistingTriggeredBoolean!Whether the waitlist has been activated (i.e., seats are full).
statusStatusPublication status of the content (e.g. published, draft).
urlAbsoluteOrRelativeURLURL to the content detail page.
courseStartDateDateDate on which the course begins.
enrollmentStartDateDateDate on which enrollment opens.
ribbonRibbonOptional ribbon label and color displayed on the content card.
prices[ItemPrice!]Pricing information for the content across currencies.
locationLocationPhysical 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.

MutationCreateCertificateFromUpload1 pt

Create 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

NameTypeDescription
assetURL!The publicly accessible URL of the uploaded image to use as the certificate asset.
certificateUploadFields[CertificateUploadField!]An optional list of field mappings that define additional metadata or label values to associate with the uploaded certificate image.

Returns

FieldTypeDescription
idID!Unique identifier for the newly created certificate.
certificateTemplateCertificateTemplateThe certificate template associated with this certificate, including layout, expiration, and recertification settings.
userUser!The user to whom the certificate was issued.
issuedAtDate!The date on which the certificate was issued.
urlAbsoluteOrRelativeURL!The URL where the certificate can be viewed.
pdfAssetAbsoluteOrRelativeURLURL to the PDF version of the certificate, if available.
resourceCertificateResourceThe course or learning path resource associated with this certificate.
resourceTypeCertificateResourceTypeWhether the certificate is associated with a `course` or `learningPath`.
resourceTypeLabelStringHuman-readable label for the resource type.
resourceIdIDThe ID of the associated course or learning path resource.
progressWasResetBoolean!Indicates whether the user's progress was reset as part of recertification.
expirationDateDateThe date on which this certificate expires, if applicable.
didExpireBoolean!Indicates whether the certificate has already expired.
deletedBoolean!Indicates whether the certificate has been deleted.
recertificationDateDateThe date by which the user must recertify, if applicable.
isExpiredBoolean!Indicates whether the certificate is currently in an expired state.
sourceStringThe source or origin of the certificate (e.g., 'upload').
contentItemContentThe content catalog item associated with this certificate.
isExternalBoolean!Indicates whether the certificate was issued for an external resource.
externalResourceTitleStringTitle of the external resource, when `isExternal` is true.
identifierStringA 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.

MutationCreateLearner1 pt

Create 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

NameTypeDescription
emailString!The email address for the new learner account. Must be unique within the learning instance.
firstNameString!The learner's first name.
lastNameString!The learner's last name.
clientIdIDThe ID of the client (tenant) to associate the new learner with. If omitted, the learner is created under the default client.
licenseIds[ID!]An optional list of license IDs to assign to the learner upon creation.

Returns

FieldTypeDescription
idID!The unique identifier of the newly created user.
emailStringThe learner's email address.
firstNameStringThe learner's first name.
lastNameStringThe learner's last name.
nameStringThe learner's full display name.
abbreviatedNameStringA shortened version of the learner's name.
assetStringURL of the learner's profile image.
bioStringThe learner's biography or profile description.
createdAtDateTimestamp when the learner account was created.
updatedAtDateTimestamp when the learner account was last updated.
disabledBoolean!Whether the learner's account is currently disabled.
mustVerifyEmailBoolean!Whether the learner must verify their email before accessing content.
clientClientThe client (tenant) the learner is associated with.
clientIdIDThe ID of the client the learner belongs to.
activeLicenseLicenseThe 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.
certificatesCountInt!Total number of certificates earned by the learner.
completedCoursesCountInt!Number of courses the learner has completed.
startedCoursesCountInt!Number of courses the learner has started.
availableCoursesCountInt!Number of courses currently available to the learner.
collaborationsCountInt!Number of collaborations the learner is part of.
roleKeyStringThe learner's role key within the platform.
customFieldsJSONAny custom metadata fields associated with the learner.
langStringThe learner's preferred language code.
preferredCurrencyStringThe 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.

MutationCreateLearners1 pt

Create 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

NameTypeDescription
learners[LearnerInput!]!An array of learner input objects containing the profile data for each user to be created.

Returns

FieldTypeDescription
idID!The unique identifier for the newly created user.
emailStringThe user's email address.
firstNameStringThe user's first name.
lastNameStringThe user's last name.
nameStringThe user's full display name.
abbreviatedNameStringAn abbreviated form of the user's name.
assetStringURL of the user's profile avatar image.
lastActiveAtDateTimestamp of the user's most recent activity.
bioStringThe user's biographical text.
twoFactorEnabledBooleanWhether two-factor authentication is enabled for the user.
firstInitialStringThe first initial of the user's first name.
lastInitialStringThe first initial of the user's last name.
invitedByNameStringName of the user who invited this learner.
shouldHighlightBoolean!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.
activeLicenseLicenseThe 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.
roleKeyStringThe key identifying the user's role within the system.
address1StringPrimary street address line.
address2StringSecondary street address line.
cityStringCity of the user's address.
stateStringState or province of the user's address.
zipCodeStringPostal/ZIP code of the user's address.
countryStringCountry of the user's address.
telephoneStringThe user's phone number.
stripeCustomerIdIDThe Stripe customer ID associated with this user.
externalCustomerIdIDAn external system customer ID linked to this user.
createdAtDateTimestamp when the user account was created.
updatedAtDateTimestamp when the user account was last updated.
sfAccountIdIDSalesforce Account ID linked to this user.
sfContactIdIDSalesforce Contact ID linked to this user.
shippingNameStringName to use for physical shipping.
clientClientThe client organization this user belongs to.
clientIdIDThe ID of the client organization this user belongs to.
ref1StringCustom reference field 1 for external system mapping.
ref2StringCustom reference field 2 for external system mapping.
ref3StringCustom reference field 3 for external system mapping.
ref4StringCustom reference field 4 for external system mapping.
ref5StringCustom reference field 5 for external system mapping.
ref6StringCustom reference field 6 for external system mapping.
ref7StringCustom reference field 7 for external system mapping.
ref8StringCustom reference field 8 for external system mapping.
ref9StringCustom reference field 9 for external system mapping.
ref10StringCustom reference field 10 for external system mapping.
langStringThe user's preferred interface language code.
preferredCurrencyStringThe user's preferred currency code for pricing.
customFieldsJSONArbitrary 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.
disabledBoolean!Whether the user account is currently disabled.
learnerUserIdIDID of the associated learner-role user record.
managerUserIdIDID of the associated manager-role user record.
balanceFloatThe user's current credit balance.
mustVerifyEmailBoolean!Whether the user must verify their email before proceeding.
certificatesCountInt!Total number of certificates the user has earned.
collaborationsCountInt!Total number of collaborations the user is part of.
availableCoursesCountInt!Number of courses available to the user.
startedCoursesCountInt!Number of courses the user has started.
completedCoursesCountInt!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.

MutationLogin1 pt

Log 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

NameTypeDescription
emailString!The email of the Current User attempting to log in.
passwordString!The password of the Current User attempting to log in.

Returns

FieldTypeDescription
LoginString!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.

MutationLogout1 pt

Log 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

FieldTypeDescription
LogoutBoolean!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.

MutationRedeemBalance1 pt

Redeem 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

NameTypeDescription
contentTypeBalanceContentType!Currently only available for `courses`
contentIdUUID!The UUID of the content item to redeem the user's balance against.

Returns

FieldTypeDescription
RedeemBalanceAbsoluteOrRelativeURLA 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.

MutationRedeemRegistrationAndRedemptionCodes1 pt

Redeem 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

NameTypeDescription
validatedRedemptionCodes[String!]!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

FieldTypeDescription
redeemedBoolean!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.

MutationSelectCurrentUserActiveLicense1 pt

Select 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

NameTypeDescription
licenseIdID!The ID of the License that should be set to 'active' for the CurrentUser.

Returns

FieldTypeDescription
SelectCurrentUserActiveLicenseBoolean!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
  }
}
MutationUnenrollFromWaitlist1 pt

Unenroll 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

NameTypeDescription
idID!The ID of the content item (e.g., a course) from whose waitlist the current user should be removed.

Returns

FieldTypeDescription
BooleanBoolean!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
  }
}
MutationValidateRedemptionCode1 pt

Validate 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

NameTypeDescription
codeString!The redemption code string to validate.

Returns

FieldTypeDescription
validBoolean!Whether the redemption code is currently valid and eligible to be redeemed.
alreadyRedeemedBoolean!Whether the redemption code has already been used.
codeExpiredBoolean!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.

MutationValidateRegistrationCode1 pt

Validate 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

NameTypeDescription
codeString!The registration code string to validate.

Returns

FieldTypeDescription
validBoolean!Whether the registration code is currently valid and eligible to be redeemed.
alreadyRedeemedBoolean!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.