All Docs
FeaturesCSI Teachable Replacement AppUpdated March 13, 2026

Course CRUD API — Create, Update, Archive

Course CRUD API — Create, Update, Archive

Available since: v1.0.11

The Course CRUD API is the central authoring surface for managing courses within an organization. It exposes three tRPC procedures — course.create, course.update, and course.archive — that are used by both the course builder UI and the Teachable import engine.


Procedures

course.create

Creates a new course inside the caller's organization.

Input fields:

FieldTypeRequiredDescription
titlestringThe display title of the course
descriptionstringA short description of the course
thumbnailstring (URL)URL of the course thumbnail image
statusCourseStatusInitial publication status (defaults to draft)

Returns: The newly created course object, including its generated id.


course.update

Updates metadata for an existing course. All fields are optional — only the fields provided will be changed.

Input fields:

FieldTypeRequiredDescription
idstringID of the course to update
titlestringNew title
descriptionstringNew description
thumbnailstring (URL)New thumbnail URL
statusCourseStatusNew publication status

Returns: The updated course object.


course.archive

Soft-deletes a course, removing it from learner-facing views while retaining all content and enrollment data.

Input fields:

FieldTypeRequiredDescription
idstringID of the course to archive

Returns: The archived course object with an updated archivedAt timestamp.

Note: Archiving is non-destructive. Course content, lessons, and enrollment records are preserved and can be recovered.


Authorization

All three procedures are organization-scoped. The caller must be authenticated and a member of the organization that owns the course. Cross-organization mutations are rejected with an authorization error.


Course Status

The status field is shared across the course builder UI and the import engine. Supported values:

ValueDescription
draftNot visible to learners; default for newly created courses
publishedVisible and accessible to enrolled learners
archivedHidden from learners; set automatically by course.archive

Usage by the Import Engine

When importing a course from a connected Teachable school, the import engine calls course.create to initialize the course record and then course.update to apply metadata as it is extracted (title, description, thumbnail). This ensures imported courses go through the same validation and authorization layer as manually authored ones.


Usage by the Course Builder UI

The course builder UI calls these procedures directly for all authoring operations:

  • New course flow calls course.create.
  • Settings panel calls course.update when the author saves changes to title, description, thumbnail, or status.
  • Archive action in the course management table calls course.archive.