The Content Injection Pipeline allows external scripts and services to programmatically create lessons and materials on the LEAST platform. It is the primary integration point for automated content onboarding.
POST https://wherewelearn.com/api/inject.php
Content-Type: application/json
Authorization: Bearer {pipeline_key}
{
"title": "Introduction to Machine Learning",
"description": "A beginner-friendly overview of ML concepts.",
"url": "https://www.youtube.com/watch?v=example",
"type": "video",
"duration": 45,
"pillar": "Technology",
"tags": ["machine learning", "AI", "beginner"],
"association_ref": "ABC123DEF456GHI"
}
| Field | Type | Description |
|---|---|---|
title | string | Lesson title |
url | string | Content URL (YouTube, Vimeo, web page, etc.) |
type | string | Material type: video, article, document, interactive |
association_ref | string | The association (org/class) to create the lesson in |
| Field | Type | Description |
|---|---|---|
description | string | Lesson summary |
duration | integer | Estimated duration in minutes |
pillar | string | Curriculum pillar name |
tags | array | Free-text tags for search and AI enrichment |
ai_notes | boolean | Generate AI notes for the lesson (default: true) |
publish | boolean | Publish immediately (default: false — enters Review Queue) |
When a URL is submitted, LEAST automatically tests whether it can be embedded in an iframe:
By default, injected lessons enter the Educator Review Queue before going live. An educator must approve the lesson before it is visible to learners.
To publish immediately (for trusted automated pipelines): set publish: true and use admin credentials.
The injection endpoint uses a per-pipeline Bearer token distinct from the Collection API credentials. Request a pipeline token from a Level 3 administrator.
Retry-After header
If ai_notes is true (default), LEAST sends the lesson title, description, and URL to the AI enrichment pipeline: