---
title: "Update training assignments."
method: PATCH
path: "/training-assignments"
tags: ["TrainingAssignments"]
---

# Update training assignments.

`PATCH /training-assignments`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/training-assignments`
- Auth: HTTP bearer

Update training assignments. Non-driver user learners are available only for organizations with non-driver training enabled. Contact your Samsara representative to request access.

 <b>Rate limit:</b> 10 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select **Write Training Assignments** under the Training Assignments category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

## Query parameters

- `ids` string[], required
- `dueAtTime` string, required

## Response `200`

OK response.

- TrainingAssignmentsPatchTrainingAssignmentsResponseBody
  - `data` TrainingAssignmentResponseObjectResponseBody[], required: List of updated training assignments.
    - `completedAtTime` string, date-time: Time training assignment is completed. UTC timestamp in RFC 3339 format. Returned when a training assignment completion status is "complete".
    - `course` TrainingCourseObjectResponseBody, required: Course that is associated with the training assignments.
      - `id` string, uuid, required: ID of the course.
      - `revisionId` string, uuid, required: ID of the course's specific version.
    - `createdAtTime` string, date-time, required: Creation time of the training assignment. UTC timestamp in RFC 3339 format.
    - `createdById` string, required: ID of the user who created the training assignment.
    - `deletedAtTime` string, date-time: Time training assignment is deleted. UTC timestamp in RFC 3339 format.
    - `dueAtTime` string, date-time: Time training assignment is due. UTC timestamp in RFC 3339 format. Returned when an assignment has a due date set by an admin.
    - `durationMinutes` integer, required: Time spent on the training assignment.
    - `id` string, required: ID of the training assignment.
    - `isCompletedLate` boolean: Indicates whether the training assignment was completed on time or not. Returned when a training assignment completion status is "complete" and has a dueAtTime set by an admin.
    - `isOverdue` boolean: Indicates whether the training assignment is past the due date. Returned when a training assignment completion status is 'inProgress' or 'notStarted' and has a dueAtTime set by an admin.
    - `learner` TrainingLearnerObjectResponseBody, required: Learner that is associated with the training assignment.
      - `id` string, required: ID of the polymorphic user.
      - `type` 'unknown' | 'driver' | 'user', required: The learner type. Returns `unknown` when the learner type is not recognized. Non-driver user learners are available only for organizations with non-driver training enabled. Contact your Samsara representative to request access. Valid values: `unknown`, `driver`, `user`
    - `scorePercent` number, double: Quiz score associated with training assignment. Returned when a training assignment completion status is "complete".
    - `startedAtTime` string, date-time: Time training assignment is started. UTC timestamp in RFC 3339 format. Returned when a training assignment completion status is "complete" or "inProgress".
    - `status` 'notStarted' | 'inProgress' | 'completed', required: State for the Training Assignment. Always returned. Valid values: `notStarted`, `inProgress`, `completed`
    - `updatedAtTime` string, date-time, required: Time training assignment was updated by either a learner or an admin. UTC timestamp in RFC 3339 format.
    - `updatedById` string, required: ID of the user who updated the training assignment, either an admin or a learner.

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request response.

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
