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.
POST
https://example.thoughtindustries.com/incoming/v2/usersExample 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
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
email | string | No | body | Email address for the new user account. |
upsert | boolean | No | body | When true, updates the existing user if one with the given email already exists instead of returning an error. |
externalCustomerId | string | No | body | Identifier for the user in an external system. |
studentLicenseSkus | string[] | Yes | body | SKUs of licenses to assign to the user with the student role. |
managerLicenseSkus | string[] | Yes | body | SKUs of licenses to assign to the user with the manager role. |
studentLicenseIds | uuid[] | Yes | body | UUIDs of licenses to assign to the user with the student role. |
managerLicenseIds | uuid[] | Yes | body | UUIDs of licenses to assign to the user with the manager role. |
role | string | No | body | Platform-level role to assign to the user (e.g., admin, learner). |
clientSku | string | No | body | SKU of the client (tenant) to associate with the user. |
clientSlug | string | No | body | URL slug of the client (tenant) to associate with the user. |
clientId | uuid | No | body | UUID of the client (tenant) to associate with the user. |
replaceLicenseAccess | boolean | No | body | When true, replaces the user's existing license assignments with those provided in this request. |
courseIds | uuid[] | Yes | body | UUIDs of courses to grant the user access to. |
courseSlugs | string[] | Yes | body | URL slugs of courses to grant the user access to. |
courseSkus | string[] | Yes | body | SKUs of courses to grant the user access to. |
bundleSlugs | string[] | Yes | body | URL slugs of bundles to grant the user access to. |
learningPathSlugs | string[] | Yes | body | URL slugs of learning paths to grant the user access to. |
learningPathSkus | string[] | Yes | body | SKUs of learning paths to grant the user access to. |
learningPathIds | uuid[] | Yes | body | UUIDs of learning paths to grant the user access to. |
firstName | string | No | body | User's first name. |
lastName | string | No | body | User's last name. |
address1 | string | No | body | Primary street address line for the user. |
address2 | string | No | body | Secondary street address line (e.g., apartment or suite number) for the user. |
city | string | No | body | City component of the user's address. |
state | string | No | body | State or province component of the user's address. |
zipCode | string | No | body | Postal code component of the user's address. |
country | string | No | body | Country component of the user's address. |
telephone | string | No | body | User's phone number. |
ref1 | string | No | body | Custom reference field 1 for storing arbitrary external data. |
ref2 | string | No | body | Custom reference field 2 for storing arbitrary external data. |
ref3 | string | No | body | Custom reference field 3 for storing arbitrary external data. |
ref4 | string | No | body | Custom reference field 4 for storing arbitrary external data. |
ref5 | string | No | body | Custom reference field 5 for storing arbitrary external data. |
ref6 | string | No | body | Custom reference field 6 for storing arbitrary external data. |
ref7 | string | No | body | Custom reference field 7 for storing arbitrary external data. |
ref8 | string | No | body | Custom reference field 8 for storing arbitrary external data. |
ref9 | string | No | body | Custom reference field 9 for storing arbitrary external data. |
ref10 | string | No | body | Custom reference field 10 for storing arbitrary external data. |
language | string | No | body | Preferred language for the user interface, as a BCP 47 language tag (e.g., en, fr). |
tieredSubscription | boolean | No | body | When true, enrolls the user under a tiered subscription plan. |
replaceCourseAccess | boolean | No | body | When true, replaces the user's existing course access with the courses provided in this request. |
replaceLearningPathAccess | boolean | No | body | When true, replaces the user's existing learning path access with the learning paths provided in this request. |
replaceBundleAccess | boolean | No | body | When true, replaces the user's existing bundle access with the bundles provided in this request. |
customFields | object | No | body | Key-value pairs for any custom profile fields defined on the client. |
sfContactId | uuid | No | body | Salesforce Contact ID to associate with this user. |
sfAccountId | uuid | No | body | Salesforce Account ID to associate with this user. |
sendInvite | boolean | No | body | When true, sends an invitation email to the user after account creation. |
inviteMessage | string | No | body | Custom message body included in the invitation email when sendInvite is true. |
balance | number | No | body | Initial credit balance to assign to the user, in the client's configured credit units. |
enforceAccessDays | boolean | No | body | When true, enforces the access-day limit defined on the assigned license or content. |
preferredCurrency | string | No | body | ISO 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": [