Skip to main content
GET
/
form-templates
Get a list of form templates.
curl --request GET \
  --url https://api.samsara.com/form-templates \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "createdAtTime": "2019-06-13T19:08:25Z",
      "createdBy": {
        "id": "938172",
        "type": "driver"
      },
      "fields": [
        {
          "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
          "isRequired": true,
          "label": "Engine Hours",
          "type": "number",
          "allowManualEntry": true,
          "allowedAssetTypes": [
            "vehicle",
            "trailer"
          ],
          "allowedDateTimeValueType": "datetime",
          "autofillFromId": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
          "columns": [
            {
              "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
              "label": "Engine Hours",
              "type": "number",
              "allowManualEntry": true,
              "allowedDateTimeValueType": "datetime",
              "filterByRoleIds": [
                "23d4d8d3-dc10-4e7a-a183-69968751f23e"
              ],
              "includeDrivers": true,
              "includeUsers": true,
              "numDecimalPlaces": 2,
              "options": [
                {
                  "id": "e879028d-bce5-0238-ffec-11cd9236bcda",
                  "label": "Yes",
                  "ignoreQuestionFromScoreIfSelected": false,
                  "optionScoreWeight": 5
                }
              ]
            }
          ],
          "conditionalActions": [
            {
              "actions": [
                {
                  "type": "askFollowupQuestion",
                  "fieldId": "bd673690-f09b-4f3d-93bd-99c4b2971554",
                  "sectionId": "bd673690-f09b-4f3d-93bd-99c4b2971554"
                }
              ],
              "condition": {
                "type": "multipleChoiceValueCondition",
                "selectedOptionIds": [
                  "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7"
                ]
              }
            }
          ],
          "filterByRoleIds": [
            "23d4d8d3-dc10-4e7a-a183-69968751f23e"
          ],
          "includeDrivers": true,
          "includeUsers": true,
          "isAutofillSource": true,
          "numDecimalPlaces": 2,
          "options": [
            {
              "id": "e879028d-bce5-0238-ffec-11cd9236bcda",
              "label": "Yes",
              "ignoreQuestionFromScoreIfSelected": false,
              "optionScoreWeight": 5
            }
          ],
          "questionWeight": 5
        }
      ],
      "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
      "revisionId": "1214a1fa-f0c6-408b-bf85-51dc3bc71ac7",
      "sections": [
        {
          "fieldIndexFirstInclusive": 0,
          "fieldIndexLastInclusive": 9,
          "id": "dbab5bc8-e41c-4b52-bfa5-fd2c7e809b00",
          "label": "Engine Hours"
        }
      ],
      "title": "Form Template Title",
      "updatedAtTime": "2019-06-13T19:08:25Z",
      "updatedBy": {
        "id": "938172",
        "type": "driver"
      },
      "approvalConfig": {
        "type": "singleApproval",
        "singleApprovalConfig": {
          "allowManualApproverSelection": true,
          "requirements": {
            "roleIds": [
              "23d4d8d3-dc10-4e7a-a183-69968751f23e"
            ]
          }
        }
      },
      "description": "This is a form template description.",
      "formCategory": "general"
    }
  ],
  "pagination": {
    "endCursor": "MjkY",
    "hasNextPage": true
  }
}

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

ids
string[]

A comma-separated list containing up to 100 template IDs to filter on.

after
string

If specified, this should be the endCursor value from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.

Response

OK response.

data
object[]
required

List of form templates.

pagination
object
required

Pagination parameters.