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
chevron-right
lockRequired 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
chevron-right
200

OK

application/json
statusstringOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
post
/api/companies/search
200

OK


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
chevron-right
lockRequired 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
chevron-right
200

OK

application/json
statusstring · nullableOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
post
/api/trainings/search
200

OK


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
chevron-right
lockRequired 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
chevron-right
200

OK

application/json
statusstringOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
post
/api/target-groups/search/current-company
200

OK


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
chevron-right
lockRequired 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
chevron-right
200

OK

application/json
statusstring · nullableOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
get
/api/enrollments/form-details
200

OK


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
chevron-right
lockRequired 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
post
/api/enrollments
201

Created

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
chevron-right
lockRequired 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
chevron-right
200

OK

application/json
statusstring · nullableOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
post
/api/enrollments/{resourceId}/send
200

OK


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.

circle-info

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