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[]NobodySKUs of licenses to assign to the user with the student role.
managerLicenseSkusstring[]NobodySKUs of licenses to assign to the user with the manager role.
studentLicenseIdsuuid[]NobodyUUIDs of licenses to assign to the user with the student role.
managerLicenseIdsuuid[]NobodyUUIDs 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[]NobodyUUIDs of courses to grant the user access to.
courseSlugsstring[]NobodyURL slugs of courses to grant the user access to.
courseSkusstring[]NobodySKUs of courses to grant the user access to.
bundleSlugsstring[]NobodyURL slugs of bundles to grant the user access to.
learningPathSlugsstring[]NobodyURL slugs of learning paths to grant the user access to.
learningPathSkusstring[]NobodySKUs of learning paths to grant the user access to.
learningPathIdsuuid[]NobodyUUIDs 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

{
  "id": "00000000-0000-0000-0000-000000000000",
  "learnerUserId": "00000000-0000-0000-0000-000000000000",
  "managerUserId": "00000000-0000-0000-0000-000000000000",
  "clientId": "00000000-0000-0000-0000-000000000000",
  "createdAt": "2024-01-01T00:00:00.000Z",
  "disabled": true,
  "sfAccountId": "00000000-0000-0000-0000-000000000000",
  "sfContactId": "00000000-0000-0000-0000-000000000000",
  "roleKey": "string",
  "address1": "string",
  "address2": "string",
  "city": "string",
  "state": "string",
  "zipCode": "string",
  "telephone": "string",
  "country": "string",
  "stripeCustomerId": "00000000-0000-0000-0000-000000000000",
  "externalCustomerId": "string",
  "shippingName": "string",
  "asset": "string",
  "email": "string",
  "firstName": "string",
  "lastName": "string",
  "lastActiveAt": "2024-01-01T00:00:00.000Z",
  "ref1": "string",
  "ref2": "string",
  "ref3": "string",
  "ref4": "string",
  "ref5": "string",
  "ref6": "string",
  "ref7": "string",
  "ref8": "string",
  "ref9": "string",
  "ref10": "string",
  "language": "string",
  "customFields": {},
  "purchasedBundles": [
    {
      "bundleId": "00000000-0000-0000-0000-000000000000"
    }
  ],
  "allocatedLicenses": [
    {
      "licenseId": "00000000-0000-0000-0000-000000000000"
    }
  ],
  "allocatedLearningPaths": [
    {
      "learningPathId": "00000000-0000-0000-0000-000000000000",
      "status": "string"
    }
  ],
  "purchasedCourses": [
    {
      "courseId": "00000000-0000-0000-0000-000000000000",
      "status": "string"
    }
  ],
  "waitlistedCourses": [
    {
      "courseId": "00000000-0000-0000-0000-000000000000"
    }
  ],
  "balance": 0,
  "preferredCurrency": "string"
}

Response fields

FieldTypeDescription
iduuidUnique identifier of the user.
learnerUserIduuidIdentifier of the associated learner user record, when the user has a dual role.
managerUserIduuidIdentifier of the associated manager user record, when the user has a dual role.
clientIduuidIdentifier of the client (tenant) the user belongs to.
createdAtISO 8601 timestampTimestamp when the user was created.
disabledbooleanWhether the user account is disabled.
sfAccountIduuidSalesforce Account ID associated with the user.
sfContactIduuidSalesforce Contact ID associated with the user.
roleKeystringPlatform role key assigned to the user.
address1stringPrimary street address line.
address2stringSecondary street address line.
citystringCity component of the address.
statestringState or province component of the address.
zipCodestringPostal code component of the address.
telephonestringUser's phone number.
countrystringCountry component of the address.
stripeCustomerIduuidStripe customer identifier for the user.
externalCustomerIdstringIdentifier for the user in an external system.
shippingNamestringName used for shipping physical goods.
assetstringURL of the user's avatar asset.
emailstringUser's email address.
firstNamestringUser's first name.
lastNamestringUser's last name.
lastActiveAtISO 8601 timestampTimestamp of the last recorded user activity.
ref1stringCustom reference field 1 for storing arbitrary external data.
ref2stringCustom reference field 2 for storing arbitrary external data.
ref3stringCustom reference field 3 for storing arbitrary external data.
ref4stringCustom reference field 4 for storing arbitrary external data.
ref5stringCustom reference field 5 for storing arbitrary external data.
ref6stringCustom reference field 6 for storing arbitrary external data.
ref7stringCustom reference field 7 for storing arbitrary external data.
ref8stringCustom reference field 8 for storing arbitrary external data.
ref9stringCustom reference field 9 for storing arbitrary external data.
ref10stringCustom reference field 10 for storing arbitrary external data.
languagestringUser's preferred language (BCP 47 tag). Null for non-learner roles.
customFieldsobjectKey-value pairs for custom profile fields defined on the client.
purchasedBundlesobject[]Bundles the user has purchased.
purchasedBundles.bundleIduuidIdentifier of the purchased bundle.
allocatedLicensesobject[]Licenses allocated to the user.
allocatedLicenses.licenseIduuidIdentifier of the allocated license.
allocatedLearningPathsobject[]Learning paths allocated to the user.
allocatedLearningPaths.learningPathIduuidIdentifier of the allocated learning path.
allocatedLearningPaths.statusstringStatus of the learning path allocation.
purchasedCoursesobject[]Courses the user has purchased.
purchasedCourses.courseIduuidIdentifier of the purchased course.
purchasedCourses.statusstringEnrollment status for the course.
waitlistedCoursesobject[]Courses the user is waitlisted for.
waitlistedCourses.courseIduuidIdentifier of the waitlisted course.
balancenumberUser's current credit balance.
preferredCurrencystringUser's preferred display currency (ISO 4217).