Skip to main content
https://.thoughtindustries.com

Users

Creates a new user account, optionally upserting by email and granting access to licenses, courses, bundles, and learning paths in a single request

Creates a new user account, optionally upserting by email and granting access to licenses, courses, bundles, and learning paths in a single request.

POSThttps://example.thoughtindustries.com/incoming/v2/users

Example request

curl -X POST "https://example.thoughtindustries.com/incoming/v2/users" \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "string",
  "upsert": true,
  "externalCustomerId": "string",
  "studentLicenseSkus": []
}'

Parameters

NameTypeRequiredLocationDescription
emailstringNobodyEmail address for the new user account.
upsertbooleanNobodyWhen true, updates the existing user if one with the given email already exists instead of returning an error.
externalCustomerIdstringNobodyIdentifier for the user in an external system.
studentLicenseSkusstring[]YesbodySKUs of licenses to assign to the user with the student role.
managerLicenseSkusstring[]YesbodySKUs of licenses to assign to the user with the manager role.
studentLicenseIdsuuid[]YesbodyUUIDs of licenses to assign to the user with the student role.
managerLicenseIdsuuid[]YesbodyUUIDs of licenses to assign to the user with the manager role.
rolestringNobodyPlatform-level role to assign to the user (e.g., admin, learner).
clientSkustringNobodySKU of the client (tenant) to associate with the user.
clientSlugstringNobodyURL slug of the client (tenant) to associate with the user.
clientIduuidNobodyUUID of the client (tenant) to associate with the user.
replaceLicenseAccessbooleanNobodyWhen true, replaces the user's existing license assignments with those provided in this request.
courseIdsuuid[]YesbodyUUIDs of courses to grant the user access to.
courseSlugsstring[]YesbodyURL slugs of courses to grant the user access to.
courseSkusstring[]YesbodySKUs of courses to grant the user access to.
bundleSlugsstring[]YesbodyURL slugs of bundles to grant the user access to.
learningPathSlugsstring[]YesbodyURL slugs of learning paths to grant the user access to.
learningPathSkusstring[]YesbodySKUs of learning paths to grant the user access to.
learningPathIdsuuid[]YesbodyUUIDs of learning paths to grant the user access to.
firstNamestringNobodyUser's first name.
lastNamestringNobodyUser's last name.
address1stringNobodyPrimary street address line for the user.
address2stringNobodySecondary street address line (e.g., apartment or suite number) for the user.
citystringNobodyCity component of the user's address.
statestringNobodyState or province component of the user's address.
zipCodestringNobodyPostal code component of the user's address.
countrystringNobodyCountry component of the user's address.
telephonestringNobodyUser's phone number.
ref1stringNobodyCustom reference field 1 for storing arbitrary external data.
ref2stringNobodyCustom reference field 2 for storing arbitrary external data.
ref3stringNobodyCustom reference field 3 for storing arbitrary external data.
ref4stringNobodyCustom reference field 4 for storing arbitrary external data.
ref5stringNobodyCustom reference field 5 for storing arbitrary external data.
ref6stringNobodyCustom reference field 6 for storing arbitrary external data.
ref7stringNobodyCustom reference field 7 for storing arbitrary external data.
ref8stringNobodyCustom reference field 8 for storing arbitrary external data.
ref9stringNobodyCustom reference field 9 for storing arbitrary external data.
ref10stringNobodyCustom reference field 10 for storing arbitrary external data.
languagestringNobodyPreferred language for the user interface, as a BCP 47 language tag (e.g., en, fr).
tieredSubscriptionbooleanNobodyWhen true, enrolls the user under a tiered subscription plan.
replaceCourseAccessbooleanNobodyWhen true, replaces the user's existing course access with the courses provided in this request.
replaceLearningPathAccessbooleanNobodyWhen true, replaces the user's existing learning path access with the learning paths provided in this request.
replaceBundleAccessbooleanNobodyWhen true, replaces the user's existing bundle access with the bundles provided in this request.
customFieldsobjectNobodyKey-value pairs for any custom profile fields defined on the client.
sfContactIduuidNobodySalesforce Contact ID to associate with this user.
sfAccountIduuidNobodySalesforce Account ID to associate with this user.
sendInvitebooleanNobodyWhen true, sends an invitation email to the user after account creation.
inviteMessagestringNobodyCustom message body included in the invitation email when sendInvite is true.
balancenumberNobodyInitial credit balance to assign to the user, in the client's configured credit units.
enforceAccessDaysbooleanNobodyWhen true, enforces the access-day limit defined on the assigned license or content.
preferredCurrencystringNobodyISO 4217 currency code representing the user's preferred display currency (e.g., USD, EUR).

Example response

