Create a draft product
Authorization
ApiKeyAuth API key created in CourseLit dashboard settings. The legacy apikey request-body field is still accepted but deprecated.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://school.courselit.app/api/products" \ -H "Content-Type: application/json" \ -d '{ "title": "AI Foundations", "type": "course" }'{
"productId": "string",
"type": "course",
"title": "string",
"slug": "string",
"description": "string",
"published": true,
"privacy": "string",
"tags": [
"string"
],
"featuredImage": {},
"pageId": "string",
"defaultPaymentPlan": "string",
"paymentPlans": [
{
"planId": "string",
"name": "string",
"type": "free",
"entityId": "string",
"entityType": "string",
"oneTimeAmount": 0,
"emiAmount": 0,
"emiTotalInstallments": 0,
"subscriptionMonthlyAmount": 0,
"subscriptionYearlyAmount": 0,
"description": "string",
"isDefault": true
}
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}Generate a MediaLit upload signature POST
Returns a short-lived upload signature and endpoint for direct file uploads. See `https://docs.medialit.cloud/api/uploadMedia` for the upload request format.
Create a product lesson POST
Creates a lesson. `text` lessons accept Tiptap/ProseMirror JSON in `content`; `embed` lessons accept `{ value }` in `content`; `quiz` lessons accept quiz JSON in `content`; media-backed lessons (`video`, `audio`, `pdf`, `file`) use `media`. SCORM lessons are not supported.