---
title: "Update course assignments"
method: PUT
path: "/training/courses/v1/{courseId}/assignments"
tags: ["Training"]
---

# Update course assignments

`PUT /training/courses/v1/{courseId}/assignments`

Updates assignments for users, groups, and sites for a specific course.

## Path parameters

- `courseId` string, required

## Request body

- S12TrainingCoursesV1TrainingCoursesServiceUpdateCourseAssignmentsBody
  - `assignments` S12TrainingCoursesV1UpdateCourseAssignmentsRequestAssignment[] — List of assignment changes for the course
    - `id` string — Id of the type getting assigned. (ie. if type=ASSIGNMENT_TYPE_USER then id should be a user Id)
    - `type` 'ASSIGNMENT_TYPE_UNSPECIFIED' | 'ASSIGNMENT_TYPE_USER' | 'ASSIGNMENT_TYPE_GROUP' | 'ASSIGNMENT_TYPE_SITE'
    - `isAssigned` boolean — The assignment state of the entity
  - `universalAccess` boolean — Assign course to all Training users within the orginzation
  - `clearAllUsers` boolean — Remove all course user assignments
  - `clearAllGroups` boolean — Remove all course group assignments
  - `clearAllSites` boolean — Remove all course site assignments

## Response `200`

A successful response.

- S12TrainingCoursesV1UpdateCourseAssignmentsResponse
  - `usersUpdated` integer — How many user assignment were updated in the request
  - `groupsUpdated` integer — How many group assignments were updated in the request
  - `sitesUpdated` integer — How man site assignments were updated in the request

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/safetyculture/apis/safetyculture-api.md) · [All operations](https://skmtc.net/safetyculture/apis/safetyculture-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/safetyculture/safetyculture-api/revisions/5be91df61ded/schema)