{
  "data": {
    "APICreateUser": {
      "id": "00000000-0000-0000-0000-000000000000",
      "email": "string",
      "firstName": "string",
      "abbreviatedName": "string",
      "asset": "string",
      "lastName": "string",
      "name": "string",
      "lastActiveAt": "2024-01-01T00:00:00.000Z",
      "bio": "string",
      "twoFactorEnabled": true,
      "firstInitial": "string",
      "lastInitial": "string",
      "invitedByName": "string",
      "shouldHighlight": true,
      "purchasedCourses": [
        {
          "course": {
            "id": "00000000-0000-0000-0000-000000000000",
            "createdAt": "2024-01-01T00:00:00.000Z",
            "updatedAt": "2024-01-01T00:00:00.000Z",
            "slug": "example-slug",
            "status": "draft",
            "title": "string",
            "sessionIsTitled": true,
            "sampleLesson": {
              "...": "..."
            },
            "sampleLessonId": "00000000-0000-0000-0000-000000000000",
            "sections": [
              {
                "...": "..."
              }
            ],
            "appearanceBlock": "00000000-0000-0000-0000-000000000000",
            "appearanceHash": "string",
            "paywallsBlock": "00000000-0000-0000-0000-000000000000",
            "termsBlock": "00000000-0000-0000-0000-000000000000",
            "confirmationBlock": "00000000-0000-0000-0000-000000000000",
            "courseStartDate": "2024-01-01T00:00:00.000Z",
            "courseEndDate": "2024-01-01T00:00:00.000Z",
            "enrollmentStartDate": "2024-01-01T00:00:00.000Z",
            "enrollmentEndDate": "2024-01-01T00:00:00.000Z",
            "gracePeriodEndDate": "2024-01-01T00:00:00.000Z",
            "seatsLimit": 0,
            "waitlistCount": 0,
            "seatsLimitMet": true,
            "waitlistingEnabled": true,
            "waitlistingTriggered": true,
            "taxable": true,
            "purchasable": true,
            "taxCategory": "00000000-0000-0000-0000-000000000000",
            "fulfillmentCenter": "00000000-0000-0000-0000-000000000000",
            "courseGroup": {
              "...": "..."
            },
            "syllabusTitlesEnabled": true,
            "galleryEnabled": true,
            "workbookEnabled": true,
            "linkedWorkbookEnabled": true,
            "linkedWorkbookSkipEnabled": true,
            "superquizEnabled": true,
            "discussionsEnabled": true,
            "resourcesEnabled": true,
            "meetingsOverviewEnabled": true,
            "recurrenceRule": "string",
            "recurrence": {},
            "readableRecurrenceString": "string",
            "instructorAccessEnabled": true,
            "instructorEmails": [
              "string"
            ],
            "freeWithRegistration": true,
            "priceInCents": 0,
            "instructorAccessPriceInCents": 0,
            "suggestedRetailPriceInCents": 0,
            "alternativePricingType": "membership",
            "alternativePricingRef": 0,
            "accessDays": 0,
            "showProgress": true,
            "annotationsEnabled": true,
            "forceLinearProgress": true,
            "completionTimePerPage": 0,
            "askLearnerPassword": true,
            "roster": true,
            "topicGroupId": "00000000-0000-0000-0000-000000000000",
            "sku": "string",
            "prerequisiteCourses": [
              {
                "...": "..."
              }
            ],
            "prerequisiteLearningPaths": [
              {
                "...": "..."
              }
            ],
            "parentCourseId": "00000000-0000-0000-0000-000000000000",
            "isChild": true,
            "hasMultipleCurrencies": true,
            "prices": [
              {
                "...": "..."
              }
            ],
            "enrollmentActive": true,
            "waitlistActive": true,
            "webinarDates": [
              {
                "...": "..."
              }
            ],
            "webinarTimeZone": "string",
            "meetings": [
              {
                "...": "..."
              }
            ],
            "inPersonEventInfo": {
              "...": "..."
            },
            "currentUserHasAccess": true,
            "location": {
              "...": "..."
            },
            "displayMap": true,
            "publishDate": "2024-01-01T00:00:00.000Z",
            "isActive": true,
            "futurePublishDate": "2024-01-01T00:00:00.000Z",
            "balanceRequirement": 0,
            "awardClaimingOptions": [
              {
                "...": "..."
              }
            ],
            "availabilityStatus": "string",
            "embeddedEnabled": true,
            "displayResults": true,
            "bulkPurchasingEnabled": true,
            "seatTiers": [
              {
                "...": "..."
              }
            ],
            "seatPackages": [
              {
                "...": "..."
              }
            ],
            "lastTierPriceInCents": 0,
            "webinarId": "string",
            "hasChildren": true,
            "customFields": {},
            "kind": "microCourse",
            "rosterSubmittedDate": "2024-01-01T00:00:00.000Z",
            "finalAssessment": "string",
            "scormCollectUserDetails": true,
            "seatsUsedCount": 0,
            "seatsAllocatedCount": 0,
            "webinarDetails": {
              "...": "..."
            },
            "showSyllabusWhileUnenrolled": true,
            "topicGroup": {
              "...": "..."
            },
            "courseGroupTitle": "string",
            "currentUserDueDate": "2024-01-01T00:00:00.000Z"
          },
          "courseId": "00000000-0000-0000-0000-000000000000",
          "certificate": "00000000-0000-0000-0000-000000000000",
          "certificateIssuedAt": "2024-01-01T00:00:00.000Z",
          "instructorAccessPurchased": true,
          "status": "string"
        }
      ],
      "purchasedBundles": [
        {
          "bundle": {
            "id": "00000000-0000-0000-0000-000000000000",
            "slug": "example-slug",
            "name": "string",
            "purchasable": true,
            "planId": "00000000-0000-0000-0000-000000000000",
            "variations": [
              {
                "...": "..."
              }
            ],
            "taxable": true,
            "needShippingAddress": true,
            "priceInCents": 0,
            "weight": 0,
            "annualPlanId": "00000000-0000-0000-0000-000000000000",
            "annualPriceInCents": 0
          },
          "bundleId": "00000000-0000-0000-0000-000000000000"
        }
      ],
      "activeLicense": {
        "id": "00000000-0000-0000-0000-000000000000",
        "name": "string",
        "label": "string",
        "sku": "string",
        "client": {
          "id": "00000000-0000-0000-0000-000000000000",
          "name": "string",
          "schoolName": "string",
          "courses": [
            {
              "...": "..."
            }
          ],
          "learningPaths": [
            {
              "...": "..."
            }
          ],
          "learningPathIds": [
            "00000000-0000-0000-0000-000000000000"
          ],
          "courseIds": [
            "00000000-0000-0000-0000-000000000000"
          ],
          "courseTags": [
            {
              "...": "..."
            }
          ],
          "courseTagIds": [