Save a course translation in one language
put
https://mudey.fr/api/v1/courses/{courseId}/translations/{language}courses:writeCreates or REPLACES the translation for this language. Sections and lessons are referenced by their ID (see the course); an unknown ID is ignored. A published language that no longer passes the checks goes back to draft. publish: true publishes it in the same call.
Authorization: Bearer mudey_sk_… header required. Create and use a key
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| courseId* | path | string | |
| language* | path | fr | en | nl | Site language (fr, en or nl), other than the course language. |
JSON body
Fields marked * are required.
| Field | Type | Description |
|---|---|---|
| title | string | Translated title (required). |
| subtitle | string | null | Translated subtitle. |
| shortDescription | string | null | Translated tagline. |
| description | string | null | Translated description, in simple HTML (paragraphs, lists, bold, links), cleaned when saved. |
| objectives | string[] | What the student will learn, translated. |
| requirements | string[] | Translated prerequisites. |
| targetAudience | string[] | Target audience, translated. |
| welcomeMessage | string | null | Translated welcome message, plain text: sent with the enrollment confirmation and shown in the player. |
| congratulationsMessage | string | null | Translated congratulations message, plain text: shown to students who complete the course. |
| sections | object | Translated sections, by section ID: { "<sectionId>": { "title": "…" } }. |
| lessons | object | Translated lessons, by lesson ID: { "<lessonId>": { "title": "…", "description": "…" } }. |
| publish | boolean | Publish the language after saving (complete translation required). |
Responses
200Translation saved.400Language not available (invalid_language): the course's own language, or not a site language.401Missing, invalid, revoked or expired key.403Missing permission on the key, or the account is no longer an instructor.404Resource not found among your courses.409Publication requested but the translation is incomplete (translation_incomplete): `details` lists what is missing.422Invalid data (details lists the fields).429Rate limit exceeded (300 calls per minute per key). See the Retry-After header.
Example
export MUDEY_API_KEY="mudey_sk_..."
export COURSE_ID="..." # replace me
export LANGUAGE="..." # replace me
curl -X PUT "https://mudey.fr/api/v1/courses/$COURSE_ID/translations/$LANGUAGE" \
-H "Authorization: Bearer $MUDEY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Learn TypeScript",
"subtitle": "From the basics to advanced types",
"description": "<p>From the basics to advanced types, with corrected exercises in every section.</p>",
"objectives": [
"Type a React application",
"Write generic types"
],
"welcomeMessage": "Welcome! Start with the first section, at your own pace.",
"congratulationsMessage": "Well done, you have completed the course!",
"sections": {
"4b2f0c1e-0000-4000-8000-000000000001": {
"title": "The basics"
}
},
"lessons": {
"9d1a7e3c-0000-4000-8000-000000000011": {
"title": "Installing TypeScript"
},
"9d1a7e3c-0000-4000-8000-000000000012": {
"title": "Primitive types"
}
},
"publish": true
}'