Create a custom training course
POST
/v1/training/courses
const url = 'https://api.varman.io/v1/training/courses';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"title":"Visitor and badge policy","description":{},"category":"Security awareness","videoUrl":{},"content":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.varman.io/v1/training/courses \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "title": "Visitor and badge policy", "description": {}, "category": "Security awareness", "videoUrl": {}, "content": {} }'Creates an org-owned course with a video link and/or text content. It is optional until assigned to a group. Employees finish it by marking it complete.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
title
required
string
Example
Visitor and badge policydescription
object
category
required
string
videoUrl
Video link (YouTube, Vimeo, Loom or a direct https file)
object
content
Plain text or markdown content
object
Responses
Section titled “Responses”The new course