Skip to main content

CreateLearners

Creates multiple learners within the learning instance. The results of this mutation can be affected by providing an authToken header to set a user for the operation.

CreateLearners(
learners: [LearnerInput!]!
): [User]!

Directives

authAccess

This requires the current user to be in MANAGER role.

Arguments

CreateLearners.learners ● [LearnerInput!]! non-null input

Type

User object

Examples

Run in Postman

Query:

CreateLearners($learners: [LearnerInput!]!) {
CreateLearners(learners: $learners) {
id
email
firstName
abbreviatedName
asset
lastName
name
lastActiveAt
bio
twoFactorEnabled
lastInitial
invitedByName
shouldHighlight
purchasedCourses {
...PurchasedCourseFragment
}
purchasedBundles {
...PurchasedBundleFragment
}
activeLicense {
...LicenseFragment
}
allocatedLicenses {
...AllocatedLicenseFragment
}
allocatedLearningPaths {
...AllocatedLearningPathFragment
}
attendedMeetings {
...UserAttendedMeetingFragment
}
waitlistedCourses {
...WaitlistedCourseFragment
}
adminClients {
...ClientFragment
}
roleKey
address1
address2
city
state
zipCode
country
telephone
stripeCustomerId
externalCustomerId
createdAt
updatedAt
sfAccountId
sfContactId
shippingName
client {
...ClientFragment
}
clientId
ref1
ref2
ref3
ref4
ref5
ref6
ref7
ref8
ref9
ref10
lang
customFields
recommendedTags {
...UserRecommendedTagFragment
}
recommendedSlugs {
...UserRecommendedSlugFragment
}
accessedFlows
disabled
learnerUserId
managerUserId
balance
mustVerifyEmail
certificatesCount
collaborationsCount
availableCoursesCount
startedCoursesCount
completedCoursesCount
}
}

Variables:

{
"learners": [
"LearnerInput"
]
}

Response:

{
"data": {
"CreateLearners": [
{
"id": "58ccb96c-8e90-4464-86e0-f284442981df",
"email": "xyz789",
"firstName": "abc123",
"abbreviatedName": "abc123",
"asset": "abc123",
"lastName": "xyz789",
"name": "xyz789",
"lastActiveAt": "2023-12-20T16:58:58.782Z",
"bio": "abc123",
"twoFactorEnabled": false,
"lastInitial": "abc123",
"invitedByName": "xyz789",
"shouldHighlight": true,
"purchasedCourses": [
"PurchasedCourse"
],
"purchasedBundles": [
"PurchasedBundle"
],
"activeLicense": "License",
"allocatedLicenses": [
"AllocatedLicense"
],
"allocatedLearningPaths": [
"AllocatedLearningPath"
],
"attendedMeetings": [
"UserAttendedMeeting"
],
"waitlistedCourses": [
"WaitlistedCourse"
],
"adminClients": [
"Client"
],
"roleKey": "abc123",
"address1": "xyz789",
"address2": "xyz789",
"city": "abc123",
"state": "xyz789",
"zipCode": "abc123",
"country": "xyz789",
"telephone": "abc123",
"stripeCustomerId": "58ccb96c-8e90-4464-86e0-f284442981df",
"externalCustomerId": "58ccb96c-8e90-4464-86e0-f284442981df",
"createdAt": "2024-06-20T16:58:58.782Z",
"updatedAt": "2024-06-20T16:58:58.782Z",
"sfAccountId": "58ccb96c-8e90-4464-86e0-f284442981df",
"sfContactId": "58ccb96c-8e90-4464-86e0-f284442981df",
"shippingName": "xyz789",
"client": "Client",
"clientId": "58ccb96c-8e90-4464-86e0-f284442981df",
"ref1": "abc123",
"ref2": "abc123",
"ref3": "xyz789",
"ref4": "xyz789",
"ref5": "xyz789",
"ref6": "xyz789",
"ref7": "xyz789",
"ref8": "xyz789",
"ref9": "abc123",
"ref10": "xyz789",
"lang": "abc123",
"customFields": "{}",
"recommendedTags": [
"UserRecommendedTag"
],
"recommendedSlugs": [
"UserRecommendedSlug"
],
"accessedFlows": [
"xyz789"
],
"disabled": true,
"learnerUserId": "58ccb96c-8e90-4464-86e0-f284442981df",
"managerUserId": "58ccb96c-8e90-4464-86e0-f284442981df",
"balance": 236.56,
"mustVerifyEmail": true,
"certificatesCount": 678,
"collaborationsCount": 678,
"availableCoursesCount": 678,
"startedCoursesCount": 678,
"completedCoursesCount": 678
}
]
}
}