A complete REST API for managing courses, communities, students, and enrollments programmatically. Designed for developers, AI agents, and automation workflows.
Secure Bearer token authentication with granular permissions
Create, read, update, and delete all platform resources
YouTube, Vimeo, and direct URL parsing built-in
Base URL
https://your-domain.com/api/v1All API requests require a Bearer token. Create API keys from the Producer Dashboard.
Important: API keys are scoped to a producer and grant access to all resources owned by that producer. Store keys securely and never expose them in client-side code.
curl -H "Authorization: Bearer blk_your_api_key_here" \
https://your-domain.com/api/v1/coursesAPI keys support granular permissions. When creating a key, you can restrict access:
| Permission | Access |
|---|---|
* | Full access to all resources |
courses:read | Read courses, sections, and lessons |
courses:write | Create, update, and delete courses |
students:read | List and view students |
students:write | Register and update students |
enrollments:read | View enrollment data and progress |
enrollments:write | Enroll students and update progress |
communities:read | Read communities, threads, comments |
communities:write | Manage communities and content |
/api/v1/api-keysCreate a new API key (requires session auth)
{
"name": "Production API",
"description": "Used by our automation pipeline",
"producerId": "prod_abc123",
"permissions": ["courses:*", "students:*", "enrollments:*"],
"expiresInDays": 90
}/api/v1/api-keysList all your API keys (requires session auth)
/api/v1/api-keys?id={keyId}Revoke an API key (requires session auth)
The API returns consistent JSON error responses with appropriate HTTP status codes.
{
"error": "not_found",
"message": "Course not found"
}| Status | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad request -- invalid input or validation error |
401 | Unauthorized -- missing or invalid API key |
403 | Forbidden -- insufficient permissions |
404 | Not found -- resource doesn't exist |
409 | Conflict -- duplicate slug, email, or enrollment |
500 | Internal server error |
List endpoints return paginated results. Use page and limit query parameters.
curl -H "Authorization: Bearer blk_..." \
"https://your-domain.com/api/v1/courses?page=2&limit=10"{
"data": [ ... ],
"pagination": {
"page": 2,
"limit": 10,
"total": 47,
"totalPages": 5,
"hasMore": true
}
}Register, list, and manage student accounts.
/api/v1/studentsRegister a new student
Request body
| Name | Type | Description |
|---|---|---|
name* | string | Student's full name |
email* | string | Unique email address |
password | string | Min 8 characters. Auto-generated if omitted |
avatarUrl | string | Profile picture URL |
bio | string | Short biography (max 2000 chars) |
curl -X POST -H "Authorization: Bearer blk_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "jane@example.com",
"password": "securepass123"
}' \
https://your-domain.com/api/v1/students{
"student": {
"id": "abc123",
"name": "Jane Smith",
"email": "jane@example.com",
"avatarUrl": null,
"bio": null,
"role": "student",
"createdAt": "2026-03-16T10:00:00.000Z"
}
}/api/v1/studentsList all students
Query parameters
| Name | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Results per page (1-100, default: 20) |
search | string | Search by name |
/api/v1/students/{id}Get a student by ID
/api/v1/students/{id}Update a student's profile
Request body
| Name | Type | Description |
|---|---|---|
name | string | Updated name |
avatarUrl | string | null | Updated avatar URL |
bio | string | null | Updated bio |
Create and manage courses with full curriculum support.
/api/v1/coursesCreate a new course with optional sections and lessons
Request body
| Name | Type | Description |
|---|---|---|
title* | string | Course title (max 200) |
slug* | string | URL-friendly slug (lowercase, hyphens) |
description | string | Full description (max 10000) |
shortDescription | string | Short summary (max 500) |
thumbnailUrl | string | Thumbnail image URL |
trailerUrl | string | Trailer video URL |
price | integer | Price in cents (default: 0) |
isFree | boolean | Free course flag (default: false) |
level | string | beginner | intermediate | advanced |
categoryId* | string | Category ID (see /categories) |
published | boolean | Publish immediately (default: false) |
sections | array | Array of sections with nested lessons |
{
"title": "Mastering TypeScript",
"slug": "mastering-typescript",
"description": "A comprehensive guide to TypeScript...",
"shortDescription": "Learn TypeScript from scratch",
"price": 4999,
"level": "intermediate",
"categoryId": "cat_abc123",
"sections": [
{
"title": "Getting Started",
"lessons": [
{
"title": "What is TypeScript?",
"description": "An introduction to TypeScript",
"duration": 600,
"videoUrl": "https://youtube.com/watch?v=abc123",
"isPreview": true
},
{
"title": "Setting Up Your Environment",
"duration": 480,
"videoUrl": "https://vimeo.com/123456789"
}
]
},
{
"title": "Type System Deep Dive",
"lessons": [
{
"title": "Primitive Types",
"duration": 720,
"videoUrl": "https://cdn.example.com/video.mp4"
}
]
}
]
}/api/v1/coursesList your courses
Query parameters
| Name | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Results per page (1-100, default: 20) |
search | string | Search by title |
status | string | Filter: published | draft | all |
/api/v1/courses/{courseId}Get a course with full curriculum
/api/v1/courses/{courseId}Update course metadata
/api/v1/courses/{courseId}Delete a course and all its content
/api/v1/courses/{courseId}/publishPublish a course (must have at least one lesson)
/api/v1/courses/{courseId}/publishUnpublish a course
Organize course content into sections (chapters).
/api/v1/courses/{courseId}/sectionsAdd a section to a course
Request body
| Name | Type | Description |
|---|---|---|
title* | string | Section title |
order | integer | Sort order (auto-assigned if omitted) |
/api/v1/courses/{courseId}/sectionsList all sections with their lessons
/api/v1/courses/{courseId}/sections/{sectionId}Update a section
Request body
| Name | Type | Description |
|---|---|---|
title | string | New title |
order | integer | New sort order |
/api/v1/courses/{courseId}/sections/{sectionId}Delete a section and all its lessons
Manage individual lessons within sections. Supports YouTube, Vimeo, and direct video URLs.
/api/v1/courses/{courseId}/sections/{sectionId}/lessonsCreate a new lesson
Request body
| Name | Type | Description |
|---|---|---|
title* | string | Lesson title (max 200) |
description | string | Lesson description (max 5000) |
duration | integer | Duration in seconds (default: 0) |
videoUrl | string | Video URL -- YouTube, Vimeo, or direct link |
isPreview | boolean | Allow non-enrolled preview (default: false) |
order | integer | Sort order (auto-assigned if omitted) |
{
"lesson": {
"id": "lesson_abc",
"title": "Introduction",
"videoUrl": "https://www.youtube.com/embed/dQw4w9WgXcQ",
"duration": 600,
"videoMeta": {
"type": "youtube",
"videoId": "dQw4w9WgXcQ",
"thumbnailUrl": "https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"originalUrl": "https://youtube.com/watch?v=dQw4w9WgXcQ"
}
}
}/api/v1/courses/{courseId}/sections/{sectionId}/lessonsList lessons in a section
.../{sectionId}/lessons/{lessonId}Get a single lesson with video metadata
.../{sectionId}/lessons/{lessonId}Update a lesson (including changing the video URL)
.../{sectionId}/lessons/{lessonId}Delete a lesson
Parse and validate video URLs from YouTube, Vimeo, and direct sources.
When you set a videoUrl on a lesson, the API automatically detects the provider and converts it to an embed URL. You can also use the parse endpoint to preview results before creating a lesson.
/api/v1/videos/parseParse a video URL without creating a lesson
{ "url": "https://youtube.com/watch?v=dQw4w9WgXcQ" }{
"video": {
"type": "youtube",
"originalUrl": "https://youtube.com/watch?v=dQw4w9WgXcQ",
"videoId": "dQw4w9WgXcQ",
"embedUrl": "https://www.youtube.com/embed/dQw4w9WgXcQ",
"thumbnailUrl": "https://img.youtube.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"provider": "YouTube",
"icon": "youtube",
"canEmbed": true
}
}| Provider | Example URLs |
|---|---|
| YouTube | youtube.com/watch?v=ID, youtu.be/ID, youtube.com/shorts/ID |
| Vimeo | vimeo.com/ID, player.vimeo.com/video/ID |
| Direct | Any .mp4, .webm, .ogg, .mov, .m3u8 URL |
Enroll students in courses and track their progress. Completing a course triggers achievements and certificates automatically.
/api/v1/enrollmentsEnroll a student in a course
Request body
| Name | Type | Description |
|---|---|---|
studentId* | string | Student user ID |
courseId* | string | Course ID |
curl -X POST -H "Authorization: Bearer blk_..." \
-H "Content-Type: application/json" \
-d '{"studentId": "user_123", "courseId": "course_456"}' \
https://your-domain.com/api/v1/enrollments/api/v1/enrollmentsList enrollments
Query parameters
| Name | Type | Description |
|---|---|---|
studentId | string | Filter by student |
courseId | string | Filter by course |
page | integer | Page number |
limit | integer | Results per page |
/api/v1/enrollments/{id}Get enrollment with lesson progress
/api/v1/enrollments/{id}Update lesson progress
Request body
| Name | Type | Description |
|---|---|---|
lessonId* | string | Lesson to update |
completed* | boolean | Mark as completed |
watchedSeconds | integer | Seconds watched (default: 0) |
Side effects: Updating progress automatically logs learning activity (streaks), checks for achievement unlocks, and issues a certificate when the course reaches 100% completion.
/api/v1/enrollments/{id}Remove an enrollment and all progress data
Create discussion communities for your students.
/api/v1/communitiesCreate a new community
Request body
| Name | Type | Description |
|---|---|---|
name* | string | Community name |
slug* | string | URL slug (unique) |
description | string | Community description |
coverImageUrl | string | Cover image URL |
isFree | boolean | Free to join (default: true) |
price | integer | Price in cents (default: 0) |
isPublic | boolean | Publicly visible (default: true) |
/api/v1/communitiesList your communities (paginated)
/api/v1/communities/{communityId}Get community details
/api/v1/communities/{communityId}Update community settings
/api/v1/communities/{communityId}Delete a community and all its content
Create and manage discussion threads within communities. Perfect for AI-powered community automation.
/api/v1/communities/{communityId}/threadsCreate a new thread
Request body
| Name | Type | Description |
|---|---|---|
title* | string | Thread title (max 200) |
content* | string | Thread body (max 20000) |
userId* | string | Author's user ID |
pinned | boolean | Pin thread to top (default: false) |
curl -X POST -H "Authorization: Bearer blk_..." \
-H "Content-Type: application/json" \
-d '{
"title": "Weekly Discussion: What did you learn this week?",
"content": "Share your wins, challenges, and insights...",
"userId": "bot_user_id",
"pinned": true
}' \
https://your-domain.com/api/v1/communities/{id}/threads/api/v1/communities/{communityId}/threadsList threads (paginated, pinned first)
.../threads/{threadId}Get thread with all comments
.../threads/{threadId}Update or pin/unpin a thread
.../threads/{threadId}Delete a thread and all its comments
Manage community membership and roles.
/api/v1/communities/{communityId}/membersAdd a member to a community
Request body
| Name | Type | Description |
|---|---|---|
userId* | string | User ID to add |
role | string | member | moderator | admin (default: member) |
/api/v1/communities/{communityId}/membersList all members with user info
/api/v1/communities/{communityId}/members?userId={id}Remove a member from the community
Add videos, files, and images to communities.
/api/v1/communities/{communityId}/mediaAdd a media item
Request body
| Name | Type | Description |
|---|---|---|
type* | string | video | file | image |
title* | string | Media title |
description | string | Media description |
url* | string | File URL |
fileName* | string | Original file name |
fileSize* | integer | Size in bytes |
mimeType | string | MIME type |
thumbnailUrl | string | Preview thumbnail URL |
duration | integer | Duration in seconds (for video) |
userId* | string | Uploader's user ID |
/api/v1/communities/{communityId}/mediaList media items
Query parameters
| Name | Type | Description |
|---|---|---|
type | string | Filter by type: video | file | image |
List available course categories. Use the category ID when creating courses.
/api/v1/categoriesList all categories
{
"categories": [
{
"id": "cat_abc123",
"name": "Web Development",
"slug": "web-development",
"icon": "code",
"order": 0
},
{
"id": "cat_def456",
"name": "Data Science",
"slug": "data-science",
"icon": "database",
"order": 1
}
]
}Get your API key and start building with the Blohko API today.
Comments
Add and manage comments on threads. Supports nested replies.
.../threads/{threadId}/commentsAdd a comment or reply
Request body
content*userId*parentId.../threads/{threadId}/commentsList comments (paginated)
.../comments/{commentId}Update a comment's content
.../comments/{commentId}Delete a comment and its replies