Creating Individual Courses
POST /api/v1/courses/
Parameters
| Name |
Description |
|
id
|
id
|
|
id
|
id
|
|
name
|
Course Name
|
|
is_published
|
publically viewable?
|
|
description
|
course description
|
|
closing_letter
|
course description
|
|
friendly_url
|
course description
|
|
lecture_sections_attributes
|
lecture sections
|
|
products_attributes
|
products
|
|
lecture_attributes
|
lectures
|
|
course_questions_attributes
|
course questions
|
|
child_course_ids
|
bundle ids
|
|
author_bio_id
|
id of the author bio
|
Request
Headers
Route
POST /api/v1/courses/
Body
{"name":"whatever","friendly_url":"f4bd2cad7d9e237df2ff3a732f6260b2","child_course_ids":[111,112],"author_bio_id":141}
cURL
curl "http://localhost:3000/api/v1/courses/" -d '{"name":"whatever","friendly_url":"f4bd2cad7d9e237df2ff3a732f6260b2","child_course_ids":[111,112],"author_bio_id":141}' -X POST \
-H "Accept: application/json" \
-H "X-Api-Token: J6dxtx8HF8GL5yp92GZc7cXEPrRDnBdH9A" \
-H "X-Api-Email: user-290@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
201 Created
Body
{
"created_at": "2019-10-31T22:00:48Z",
"path": "/courses/113",
"safe_image_url": "https://process.fs.teachablecdn.com/ADNupMnWyR7kCWRvm76Laz/resize=width:705/https://assets.teachablecdn.com/icons/default-course-image.png",
"has_published_lecture": false,
"has_published_product": false,
"promo_video": null,
"name": "whatever",
"heading": null,
"page_title": "whatever",
"meta_description": null,
"friendly_url": "f4bd2cad7d9e237df2ff3a732f6260b2",
"description": null,
"author_bio_id": 141,
"position": 3,
"conversion_pixels": null,
"closing_letter": null,
"image_url": null,
"hero_image_url": null,
"is_published": false,
"bundled_courses_count": 0,
"child_course_ids": [
],
"preenrollment_call_to_action": "Sign up to get this course when it launches",
"is_open": true,
"is_accepting_preenrollments": false,
"use_old_course_page": null,
"skip_thank_you_page": null,
"onboarded_at": null,
"id": 113,
"default_page_id": 746,
"checkout_sidebar_page_id": 747,
"certificate_page_id": null,
"purchase_redirect_url": null,
"mobile_thumbnail_url": "https://assets.teachablecdn.com/icons/default-course-image.png",
"mobile_hero_image_url": "https://assets.teachablecdn.com/bg/default-hero.png",
"post_purchase_page_id": 748,
"issue_certificates_manually": null,
"is_video_completion_enforced": null,
"is_lecture_order_enforced": null,
"is_minimum_quiz_score_enforced": null,
"minimum_quiz_score": null,
"maximum_quiz_retakes": null,
"meta": {
"class": "course",
"url": "/courses/113/",
"name": "whatever",
"description": null,
"image_url": null
},
"categories": [
],
"author_bio": {
"created_at": "2019-10-31T22:00:48Z",
"headline": "MyText",
"profile_image_url": "http://www.example.com",
"bio": "MyText",
"position": null,
"user_id": 294,
"name": "Author Name",
"id": 141,
"meta": {
"class": "authorbio",
"url": "/author_bios/141",
"name": "Author Name",
"description": "",
"image_url": null
}
}
}