Start training enrollment for a customer
As a Reseller you can create and send a training enrollment for a customer's target users. The flow: get the customer's Company ID, find the training and target group, create the enrollment, and send it. Use a credential with Client Role = Reseller. Send X-KEEPNET-Company-Id with every request.
POST /api/companies/search
Get the customer's Company ID first. Use the
resourceIdfrom the response asX-KEEPNET-Company-Idin all subsequent requests. Test it: Authorize with Client ID/Secret, then Send — request body is pre-filled.
- : API
Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.
110CreateTimefalseIf true, only companies exceeding license limit are returned
falseOK
POST /api/companies/search HTTP/1.1
Host: api.keepnetlabs.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 126
{
"pageNumber": 1,
"pageSize": 10,
"orderBy": "CreateTime",
"ascending": false,
"filter": {
"Condition": "AND",
"SearchInputTextValue": ""
}
}OK
{
"data": {
"limitExceededCompanyCount": 1,
"pageNumber": 1,
"pageSize": 1,
"totalNumberOfPages": 1,
"totalNumberOfRecords": 1,
"results": [
{
"companyName": "text",
"companyResourceId": "text",
"resellerName": "text",
"industryName": "text",
"industryResourceId": "text",
"licenseTypeName": "text",
"licenseTypeResourceId": "text",
"isNumberOfUsersLimited": true,
"numberOfUsers": "text",
"privacyDurationId": 1,
"licenceExpired": true,
"licenseEndDate": "2026-01-01T00:00:00.000Z",
"createTime": "2026-01-01T00:00:00.000Z",
"targetUserCount": 1,
"children": [
{
"companyName": "text",
"companyResourceId": "text",
"resellerName": "text",
"industryName": "text",
"industryResourceId": "text",
"licenseTypeName": "text",
"licenseTypeResourceId": "text",
"isNumberOfUsersLimited": true,
"numberOfUsers": "text",
"privacyDurationId": 1,
"licenceExpired": true,
"licenseEndDate": "2026-01-01T00:00:00.000Z",
"createTime": "2026-01-01T00:00:00.000Z",
"targetUserCount": 1,
"children": "[Circular Reference]",
"tags": [
"text"
],
"deletedTargetUserCount": 1,
"inactiveTargetUserCount": 1,
"monthlyActiveUserCount": 1
}
],
"tags": [
"text"
],
"deletedTargetUserCount": 1,
"inactiveTargetUserCount": 1,
"monthlyActiveUserCount": 1
}
]
},
"status": "text",
"message": "text",
"validationMessages": [
"text"
]
}POST /api/trainings/search
List available trainings. Send
X-KEEPNET-Company-Id. Use theresourceIdof the desired training astrainingIdwhen creating the enrollment.
- : API
Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.
120NametrueOK
POST /api/trainings/search HTTP/1.1
Host: api.keepnetlabs.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 119
{
"pageNumber": 1,
"pageSize": 20,
"orderBy": "Name",
"ascending": true,
"filter": {
"Condition": "AND",
"SearchInputTextValue": ""
}
}OK
{
"data": {
"pageNumber": 1,
"pageSize": 1,
"totalNumberOfPages": 1,
"totalNumberOfRecords": 1,
"results": [
{
"tags": [
"text"
],
"languages": [
"text"
],
"compliances": [
"text"
],
"availableFor": [
"text"
],
"vendorName": "text",
"isNew": true,
"isFavourite": true,
"coverImage": {
"imageUrl": "text",
"name": "text"
},
"trainingRoles": [
{
"roleId": 1,
"code": "text",
"roleName": "text"
}
],
"trainingId": "text",
"trainingName": "text",
"description": "text",
"createdBy": "text",
"createTime": "2026-01-01T00:00:00.000Z",
"isEditable": true,
"category": "text",
"targetAudience": "text",
"type": "text",
"hasQuiz": true,
"duration": "text",
"level": "text"
}
]
},
"status": "text",
"message": "text",
"validationMessages": [
"text"
]
}POST /api/target-groups/search/current-company
List target groups available for the customer. Send
X-KEEPNET-Company-Id. Use one or moreresourceIdvalues astargetGroupResourceIdsin the enrollment.
- : API
Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.
120NametrueOK
POST /api/target-groups/search/current-company HTTP/1.1
Host: api.keepnetlabs.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 119
{
"pageNumber": 1,
"pageSize": 20,
"orderBy": "Name",
"ascending": true,
"filter": {
"Condition": "AND",
"SearchInputTextValue": ""
}
}OK
{
"data": {
"pageNumber": 1,
"pageSize": 1,
"totalNumberOfPages": 1,
"totalNumberOfRecords": 1,
"results": [
{
"resourceId": "text",
"name": "text",
"companyName": "text",
"userCount": 1,
"priority": "text",
"createTime": "2026-01-01T00:00:00.000Z",
"updateTime": "2026-01-01T00:00:00.000Z"
}
]
},
"status": "text",
"message": "text",
"validationMessages": [
"text"
]
}GET /api/enrollments/form-details
Returns dropdown data (enrollment types, certificate options, reminder config, etc.) needed to build the enrollment create request. Send
X-KEEPNET-Company-Id.
- : API
Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.
OK
GET /api/enrollments/form-details HTTP/1.1
Host: api.keepnetlabs.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
OK
{
"data": {
"enumNameValuePairs": {
"ANY_ADDITIONAL_PROPERTY": [
{
"id": 1,
"name": "text",
"displayName": "text",
"enumResults": [
"[Circular Reference]"
]
}
]
},
"trainingEmailNotificationTemplateTypeResourceId": "text",
"reminderEmailNotificationTemplateTypeResourceId": "text",
"learningPathEmailNotificationTemplateTypeResourceId": "text",
"learningPathReminderEmailNotificationTemplateTypeResourceId": "text",
"posterEmailNotificationTemplateTypeResourceId": "text",
"infographicEmailNotificationTemplateTypeResourceId": "text",
"surveyEmailNotificationTemplateTypeResourceId": "text",
"surveyReminderEmailNotificationTemplateTypeResourceId": "text",
"certificateEmailNotificationTemplateTypeResourceId": "text",
"canSaveVendor": true
},
"status": "text",
"message": "text",
"validationMessages": [
"text"
]
}POST /api/enrollments
Creates a new enrollment for the customer. Send
X-KEEPNET-Company-Id. Body:trainingId(from trainings/search),name,targetGroupResourceIds, scheduling config, and optional fields (certificate, reminder, etc.). See Endpoints → Enrollment for the full schema.
- : API
Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.
<trainingResourceId>Q1 Security Awareness TrainingtruefalsefalseCreated
POST /api/enrollments HTTP/1.1
Host: api.keepnetlabs.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 364
{
"trainingId": "<trainingResourceId>",
"name": "Q1 Security Awareness Training",
"targetGroupResourceIds": [
"<targetGroupResourceId>"
],
"enrollmentScheduler": {
"scheduledDate": "2026-04-01T09:00:00Z",
"scheduledTimeZoneId": "Europe/Istanbul",
"useOwnTimeZone": false,
"dueDate": "2026-04-30T23:59:59Z"
},
"awardCertificate": true,
"markedAsTest": false,
"sendTeamsNotification": false
}Created
{
"data": {
"id": "text",
"trainingName": "text",
"category": "text",
"targetAudience": "text",
"languages": [
"text"
],
"type": "text",
"enrolledBy": "text",
"delivery": "text",
"totalTargetUserCount": 1,
"tags": [
"text"
],
"status": "text",
"startDate": "2026-01-01T00:00:00.000Z",
"awardCertificate": true,
"markedAsTest": true,
"autoEnroll": true,
"certificateName": "text",
"hasReminder": true,
"sendTemplatesInPreferredLanguage": true
},
"status": "text",
"message": "text",
"validationMessages": [
"text"
]
}Example body (minimal):
From the response, note the enrollment resourceId. Use it to send the enrollment.
POST /api/enrollments/{resourceId}/send
Sends the enrollment immediately to all assigned target users. Replace
{resourceId}with the enrollment ID from the create response. SendX-KEEPNET-Company-Id. No request body — just POST to the URL.
- : API
Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.
OK
POST /api/enrollments/{resourceId}/send HTTP/1.1
Host: api.keepnetlabs.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
OK
{
"data": {
"resourceId": "text"
},
"status": "text",
"message": "text",
"validationMessages": [
"text"
]
}Common errors
403 Forbidden — Credential is not Reseller, or the Company ID is not one you manage. Set Client Role = Reseller. Roles and permissions →
401 Unauthorized — Missing or invalid token. Request a new token via
POST /connect/token.400 Bad Request — Invalid request body. Verify
trainingIdfromPOST /api/trainings/search,targetGroupResourceIdsfromPOST /api/target-groups/search/current-company, and check Endpoints → Enrollment for the full schema.404 Not Found — Invalid Company ID, training ID, or enrollment ID.
Related: View customer's enrollment list and report →. Scope API requests to a customer →.
Last updated