Tayl Tayl Public API

Course document format

Write a course's content with every block type and question kind, and the course, chapter, page and outline documents that hold them.

Part of Tayl's API docs: requests go to https://tayl.pro with Authorization: Bearer <key>, and Errors explains every error code.

A course is one JSON document, CourseDocument, holding its chapters, pages, blocks, quizzes and styling. A chapter (CourseChapter) or page (CoursePage) can also be read and saved on its own, and CourseOutline lists chapters and pages without their content. Course authoring has the operations that read and save them, with every schema here but the blocks and questions, and its Making a good course explains how to build a course learners enjoy and can trust.

Schemas

CourseDocument

A course's content as one document. Read it, change it and send it back whole. Chapters, pages and blocks you send with their id keep their IDs and anything you leave as it is; those without one are new, and those you leave out are removed. Top-level fields you leave out keep their current values, and fields you leave out inside chapters take the builder's defaults. title, description, hero_image and appearance.display_theme belong to the course and change straight away; everything else is versioned. Unknown fields are refused.

CourseOutline

A course's chapters and pages by ID and title, without their content. Send it back to reorder chapters, move pages between chapters, rename them, or add empty ones; content stays as it is. List every chapter and page once: leaving one out returns 422, and one marked "delete": true is removed, a chapter with the pages listed under it. Chapters and pages without an id are new and empty. Unknown fields are refused.

CourseChapter

One chapter. Most chapters hold pages; give a quiz or a signing its own chapter. Learners see a chapter's pages, then its quiz, signing or SCORM package. Unknown fields are refused.

CourseOutlineChapter

One chapter of an outline. Unknown fields are refused.

CoursePage

One page of a chapter. Unknown fields are refused.

CourseQuiz

A scored quiz. Unknown fields are refused.

CourseSigning

A document learners read and sign. Unknown fields are refused.

CourseOutlinePage

One page of an outline. A page moves to another chapter by being listed under it. Unknown fields are refused.

CourseBlock

One block on a page. type decides which fields apply. One of these, chosen by type: text: CourseBlockText, large_text: CourseBlockLargeText, header: CourseBlockHeader, highlight: CourseBlockHighlight, quote: CourseBlockQuote, image: CourseBlockImage, video: CourseBlockVideo, embed: CourseBlockEmbed, text_beside_image: CourseBlockTextBesideImage, text_over_image: CourseBlockTextOverImage, image_grid: CourseBlockImageGrid, carousel: CourseBlockCarousel, accordion: CourseBlockAccordion, tab_list: CourseBlockTabList, table: CourseBlockTable, flashcard_container: CourseBlockFlashcardContainer, knowledge_check: CourseBlockKnowledgeCheck, bar_chart: CourseBlockBarChart, pie_chart: CourseBlockPieChart, line_chart: CourseBlockLineChart.

CourseQuestion

A quiz or knowledge check question. kind decides which fields apply. One of these, chosen by kind: single_choice: CourseQuestionSingleChoice, multiple_choice: CourseQuestionMultipleChoice, true_false: CourseQuestionTrueFalse, fill_in_the_gap: CourseQuestionFillInTheGap, boxing: CourseQuestionBoxing, match_the_pairs: CourseQuestionMatchThePairs, sequencing: CourseQuestionSequencing, hotspot_image: CourseQuestionHotspotImage.

CourseBlockText

Paragraphs of rich text. Unknown fields are refused.

CourseBlockLargeText

Large plain text. Kept for older courses; use text or header instead. Unknown fields are refused.

CourseBlockHeader

A heading with an optional subtitle. Unknown fields are refused.

CourseBlockHighlight

A callout box for a tip, warning or alert. Unknown fields are refused.

CourseBlockQuote

A quotation. Unknown fields are refused.

CourseBlockImage

An image from the organisation's media library. Unknown fields are refused.

CourseBlockVideo

A YouTube or Vimeo video, or an uploaded file kept from earlier courses. Unknown fields are refused.

CourseBlockEmbed

Embedded content from another site. Unknown fields are refused.

CourseBlockTextBesideImage

Text with an image beside it. Unknown fields are refused.

CourseBlockTextOverImage

Text over a background image. Unknown fields are refused.

CourseBlockImageGrid

A grid of images. Unknown fields are refused.

CourseBlockCarousel

A slideshow of images. Unknown fields are refused.

CourseBlockAccordion

Sections learners expand one at a time. Unknown fields are refused.

CourseBlockTabList

Content split across tabs. Unknown fields are refused.

CourseBlockTable

A table of plain text cells. Unknown fields are refused.

CourseBlockFlashcardContainer

A deck of flash cards learners turn over. Unknown fields are refused.

CourseBlockKnowledgeCheck

One practice question on the page. Learners see feedback; nothing is scored. Unknown fields are refused.

CourseBlockBarChart

A bar chart. Unknown fields are refused.

CourseBlockPieChart

A pie chart. Unknown fields are refused.

CourseBlockLineChart

A line chart. Unknown fields are refused.

CourseQuestionSingleChoice

Learners pick the one correct answer. Unknown fields are refused.

CourseQuestionMultipleChoice

Learners pick every correct answer. Unknown fields are refused.

CourseQuestionTrueFalse

Learners say whether a statement is true. Unknown fields are refused.

CourseQuestionFillInTheGap

Learners drag words into the gaps marked [] in the text. Unknown fields are refused.

CourseQuestionBoxing

Learners sort items into categories. Unknown fields are refused.

CourseQuestionMatchThePairs

Learners match each left-hand prompt to its answer. Unknown fields are refused.

CourseQuestionSequencing

Learners put steps in order. Unknown fields are refused.

CourseQuestionHotspotImage

Learners click the right areas of an image. Unknown fields are refused.

CourseBlockWrapper

The band a block sits in on the page. Tayl ignores its background on blocks that draw their own card: highlight, quote, text_over_image, carousel, accordion, tab_list, table, knowledge_check, embed and the charts. Unknown fields are refused.

CourseImageGridItem

One image in an image grid. Unknown fields are refused.

CourseCarouselItem

One slide in a carousel. Unknown fields are refused.

CourseTab

One section of an accordion or one tab of a tab list. Unknown fields are refused.

CourseFlashcard

One flash card. Unknown fields are refused.

CourseChartDataPoint

One value in a chart. Unknown fields are refused.

CourseAnswer

One answer to a choice question. Unknown fields are refused.

CourseGap

The answer for one [] gap, in order. Unknown fields are refused.

CourseBox

A category learners sort items into. Unknown fields are refused.

CoursePair

A matching pair. Unknown fields are refused.

CourseHotspot

An area of the hotspot image. Unknown fields are refused.