List or export target users for a customer

As a Reseller you can list or export a customer’s target users (learners) scoped to that company. Get the customer’s Company ID, then call the target-user search and export endpoints with X-KEEPNET-Company-Id so results are limited to that customer. Use a credential with Client Role = Reseller.


POST /api/companies/search

Get the customer’s Company ID. Use the resourceId of the desired company in the next steps.

Retrieves a paginated list of all companies you manage with license details. Each item includes resourceId — use it as the Company ID for scoped 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

From the response, pick the company (e.g. by name) and note its resourceId. Example: "resourceId": "xC5kfGz7w2Nz" → use xC5kfGz7w2Nz as Company ID in the target-user requests below.


POST /api/target-users/search

Returns a paginated list of target users for that customer. Send the Company ID in the X-KEEPNET-Company-Id header so the list is scoped to the chosen company. Response includes user resourceId, email, name, department, status, and other fields.

Returns a list of the target user. As a Reseller, send X-KEEPNET-Company-Id: <companyResourceId> with the customer’s Company ID. Request body: optional filter, pageNumber, pageSize, orderBy, ascending, newVersion. Test it: Endpoints → TargetUserReturns a list of the target user — use dummy data (H8d) and set the header to a Company ID from companies/search.

Returns a list of the target user

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
pageNumberinteger · int32Optional
pageSizeinteger · int32Optional
orderBystring · nullableOptional
ascendingbooleanOptional
newVersionbooleanOptional
Responses
chevron-right
200

OK

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

OK

Example request headers:

Example body (dummy data — first page):


POST /api/target-users/search/export

Exports the target user list (e.g. CSV/Excel) for that customer. Send the same X-KEEPNET-Company-Id header. Request body schema (filter, exportType, etc.) is in Endpoints → TargetUserExports the list of target users.

Exports the list of target users. As a Reseller, send X-KEEPNET-Company-Id: <companyResourceId> so the export is scoped to the chosen customer.

Exports the list of target users

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
pageNumberinteger · int32Optional
pageSizeinteger · int32Optional
orderBystring · nullableOptional
ascendingbooleanOptional
reportAllPagesbooleanOptional
exportTypestringOptional
phishingTypeIdinteger · int32Optional
tempalateTypestringOptional
templateTypesstring[] · nullableOptional
activityTypestringOptional
Responses
chevron-right
200

OK

No content

post
/api/target-users/search/export
200

OK

No content


GET /api/target-users/count-summary

Optional. Returns counts (active, inactive, deleted, monthly active users) for that customer. Send X-KEEPNET-Company-Id. See Endpoints → TargetUser for parameters.

Returns the count summary of active, inactive, deleted target users and monthly active users. As a Reseller, send X-KEEPNET-Company-Id: <companyResourceId>.

Returns the count summary of active, inactive, deleted target users and monthly active users

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
dataany · nullableOptional
statusstringOptional
messagestring · nullableOptional
validationMessagesstring[] · nullableOptional
get
/api/target-users/count-summary
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.

  • 404 Not Found / 400 Bad Request — Invalid Company ID. Verify Company ID from POST /api/companies/search and ensure you send X-KEEPNET-Company-Id for the customer.

Related: Scope API requests to a customer →. Add target users for a customer → to create users for that company. For full target-users API: see EndpointsTargetUser in the API Reference.

Last updated