Licenses
Creates a new license and associates it with the specified client, courses, learning paths, and course tags
Creates a new license and associates it with the specified client, courses, learning paths, and course tags.
POST
https://example.thoughtindustries.com/incoming/v2/licensesExample request
curl -X POST "https://example.thoughtindustries.com/incoming/v2/licenses" \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"clientId": "00000000-0000-0000-0000-000000000000",
"courseIds": "00000000-0000-0000-0000-000000000000",
"learningPathIds": "00000000-0000-0000-0000-000000000000",
"courseTagIds": "00000000-0000-0000-0000-000000000000"
}'Parameters
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
clientId | uuid | Yes | body | ID of the client to associate this license with. |
courseIds | uuid[] | Yes | body | IDs of the courses to include in this license. |
learningPathIds | uuid[] | Yes | body | IDs of the learning paths to include in this license. |
courseTagIds | uuid[] | Yes | body | IDs of the course tags to include in this license. |
replaceCourseIds | boolean | No | body | When true, replaces the client's existing course assignments with the provided courseIds instead of appending. |
replaceLearningPathIds | boolean | No | body | When true, replaces the client's existing learning path assignments with the provided learningPathIds instead of appending. |
replaceCourseTagIds | boolean | No | body | When true, replaces the client's existing course tag assignments with the provided courseTagIds instead of appending. |
name | string | Yes | body | Display name of the license. |
label | string | No | body | Short label used to identify the license in listings and reports. |
sku | string | No | body | Stock-keeping unit identifier for the license. |
seatsLimit | integer | No | body | Maximum number of seats available under this license; omit for unlimited seats. |
parentLicenseId | uuid | No | body | ID of the parent license when creating a child license in a hierarchy. |
accessDays | integer | No | body | Number of days a learner retains access to licensed content after enrollment. |
expirationDate | ISO 8601 timestamp | No | body | Date and time at which the license expires, in ISO 8601 format. |
enableBranding | boolean | No | body | When true, applies the client's custom branding to the license experience. |
isDefault | boolean | No | body | When true, designates this license as the default for the client. |
ref1 | string | No | body | Custom reference field 1 for storing arbitrary metadata. |
ref2 | string | No | body | Custom reference field 2 for storing arbitrary metadata. |
ref3 | string | No | body | Custom reference field 3 for storing arbitrary metadata. |
ref4 | string | No | body | Custom reference field 4 for storing arbitrary metadata. |
ref5 | string | No | body | Custom reference field 5 for storing arbitrary metadata. |
ref6 | string | No | body | Custom reference field 6 for storing arbitrary metadata. |
ref7 | string | No | body | Custom reference field 7 for storing arbitrary metadata. |
ref8 | string | No | body | Custom reference field 8 for storing arbitrary metadata. |
ref9 | string | No | body | Custom reference field 9 for storing arbitrary metadata. |
ref10 | string | No | body | Custom reference field 10 for storing arbitrary metadata. |
Example response
{
"id": "00000000-0000-0000-0000-000000000000",
"courseIds": [
"00000000-0000-0000-0000-000000000000"
],
"learningPathIds": [
"00000000-0000-0000-0000-000000000000"
],
"courseTagIds": [
"00000000-0000-0000-0000-000000000000"
],
"name": "string",
"label": "string",
"sku": "string",
"seatsLimit": 0,
"enableBranding": true,
"parentLicenseId": "00000000-0000-0000-0000-000000000000",
"accessDays": 0,
"expirationDate": "2024-01-01T00:00:00.000Z",
"isDefault": true,
"ref1": "string",
"ref2": "string",
"ref3": "string",
"ref4": "string",
"ref5": "string",
"ref6": "string",
"ref7": "string",
"ref8": "string",
"ref9": "string",
"ref10": "string"
}Response fields
| Field | Type | Description |
|---|---|---|
id | uuid | Identifier of the license. |
courseIds | uuid[] | Identifiers of courses granted by the license. |
learningPathIds | uuid[] | Identifiers of learning paths granted by the license. |
courseTagIds | uuid[] | Identifiers of course tags granted by the license. |
name | string | Name of the license. |
label | string | Display label of the license. |
sku | string | SKU of the license. |
seatsLimit | integer | Maximum number of seats on the license. |
enableBranding | boolean | Whether custom branding is enabled for the license. |
parentLicenseId | uuid | Identifier of the parent license, when nested. |
accessDays | integer | Number of access days granted by the license. |
expirationDate | ISO 8601 timestamp | Expiration date of the license. |
isDefault | boolean | Whether this is the default license for the client. |
ref1 | string | Custom reference field 1 on the license. |
ref2 | string | Custom reference field 2 on the license. |
ref3 | string | Custom reference field 3 on the license. |
ref4 | string | Custom reference field 4 on the license. |
ref5 | string | Custom reference field 5 on the license. |
ref6 | string | Custom reference field 6 on the license. |
ref7 | string | Custom reference field 7 on the license. |
ref8 | string | Custom reference field 8 on the license. |
ref9 | string | Custom reference field 9 on the license. |
ref10 | string | Custom reference field 10 on the license. |