For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 resourceId from the response as X-KEEPNET-Company-Id in all subsequent requests. Test it: Authorize with Client ID/Secret, then Send — request body is pre-filled.

Retrieves a list of all companies

post
Required scopes
This endpoint requires the following scopes:
  • : API
Authorizations
OAuth2clientCredentialsRequired

Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.

Token URL:
Body
pageNumberintegerRequiredExample: 1
pageSizeintegerRequiredExample: 10
orderBystringRequiredExample: CreateTime
ascendingbooleanRequiredExample: false
isTargetUserCountExceededLimitbooleanOptional

If true, only companies exceeding license limit are returned

Example: false
Responses
200

OK

application/json
statusstringOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
post/api/companies/search
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": ""
  }
}
200

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 the resourceId of the desired training as trainingId when creating the enrollment.

Returns list of trainings using given search criteria

post
Required scopes
This endpoint requires the following scopes:
  • : API
Authorizations
OAuth2clientCredentialsRequired

Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.

Token URL:
Body
pageNumberintegerRequiredExample: 1
pageSizeintegerRequiredExample: 20
orderBystringOptionalExample: Name
ascendingbooleanOptionalExample: true
Responses
200

OK

application/json
statusstring · nullableOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
post/api/trainings/search
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": ""
  }
}
200

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 more resourceId values as targetGroupResourceIds in the enrollment.

Returns a list of target groups for my company

post
Required scopes
This endpoint requires the following scopes:
  • : API
Authorizations
OAuth2clientCredentialsRequired

Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.

Token URL:
Body
pageNumberintegerRequiredExample: 1
pageSizeintegerRequiredExample: 20
orderBystringOptionalExample: Name
ascendingbooleanOptionalExample: true
Responses
200

OK

application/json
statusstringOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
post/api/target-groups/search/current-company
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": ""
  }
}
200

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.

Gets Enrollment Enums Names and Values

get
Required scopes
This endpoint requires the following scopes:
  • : API
Authorizations
OAuth2clientCredentialsRequired

Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.

Token URL:
Responses
200

OK

application/json
statusstring · nullableOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
get/api/enrollments/form-details
GET /api/enrollments/form-details HTTP/1.1
Host: api.keepnetlabs.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200

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.

Creates a new enrollment

post
Required scopes
This endpoint requires the following scopes:
  • : API
Authorizations
OAuth2clientCredentialsRequired

Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.

Token URL:
Body
trainingIdstringRequiredExample: <trainingResourceId>
namestringRequiredExample: Q1 Security Awareness Training
targetGroupResourceIdsstring[]Required
awardCertificatebooleanOptionalExample: true
markedAsTestbooleanOptionalExample: false
sendTeamsNotificationbooleanOptionalExample: false
Responses
201

Created

application/json
statusstring · nullableOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
post/api/enrollments
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
}
201

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. Send X-KEEPNET-Company-Id. No request body — just POST to the URL.

Send enrollment immediately

post
Required scopes
This endpoint requires the following scopes:
  • : API
Authorizations
OAuth2clientCredentialsRequired

Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.

Token URL:
Path parameters
resourceIdstringRequired
Responses
200

OK

application/json
statusstring · nullableOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
post/api/enrollments/{resourceId}/send
POST /api/enrollments/{resourceId}/send HTTP/1.1
Host: api.keepnetlabs.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200

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 trainingId from POST /api/trainings/search, targetGroupResourceIds from POST /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.

Platform UI: Create enrollments under Awareness Educator → Enrollments. Enrollments →

Related: View customer's enrollment list and report →. Scope API requests to a customer →.

Last updated