{"openapi":"3.1.0","info":{"title":"TeachPlay API","version":"1.0"},"servers":[{"url":"https://api.teachplay.io"}],"security":[{"Bearer":[]}],"tags":[{"name":"Courses"},{"name":"Lessons"},{"name":"Sections"},{"name":"Users"},{"name":"Videos"}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer"}},"schemas":{"Course":{"type":"object","properties":{"object":{"type":"string","enum":["course"],"description":"The type of object.","examples":["course"]},"id":{"type":"string","description":"The ID of the course.","examples":["course_abcd1234"]},"lookupKey":{"type":["string","null"],"description":"The ID of the course you use in your system. Must be unique across your system.","examples":["intro-to-programming"]},"title":{"type":"string","description":"The title of the course.","examples":["Introduction to Programming"]},"thumbnail":{"type":["string","null"],"format":"uri","description":"The fully qualified http/s URL of the course thumbnail.","examples":["https://example.com/image.jpg"]},"status":{"type":"string","enum":["draft","published"],"description":"The status of the course.","examples":["published"]},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional metadata for the course.","examples":[{"key":"value"}]},"created":{"type":"string","format":"date-time","description":"The date and time the course was created.","examples":["2021-01-01T00:00:00Z"]},"updated":{"type":"string","format":"date-time","description":"The date and time the course was last updated.","examples":["2021-01-01T00:00:00Z"]}},"required":["object","id","lookupKey","title","thumbnail","status","metadata","created","updated"],"description":"The course object."},"CourseCreated":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["course.created"]},"data":{"$ref":"#/components/schemas/Course"}},"required":["id","object","created","type","data"],"description":"Occurs whenever a course is created."},"CourseUpdated":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["course.updated"]},"data":{"$ref":"#/components/schemas/Course"}},"required":["id","object","created","type","data"],"description":"Occurs whenever a course is updated."},"CourseDeleted":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["course.deleted"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the course.","examples":["course_abcd1234"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]}},"required":["id","object","created","type","data"],"description":"Occurs whenever a course is deleted."},"Section":{"type":"object","properties":{"object":{"type":"string","enum":["section"],"description":"The type of object.","examples":["section"]},"id":{"type":"string","description":"The ID of the section.","examples":["section_abcd1234"]},"lookupKey":{"type":["string","null"],"description":"The ID of the section you use in your system. Must be unique across your system.","examples":["intro-to-programming"]},"courseId":{"type":"string","description":"The ID of the course this section belongs to.","examples":["course_abcd1234"]},"title":{"type":"string","description":"The title of the section.","examples":["Introduction to Programming"]},"status":{"type":"string","enum":["draft","published"],"description":"The status of the section.","examples":["published"]},"index":{"type":"number","description":"The order of the section in the course.","examples":[1]},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional metadata for the section.","examples":[{"key":"value"}]},"created":{"type":"string","format":"date-time","description":"The date and time the section was created.","examples":["2021-01-01T00:00:00Z"]},"updated":{"type":"string","format":"date-time","description":"The date and time the section was last updated.","examples":["2021-01-01T00:00:00Z"]}},"required":["object","id","lookupKey","courseId","title","status","index","metadata","created","updated"],"description":"The section object."},"SectionCreated":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["section.created"]},"data":{"$ref":"#/components/schemas/Section"}},"required":["id","object","created","type","data"],"description":"Occurs whenever a section is created."},"SectionUpdated":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["section.updated"]},"data":{"$ref":"#/components/schemas/Section"}},"required":["id","object","created","type","data"],"description":"Occurs whenever a section is updated."},"SectionDeleted":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["section.deleted"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the section.","examples":["section_abcd1234"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]}},"required":["id","object","created","type","data"],"description":"Occurs whenever a section is deleted."},"Lesson":{"type":"object","properties":{"object":{"type":"string","enum":["lesson"],"description":"The type of object.","examples":["lesson"]},"id":{"type":"string","description":"The ID of the lesson.","examples":["lesson_abcd1234"]},"lookupKey":{"type":["string","null"],"description":"The ID of the lesson you use in your system. Must be unique across your system.","examples":["intro-to-programming"]},"sectionId":{"type":"string","description":"The ID of the section this lesson belongs to.","examples":["section_abcd1234"]},"videoId":{"type":["string","null"],"description":"The ID of the video associated with the lesson. Null when there is no video.","examples":["video_abcd1234"]},"title":{"type":"string","description":"The title of the lesson.","examples":["Introduction to Programming"]},"thumbnail":{"type":["string","null"],"format":"uri","description":"The fully qualified http/s URL of the lesson thumbnail.","examples":["https://example.com/image.jpg"]},"status":{"type":"string","enum":["draft","published"],"description":"The status of the lesson.","examples":["published"]},"index":{"type":"number","description":"The order of the lesson in the section.","examples":[1]},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional metadata for the lesson.","examples":[{"key":"value"}]},"created":{"type":"string","format":"date-time","description":"The date and time the lesson was created.","examples":["2021-01-01T00:00:00Z"]},"updated":{"type":"string","format":"date-time","description":"The date and time the lesson was last updated.","examples":["2021-01-01T00:00:00Z"]}},"required":["object","id","lookupKey","sectionId","videoId","title","thumbnail","status","index","metadata","created","updated"],"description":"The lesson object."},"LessonCreated":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["lesson.created"]},"data":{"$ref":"#/components/schemas/Lesson"}},"required":["id","object","created","type","data"],"description":"Occurs whenever a lesson is created."},"LessonUpdated":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["lesson.updated"]},"data":{"$ref":"#/components/schemas/Lesson"}},"required":["id","object","created","type","data"],"description":"Occurs whenever a lesson is updated."},"LessonDeleted":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["lesson.deleted"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the lesson.","examples":["lesson_abcd1234"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]}},"required":["id","object","created","type","data"],"description":"Occurs whenever a lesson is deleted."},"Video":{"type":"object","properties":{"object":{"type":"string","enum":["video"],"description":"The type of object.","examples":["video"]},"id":{"type":"string","description":"The ID of the video.","examples":["video_abcd1234"]},"lookupKey":{"type":["string","null"],"description":"The ID of the video you use in your system. Must be unique across your system.","examples":["intro-to-programming"]},"title":{"type":"string","description":"The title of the video.","examples":["Introduction to Programming"]},"thumbnail":{"type":["string","null"],"format":"uri","description":"The fully qualified http/s URL of the lesson thumbnail.","examples":["https://example.com/image.jpg"]},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional metadata for the video.","examples":[{"key":"value"}]},"created":{"type":"string","format":"date-time","description":"The date and time the video was created.","examples":["2021-01-01T00:00:00Z"]},"updated":{"type":"string","format":"date-time","description":"The date and time the video was last updated.","examples":["2021-01-01T00:00:00Z"]}},"required":["object","id","lookupKey","title","thumbnail","metadata","created","updated"],"description":"The video object."},"VideoCreated":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["video.created"]},"data":{"$ref":"#/components/schemas/Video"}},"required":["id","object","created","type","data"],"description":"Occurs whenever a video is created."},"VideoUpdated":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["video.updated"]},"data":{"$ref":"#/components/schemas/Video"}},"required":["id","object","created","type","data"],"description":"Occurs whenever a video is updated."},"VideoDeleted":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["video.deleted"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the video.","examples":["video_abcd1234"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]}},"required":["id","object","created","type","data"],"description":"Occurs whenever a video is deleted."},"User":{"type":"object","properties":{"object":{"type":"string","enum":["user"],"description":"The type of object.","examples":["user"]},"id":{"type":"string","description":"The ID of the user.","examples":["user_abcd1234"]},"lookupKey":{"type":["string","null"],"description":"The ID of the user you use in your system. Must be unique across your system.","examples":["intro-to-programming"]},"email":{"type":"string","format":"email","description":"The email of the user.","examples":["example@example.com"]},"name":{"type":"string","description":"The name of the user.","examples":["John Doe"]},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional metadata for the user.","examples":[{"key":"value"}]},"created":{"type":"string","format":"date-time","description":"The date and time the user was created.","examples":["2021-01-01T00:00:00Z"]},"updated":{"type":"string","format":"date-time","description":"The date and time the user was last updated.","examples":["2021-01-01T00:00:00Z"]}},"required":["object","id","lookupKey","email","name","metadata","created","updated"],"description":"The user object."},"UserCreated":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["user.created"]},"data":{"$ref":"#/components/schemas/User"}},"required":["id","object","created","type","data"],"description":"Occurs whenever a user is created."},"UserUpdated":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["user.updated"]},"data":{"$ref":"#/components/schemas/User"}},"required":["id","object","created","type","data"],"description":"Occurs whenever a user is updated."},"UserDeleted":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the object"},"object":{"type":"string","enum":["event"],"description":"The type of object"},"created":{"type":"string","description":"Time at which the object was created."},"type":{"type":"string","enum":["user.deleted"]},"data":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the user.","examples":["user_abcd1234"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","deleted"]}},"required":["id","object","created","type","data"],"description":"Occurs whenever a user is deleted."},"CourseList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"The type of object.","examples":["list"]},"hasMore":{"type":"boolean","description":"Whether there are more items available.","examples":[true]},"totalCount":{"type":"integer","description":"The total number of items available.","examples":[100]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Course"}}},"required":["object","hasMore","totalCount","data"]},"CourseIdParam":{"type":"string","description":"The ID of the course. Prefix with `lk:` to search by lookup key.","examples":["course_abcd1234"]},"CourseCreateParams":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255,"description":"The title of the course.","examples":["Introduction to Programming"]},"thumbnail":{"type":["string","null"],"maxLength":255,"format":"uri","description":"The fully qualified http/s URL of the course thumbnail."},"lookupKey":{"type":["string","null"],"maxLength":255,"description":"The ID of the course you use in your system. Must be unique across your system."},"status":{"type":"string","enum":["draft","published"],"description":"The status of the course.","examples":["published"]},"metadata":{"anyOf":[{"type":"string","enum":[""]},{"type":"object","additionalProperties":{"type":["string","null"],"maxLength":500}},{"type":"null"}],"description":"Additional metadata for the course.","examples":[{"key":"value"}]}},"required":["title"],"description":"The parameters to create a course."},"CourseUpdateParams":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255,"description":"The title of the course.","examples":["Introduction to Programming"]},"thumbnail":{"type":["string","null"],"maxLength":255,"format":"uri","description":"The fully qualified http/s URL of the course thumbnail."},"lookupKey":{"type":["string","null"],"maxLength":255,"description":"The ID of the course you use in your system. Must be unique across your system."},"status":{"type":"string","enum":["draft","published"],"description":"The status of the course.","examples":["published"]},"metadata":{"anyOf":[{"type":"string","enum":[""]},{"type":"object","additionalProperties":{"type":["string","null"],"maxLength":500}},{"type":"null"}],"description":"Additional metadata for the course.","examples":[{"key":"value"}]}},"description":"The parameters to update a course."},"SectionList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"The type of object.","examples":["list"]},"hasMore":{"type":"boolean","description":"Whether there are more items available.","examples":[true]},"totalCount":{"type":"integer","description":"The total number of items available.","examples":[100]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Section"}}},"required":["object","hasMore","totalCount","data"]},"SectionIdParam":{"type":"string","description":"The ID of the section. Prefix with `lk:` to search by lookup key.","examples":["section_abcd1234"]},"SectionCreateParams":{"type":"object","properties":{"courseId":{"$ref":"#/components/schemas/CourseIdParam"},"title":{"type":"string","minLength":1,"maxLength":255,"description":"The title of the section.","examples":["Introduction to Programming"]},"lookupKey":{"type":["string","null"],"maxLength":255,"description":"The ID of the section you use in your system. Must be unique across your system."},"status":{"type":"string","enum":["draft","published"],"description":"The status of the section.","examples":["published"]},"metadata":{"anyOf":[{"type":"string","enum":[""]},{"type":"object","additionalProperties":{"type":["string","null"],"maxLength":500}},{"type":"null"}],"description":"Additional metadata for the section.","examples":[{"key":"value"}]}},"required":["courseId","title"],"description":"The parameters to create a section."},"SectionUpdateParams":{"type":"object","properties":{"courseId":{"$ref":"#/components/schemas/CourseIdParam"},"title":{"type":"string","minLength":1,"maxLength":255,"description":"The title of the section.","examples":["Introduction to Programming"]},"lookupKey":{"type":["string","null"],"maxLength":255,"description":"The ID of the section you use in your system. Must be unique across your system."},"status":{"type":"string","enum":["draft","published"],"description":"The status of the section.","examples":["published"]},"metadata":{"anyOf":[{"type":"string","enum":[""]},{"type":"object","additionalProperties":{"type":["string","null"],"maxLength":500}},{"type":"null"}],"description":"Additional metadata for the section.","examples":[{"key":"value"}]}},"description":"The parameters to update a section."},"LessonList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"The type of object.","examples":["list"]},"hasMore":{"type":"boolean","description":"Whether there are more items available.","examples":[true]},"totalCount":{"type":"integer","description":"The total number of items available.","examples":[100]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Lesson"}}},"required":["object","hasMore","totalCount","data"]},"LessonIdParam":{"type":"string","description":"The ID of the lesson. Prefix with `lk:` to search by lookup key.","examples":["lesson_abcd1234"]},"LessonCreateParams":{"type":"object","properties":{"sectionId":{"$ref":"#/components/schemas/SectionIdParam"},"title":{"type":"string","minLength":1,"maxLength":255,"description":"The title of the lesson.","examples":["Introduction to Programming"]},"thumbnail":{"type":["string","null"],"maxLength":255,"format":"uri","description":"The fully qualified http/s URL of the lesson thumbnail."},"lookupKey":{"type":["string","null"],"maxLength":255,"description":"The ID of the lesson you use in your system. Must be unique across your system."},"status":{"type":"string","enum":["draft","published"],"description":"The status of the lesson.","examples":["published"]},"metadata":{"anyOf":[{"type":"string","enum":[""]},{"type":"object","additionalProperties":{"type":["string","null"],"maxLength":500}},{"type":"null"}],"description":"Additional metadata for the lesson.","examples":[{"key":"value"}]}},"required":["sectionId","title"],"description":"The parameters to create a lesson."},"LessonUpdateParams":{"type":"object","properties":{"sectionId":{"$ref":"#/components/schemas/SectionIdParam"},"title":{"type":"string","minLength":1,"maxLength":255,"description":"The title of the lesson.","examples":["Introduction to Programming"]},"thumbnail":{"type":["string","null"],"maxLength":255,"format":"uri","description":"The fully qualified http/s URL of the lesson thumbnail."},"lookupKey":{"type":["string","null"],"maxLength":255,"description":"The ID of the lesson you use in your system. Must be unique across your system."},"status":{"type":"string","enum":["draft","published"],"description":"The status of the lesson.","examples":["published"]},"metadata":{"anyOf":[{"type":"string","enum":[""]},{"type":"object","additionalProperties":{"type":["string","null"],"maxLength":500}},{"type":"null"}],"description":"Additional metadata for the lesson.","examples":[{"key":"value"}]}},"description":"The parameters to update a lesson."},"VideoList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"The type of object.","examples":["list"]},"hasMore":{"type":"boolean","description":"Whether there are more items available.","examples":[true]},"totalCount":{"type":"integer","description":"The total number of items available.","examples":[100]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Video"}}},"required":["object","hasMore","totalCount","data"]},"VideoIdParam":{"type":"string","description":"The ID of the video. Prefix with `lk:` to search by lookup key.","examples":["video_abcd1234"]},"VideoCreateParams":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255,"description":"The title of the video.","examples":["Introduction to Programming"]},"lookupKey":{"type":["string","null"],"maxLength":255,"description":"The ID of the video you use in your system. Must be unique across your system.","examples":["intro-to-programming"]},"metadata":{"anyOf":[{"type":"string","enum":[""]},{"type":"object","additionalProperties":{"type":["string","null"],"maxLength":500}},{"type":"null"}],"description":"Additional metadata for the video.","examples":[{"key":"value"}]}},"required":["title"],"description":"The parameters to create a video."},"VideoUpdateParams":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":255,"description":"The title of the video.","examples":["Introduction to Programming"]},"lookupKey":{"type":["string","null"],"maxLength":255,"description":"The ID of the video you use in your system. Must be unique across your system.","examples":["intro-to-programming"]},"metadata":{"anyOf":[{"type":"string","enum":[""]},{"type":"object","additionalProperties":{"type":["string","null"],"maxLength":500}},{"type":"null"}],"description":"Additional metadata for the video.","examples":[{"key":"value"}]}},"description":"The parameters to update a video."},"UserList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"The type of object.","examples":["list"]},"hasMore":{"type":"boolean","description":"Whether there are more items available.","examples":[true]},"totalCount":{"type":"integer","description":"The total number of items available.","examples":[100]},"data":{"type":"array","items":{"$ref":"#/components/schemas/User"}}},"required":["object","hasMore","totalCount","data"]},"UserIdParam":{"type":"string","description":"The ID of the user. Prefix with `lk:` to search by lookup key.","examples":["user_abcd1234"]},"UserCreateParams":{"type":"object","properties":{"email":{"type":"string","maxLength":255,"format":"email","description":"The email of the user.","examples":["example@example.com"]},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The name of the user.","examples":["John Doe"]},"lookupKey":{"type":["string","null"],"maxLength":255,"description":"The ID of the user you use in your system. Must be unique across your system.","examples":["intro-to-programming"]},"metadata":{"anyOf":[{"type":"string","enum":[""]},{"type":"object","additionalProperties":{"type":["string","null"],"maxLength":500}},{"type":"null"}],"description":"Additional metadata for the user.","examples":[{"key":"value"}]}},"required":["email","name"],"description":"The parameters to create a user."},"UserUpdateParams":{"type":"object","properties":{"email":{"type":"string","maxLength":255,"format":"email","description":"The email of the user.","examples":["example@example.com"]},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The name of the user.","examples":["John Doe"]},"lookupKey":{"type":["string","null"],"maxLength":255,"description":"The ID of the user you use in your system. Must be unique across your system.","examples":["intro-to-programming"]},"metadata":{"anyOf":[{"type":"string","enum":[""]},{"type":"object","additionalProperties":{"type":["string","null"],"maxLength":500}},{"type":"null"}],"description":"Additional metadata for the user.","examples":[{"key":"value"}]}},"description":"The parameters to update a user."},"EnrollmentsCourse":{"type":"object","properties":{"type":{"type":"string","enum":["enrollments.course"]},"id":{"type":"string"},"lookupKey":{"type":["string","null"]}},"required":["type","id","lookupKey"]},"EnrollmentsSection":{"type":"object","properties":{"type":{"type":"string","enum":["enrollments.section"]},"id":{"type":"string"},"lookupKey":{"type":["string","null"]}},"required":["type","id","lookupKey"]},"EnrollmentsLesson":{"type":"object","properties":{"type":{"type":"string","enum":["enrollments.lesson"]},"id":{"type":"string"},"lookupKey":{"type":["string","null"]}},"required":["type","id","lookupKey"]},"Enrollments":{"type":"object","properties":{"type":{"type":"string","enum":["enrollments"]},"hasFullAccess":{"type":"boolean"},"data":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EnrollmentsCourse"},{"$ref":"#/components/schemas/EnrollmentsSection"},{"$ref":"#/components/schemas/EnrollmentsLesson"}],"discriminator":{"propertyName":"type","mapping":{"enrollments.course":"#/components/schemas/EnrollmentsCourse","enrollments.section":"#/components/schemas/EnrollmentsSection","enrollments.lesson":"#/components/schemas/EnrollmentsLesson"}}}}},"required":["type","hasFullAccess","data"]},"Tus":{"type":"object","properties":{"object":{"type":"string","enum":["tus"],"description":"The type of object.","examples":["tus"]},"endpoint":{"type":"string","format":"uri","description":"The tus endpoint.","examples":["https://video.teachplay.com/tus"]},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"The pre-signed authorization headers to use for the tus endpoint."}},"required":["object","endpoint","headers"],"description":"The tus object."},"TusCreateParams":{"type":"object","properties":{"videoId":{"$ref":"#/components/schemas/VideoIdParam"}},"required":["videoId"],"description":"The parameters to create a tus endpoint."}},"parameters":{}},"paths":{"/v1/courses":{"get":{"tags":["Courses"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"The maximum number of items to return.","examples":[10]},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0,"description":"The number of items to skip before returning results.","examples":[0]},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List courses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseList"}}}}}},"post":{"tags":["Courses"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseCreateParams"}}}},"responses":{"200":{"description":"Create a course","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Course"}}}}}}},"/v1/courses/{courseId}":{"get":{"tags":["Courses"],"parameters":[{"schema":{"$ref":"#/components/schemas/CourseIdParam"},"required":true,"name":"courseId","in":"path"},{"schema":{"anyOf":[{"type":"string","enum":["sections"]},{"type":"string","enum":["sections.lessons"]},{"type":"array","items":{"anyOf":[{"type":"string","enum":["sections"]},{"type":"string","enum":["sections.lessons"]}]}}]},"required":false,"name":"expand[]","in":"query"}],"responses":{"200":{"description":"Retrieve a course","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Course"}}}},"404":{"description":"Course not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}},"post":{"tags":["Courses"],"parameters":[{"schema":{"$ref":"#/components/schemas/CourseIdParam"},"required":true,"name":"courseId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseUpdateParams"}}}},"responses":{"200":{"description":"Update a course","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Course"}}}},"404":{"description":"Course not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}},"delete":{"tags":["Courses"],"parameters":[{"schema":{"$ref":"#/components/schemas/CourseIdParam"},"required":true,"name":"courseId","in":"path"}],"responses":{"200":{"description":"Delete a course","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Course"}}}},"404":{"description":"Course not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/v1/sections":{"get":{"tags":["Sections"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"The maximum number of items to return.","examples":[10]},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0,"description":"The number of items to skip before returning results.","examples":[0]},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List sections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionList"}}}}}},"post":{"tags":["Sections"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionCreateParams"}}}},"responses":{"200":{"description":"Create a section","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section"}}}},"404":{"description":"Section not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/v1/sections/{sectionId}":{"get":{"tags":["Sections"],"parameters":[{"schema":{"$ref":"#/components/schemas/SectionIdParam"},"required":true,"name":"sectionId","in":"path"}],"responses":{"200":{"description":"Retrieve a section","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section"}}}},"404":{"description":"Section not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}},"post":{"tags":["Sections"],"parameters":[{"schema":{"$ref":"#/components/schemas/SectionIdParam"},"required":true,"name":"sectionId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionUpdateParams"}}}},"responses":{"200":{"description":"Update a section","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section"}}}},"404":{"description":"Section not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}},"delete":{"tags":["Sections"],"parameters":[{"schema":{"$ref":"#/components/schemas/SectionIdParam"},"required":true,"name":"sectionId","in":"path"}],"responses":{"200":{"description":"Delete a section","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Section"}}}},"404":{"description":"Section not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/v1/lessons":{"get":{"tags":["Lessons"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"The maximum number of items to return.","examples":[10]},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0,"description":"The number of items to skip before returning results.","examples":[0]},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List lessons","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonList"}}}}}},"post":{"tags":["Lessons"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonCreateParams"}}}},"responses":{"200":{"description":"Create a lesson","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lesson"}}}},"404":{"description":"Section not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/v1/lessons/{lessonId}":{"get":{"tags":["Lessons"],"parameters":[{"schema":{"$ref":"#/components/schemas/LessonIdParam"},"required":true,"name":"lessonId","in":"path"}],"responses":{"200":{"description":"Retrieve a lesson","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lesson"}}}},"404":{"description":"Lesson not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}},"post":{"tags":["Lessons"],"parameters":[{"schema":{"$ref":"#/components/schemas/LessonIdParam"},"required":true,"name":"lessonId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonUpdateParams"}}}},"responses":{"200":{"description":"Update a lesson","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lesson"}}}},"404":{"description":"Lesson not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}},"delete":{"tags":["Lessons"],"parameters":[{"schema":{"$ref":"#/components/schemas/LessonIdParam"},"required":true,"name":"lessonId","in":"path"}],"responses":{"200":{"description":"Delete a lesson","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lesson"}}}},"404":{"description":"Lesson not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/v1/videos":{"get":{"tags":["Videos"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"The maximum number of items to return.","examples":[10]},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0,"description":"The number of items to skip before returning results.","examples":[0]},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List videos","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoList"}}}}}},"post":{"tags":["Videos"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoCreateParams"}}}},"responses":{"200":{"description":"Create a video","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Video"}}}}}}},"/v1/videos/{videoId}":{"get":{"tags":["Videos"],"parameters":[{"schema":{"$ref":"#/components/schemas/VideoIdParam"},"required":true,"name":"videoId","in":"path"}],"responses":{"200":{"description":"Retrieve a video","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Video"}}}},"404":{"description":"Video not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}},"post":{"tags":["Videos"],"parameters":[{"schema":{"$ref":"#/components/schemas/VideoIdParam"},"required":true,"name":"videoId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUpdateParams"}}}},"responses":{"200":{"description":"Update a video","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Video"}}}},"404":{"description":"Video not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}},"delete":{"tags":["Videos"],"parameters":[{"schema":{"$ref":"#/components/schemas/VideoIdParam"},"required":true,"name":"videoId","in":"path"}],"responses":{"200":{"description":"Delete a video","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Video"}}}},"404":{"description":"Video not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/v1/users":{"get":{"tags":["Users"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"The maximum number of items to return.","examples":[10]},"required":false,"name":"limit","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"default":0,"description":"The number of items to skip before returning results.","examples":[0]},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"List users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserList"}}}}}},"post":{"tags":["Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreateParams"}}}},"responses":{"200":{"description":"Create a user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/v1/users/{userId}":{"get":{"tags":["Users"],"parameters":[{"schema":{"$ref":"#/components/schemas/UserIdParam"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Retrieve a user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}},"post":{"tags":["Users"],"parameters":[{"schema":{"$ref":"#/components/schemas/UserIdParam"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateParams"}}}},"responses":{"200":{"description":"Update a user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}},"delete":{"tags":["Users"],"parameters":[{"schema":{"$ref":"#/components/schemas/UserIdParam"},"required":true,"name":"userId","in":"path"}],"responses":{"200":{"description":"Delete a user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/v1/enrollments":{"get":{"tags":["Enrollments"],"parameters":[{"schema":{"$ref":"#/components/schemas/UserIdParam"},"required":true,"name":"userId","in":"query"}],"responses":{"200":{"description":"List enrollments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Enrollments"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/v1/playlist":{"get":{"tags":["Playlist"],"parameters":[{"schema":{"$ref":"#/components/schemas/UserIdParam"},"required":true,"name":"userId","in":"query"},{"schema":{"$ref":"#/components/schemas/CourseIdParam"},"required":false,"name":"courseId","in":"query"},{"schema":{"$ref":"#/components/schemas/SectionIdParam"},"required":false,"name":"sectionId","in":"query"},{"schema":{"$ref":"#/components/schemas/LessonIdParam"},"required":false,"name":"lessonId","in":"query"}],"responses":{"200":{"description":"Retrieve a playlist for a user","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/v1/tus":{"post":{"tags":["Tus"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TusCreateParams"}}}},"responses":{"200":{"description":"Create a tus resumable upload endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tus"}}}},"404":{"description":"Video not found","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}}},"webhooks":{"course.created":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseCreated"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"course.updated":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseUpdated"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"course.deleted":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CourseDeleted"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"section.created":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionCreated"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"section.updated":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionUpdated"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"section.deleted":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionDeleted"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"lesson.created":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonCreated"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"lesson.updated":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonUpdated"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"lesson.deleted":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonDeleted"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"video.created":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoCreated"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"video.updated":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUpdated"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"video.deleted":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoDeleted"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"user.created":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreated"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"user.updated":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdated"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}},"user.deleted":{"post":{"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDeleted"}}}},"responses":{"200":{"description":"Return a 200 status to indicate that the data was received successfully"}}}}}}