Samsara Developer Portal

Integrate your data with the Samsara API, customize the Samsara experience, and join a community of developers building with Samsara.

Get Started

Quickstart

Samsara provides a robust set of REST APIs and Webhooks to allow you to integrate Samsara into virtually any platform. These APIs cover all of Samsara's major product areas, including telematics, safety, connected driver, and industrial management.

Authentication

To make a call to the Samsara REST API, you need an API token. Go to the Settings page of the Samsara Dashboard by clicking the gear icon on the left-side nav bar. Then scroll down to "API Tokens".

Samsara Dashboard -> Settings -> API Tokens

Click "Add an API Token". You can select from a Full Admin token (full read/write privileges) or a Read-only token.

Samsara uses the Bearer Token HTTP authentication scheme. In order to use the authentication token, include it in the Authorization header in your HTTP request:

curl --request GET 'https://api.samsara.com/fleet/vehicles' \
--header 'Authorization: Bearer <<token>>'

The Samsara API returns JSON-encoded responses:

{
    "data": [
        {
            "id": "212014918732717",
            "name": "Little Red",
            "vin": "JTMBK32V895081147",
            "serial": "GCKT9ZM8R9",
            "make": "Toyota",
            "model": "Rav4",
            "year": "2008",
            "harshAccelerationSettingType": "automatic",
            "notes": "",
            "licensePlate": "6KDB798",
            "externalIds": {
                "samsara.serial": "GCKT9ZM8R9",
                "samsara.vin": "JTMBK32V895081147"
            }
        }
    ],
    "pagination": {
        "endCursor": "",
        "hasNextPage": false
    }
}

Check out the REST API Overview to learn about the different capabilities of the Samsara REST API. Also check out the Webhooks guide to see how you can set up webhooks to notify your applications of different events of interest.

Postman

Postman is an easy to use, point and click tool for testing REST APIs.

You can import Samsara's OpenAPI spec directly into Postman to get started testing our REST APIs.

📘

Samsara's OpenAPI spec is always kept up-to-date, so you can re-import the spec into Postman whenever you like.

  1. Download the Postman app.
  2. In the Postman app, import our OpenAPI spec by pasting the following link into the Import dialog box:
https://raw.githubusercontent.com/samsarahq/api-docs/master/swagger.json
  1. The collection will auto-populate on the left-hand panel with folders containing all of Samsara's APIs.
  1. Select the API you wish to test and fill in the parameters or request body.

OR

  1. Fill in the Authorization tab by selecting "Bearer Token" and pasting in your API access token.
  1. Click "Send" and inspect the response.

Updated 2 months ago



Quickstart


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.