Create a company
As a Reseller you can create a new company (customer) via the API — this is the programmatic way to onboard a new customer. No Company ID is needed for creation; the new company is created under your Reseller account. Use a credential with Client Role = Reseller. After creation, use the returned company resourceId for license configuration, company groups, and scoped API calls (e.g. X-KEEPNET-Company-Id).
POST /api/companies
Creates a new company. The request uses multipart/form-data. Required form fields include: Name, CountryResourceId, DateFormat, IndustryResourceId, LicensePeriodTypeResourceId, LicenseTypeResourceId, NumberOfUsers, TimeFormat, TimeZoneId. Optional: Description, Address, WebsiteUrl, LicenseModuleResourceIdArray, LicenseStartDate, LicenseEndDate, CompanyGroupResourceIdArray, and others. Reference IDs (country, industry, license type, etc.) are platform-specific — use valid values from your environment or see Endpoints → Company for the full schema.
Test it: Endpoints → Company → Creates a new company. Use dummy data (H8d): e.g. name
"Acme Corp", placeholder resource IDs for country, industry, license type, etc.
- : API
Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.
OK
POST /api/companies HTTP/1.1
Host: api.keepnetlabs.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 828
{
"File": "binary",
"Name": "text",
"Description": "text",
"IndustryResourceId": "text",
"CountryResourceId": "text",
"Address": "text",
"WebsiteUrl": "text",
"LicenseTypeResourceId": "text",
"LicenseModuleResourceIdArray": [
"text"
],
"LicensePeriodTypeResourceId": "text",
"LicenseStartDate": "2026-01-01T00:00:00.000Z",
"LicenseEndDate": "2026-01-01T00:00:00.000Z",
"IsNumberOfUsersLimited": true,
"NumberOfUsers": 1,
"NotificationTemplateTypeResourceId": "text",
"TrainingContentTypeResourceId": "text",
"SmtpConfigurationTypeResourceId": "text",
"PreferredLanguageTypeResourceId": "text",
"IsVersionVisible": true,
"IsReleaseNotesVisible": true,
"ReleaseNotesUrl": "text",
"CompanyGroupResourceIdArray": [
"text"
],
"BaseManHourCost": 1,
"BaseManHour": 1,
"StatusId": 1,
"TimeZoneId": "text",
"DateFormat": "text",
"TimeFormat": "text",
"CallBackNumberBookingCount": 1,
"Tags": [
"text"
]
}OK
{
"data": {
"resourceId": "text"
},
"status": "text",
"message": "text",
"validationMessages": [
"text"
]
}Example (conceptual — actual request is multipart/form-data): Name Acme Corp, NumberOfUsers 100, and valid CountryResourceId, IndustryResourceId, LicenseTypeResourceId, LicensePeriodTypeResourceId, DateFormat, TimeFormat, TimeZoneId from your platform. Response includes the new company's resourceId — use it as Company ID in subsequent API calls and in the optional steps below.
PUT /api/companies/{resourceId}
Update the new company's details or license (type, user limit, expiry). Replace
{resourceId}with the company ID from the create response.
PUT /api/company-groups/{resourceId}/participants
Optional. Add the new company to a group. Replace the first {resourceId} with the group ID; send in the body the list of company resource IDs (including the new company). See List and manage company groups →.
- : API
Client ID and Client Secret from Company → Company Settings → REST API. Enter credentials to auto-fetch token.
ResourceId of the Company Group which the companies will be added
Array of company resourceIds will be added to the group
OK
PUT /api/company-groups/{resourceId}/participants HTTP/1.1
Host: api.keepnetlabs.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 35
{
"companyResourceIdArray": [
"text"
]
}OK
{
"data": {
"resourceId": "text"
},
"status": "text",
"message": "text",
"validationMessages": [
"text"
]
}Common errors
403 Forbidden — Credential is not Reseller. Set Client Role = Reseller in Company → Company Settings → REST API. Roles and permissions →
401 Unauthorized — Missing or invalid token. Request a new token via
POST /connect/token.400 Bad Request — Invalid or missing required form fields. Check Endpoints → Company for the full request schema (multipart/form-data).
Related: Scope API requests to a customer →. List companies with license details → to see the new company after creation.
Last updated