Skip to content

Assign a training course to a group or department

PUT
/v1/training/courses/{courseId}/assignments
curl --request PUT \
--url https://api.varman.io/v1/training/courses/example/assignments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "groupId": "example", "department": "it", "dueDate": "2027-01-31" }'

Assigns a course to a group or a department (send exactly one of groupId and department) with an optional due date, or updates the due date. Once a course has any assignment, only members of assigned groups or departments must take it.

courseId
required
string

Course id, e.g. sat-1

Media typeapplication/json
object
groupId

Group id (grp_…) that must take the course

string
department

Department that must take the course. Built-in values: admin, gov, hr, it, itsm, qms. Custom department names are also accepted; “none” is rejected.

string
<= 64 characters

Example

it
dueDate

Optional due date (ISO 8601). Omit or send null for no due date.

string
nullable

Example

2027-01-31

The assignment