Create Audio Teaching Material
Uploads a file, such as an audio file, PDF, image, document or presentation, as a teaching material in a curriculum section. The file goes in the same request.
/tutor/materialscurl --request POST \
--url 'https://<your-api-host>/nuSource/api/v1/tutor/materials' \
--header 'APIKEY: <your-api-key>' \
--header 'ORGID: <your-org-id>' \
--form 'JSONString={
"section_id": "370496",
"material_name": "Interview",
"file_name": "Sanak.mp3",
"description": "<p><br></p>",
"material_source": "file",
"is_downloadable": true,
"external_url": "",
"html_text": "",
"type": "audio/mpeg",
"max_views": -1,
"external_video_play": 0,
"is_prerequisite": 0,
"platform_type": 1,
"is_drm": 0,
"is_enterprise_drm": 0,
"language_id": null,
"is_videocrypt_drm": 0,
"is_scorm": 0,
"isscorm_withanalytics": 0,
"vdocipher_video_id_for_direct_upload": null
}' \
--form 'uploaded_file='{
"code": 200,
"message": "Teaching material created successfully",
"material": {
"material_id": 1617738,
"file_name": "Sanak.mp3",
"description": "<p><br></p>",
"material_name": "Interview",
"material_source": "file",
"type": "audio/mpeg",
"external_url": null,
"section_id": "370496",
"is_drm": 0,
"is_downloadable": true,
"is_watermarked": null,
"watermark_text": null,
"is_enterprise_drm": 0,
"display_index": 1617738,
"resource_type": 4
}
}Access: Institute admins and tutors of the course the section belongs to. Custom roles need the manage-curriculum permission and must also be an admin or a tutor of that course.
Request body: form-data with one field, JSONString, containing this JSON, plus the file in a field named uploaded_file:
JSONStringfile (uploaded file or video), external_url (link), html_text (text/HTML page), feedback_form, lti (external LTI tool) or vimeo (existing Vimeo video by ID).1 makes learners finish this material before they can open later items. Default 0.1.audio/mpeg. The stored type is detected from the file itself.true lets learners download the file.-1 (default) means unlimited.1 adds a text watermark. PDFs only; ignored for other files.is_watermarked is 1. Default NV.Set material_source to file for this request.
200Teaching material created successfullyShow child attributesHide child attributes
Sanak.mp3<p><br></p>Interviewfileaudio/mpeg3704960true0Notes: For audio files the duration is read from the file and stored. File names that are too long are rejected. Upload fails with "Uploaded file should be [...]" for other file types, or "File Upload failed! Try again" if storage fails. For videos, prefer "Create Normal Video Teaching Material", which uploads straight to the video host. If the section is already published in a batch, enrolled learners get a "New Material Added" push notification. Errors: "Invalid Section ID" (section not found or not in your institute), and a tutor-only error if you are not an admin or tutor of the course. Rate limit: 30 requests per 1 minute; going over locks you out for 30 minutes.