Skip to main content
POST
/
training-assignments
Create training assignments.
curl --request POST \
  --url https://api.samsara.com/training-assignments \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "course": {
        "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
        "revisionId": "1214a1fa-f0c6-408b-bf85-51dc3bc71ac7"
      },
      "createdAtTime": "2019-06-13T19:08:25Z",
      "createdById": "user-4392",
      "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
      "isExistingAssignment": true,
      "learner": {
        "id": "938172",
        "type": "driver"
      },
      "dueAtTime": "2019-06-13T19:08:25Z"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

courseId
string
required

String for the course ID.

dueAtTime
string
required

Due date of the training assignment in RFC 3339 format. Millisecond precision and timezones are supported.

learnerIds
string[]
required

Optional string of comma separated learner IDs. If learner ID is present, training assignments for the specified learner(s) will be returned. Max value for this value is 100 objects. Example: learnerIds=driver-281474,driver-46282156

Response

OK response.

data
object[]
required

List of created training assignments.