# Samsara Developers > Build with Samsara's REST APIs, webhooks, and streaming data to connect telematics, safety, driver workflows, and asset data to your applications. ## Docs - [Welcome](/index.md): Build with Samsara's REST APIs and webhooks to connect telematics, safety, driver workflows, and asset data to your applications. - [Quickstart](/fundamentals/getting-started.md): Generate an API token and make your first authenticated request to the Samsara REST API. - [Postman Collection](/fundamentals/postman-collection.md): Import the Samsara OpenAPI spec into Postman to test every REST endpoint with point-and-click ease. - [OpenAPI Spec](/fundamentals/openapi-spec.md): Samsara documents its REST APIs using the OpenAPI Specification, available as a single up-to-date JSON file. - [API Authentication](/fundamentals/authentication.md): Generate API tokens, configure granular scopes, and authenticate Samsara API requests with Bearer authentication. - [OAuth 2.0](/fundamentals/oauth-20.md): Recommended authentication mechanism for marketplace applications using the OAuth 2.0 authorization code grant flow. - [3rd Party Integration Tokens](/fundamentals/tokens-for-3rd-party-integrations.md): Configure API tokens with the appropriate Read-only Admin or Full Admin scope when granting access to a third-party integration. - [Legacy API Tokens](/fundamentals/legacy-api-tokens.md): Understand legacy API tokens created before February 2022 and upgrade them to use granular scopes. - [API Release Stages](/fundamentals/beta-and-preview-apis.md): Understand how Samsara APIs progress through Preview, Beta, General Availability, and Deprecated stages. - [Subscribe to Changelog Updates](/fundamentals/subscribe-to-api-updates.md): Get email notifications whenever Samsara API or Webhook changelog posts are published. - [Developer Metrics](/fundamentals/developer-metrics.md): Review your integration's API and webhook health, retrieve detailed logs, and diagnose issues from the Developer Metrics page. - [Mobile App Deep Links](/fundamentals/mobile-deep-links.md): Link to specific screens in the Samsara Driver and Fleet mobile apps from your own mobile application. - [Client Libraries and SDKs](/fundamentals/sdks.md): Official Samsara SDKs for Python, .NET, TypeScript, Java, Go, and other languages to accelerate your integration. - [REST API Overview](/api-features/rest-api-overview.md): Survey the main resources available through Samsara's REST API, including telematics, drivers, routes, compliance, and more. - [Base URL](/api-features/base-url.md): Reach the Samsara API at api.samsara.com globally and api.eu.samsara.com for EU customers. - [Request Methods](/api-features/request-methods.md): Reference the HTTP request methods used by Samsara API endpoints, including the difference between PATCH and PUT. - [Response Codes](/api-features/response-codes.md): Interpret HTTP status codes returned by the Samsara API and learn how to handle 2XX, 4XX, and 5XX responses. - [Rate Limits](/api-features/rate-limits.md): Understand global, per-token, and endpoint-level rate limits across the Samsara API and how to handle 429 responses. - [Timestamps](/api-features/timestamps.md): Understand the RFC 3339 and Unix timestamp formats used across Samsara's API generations. - [Pagination](/api-features/pagination.md): Iterate through paginated list endpoints using cursor-based pagination with the endCursor and hasNextPage fields. - [Filtering](/api-features/filtering.md): Filter Samsara API results by tag hierarchy, object IDs, and creation or update timestamps. - [External IDs](/api-features/external-ids.md): Reference Samsara objects using your own custom identifier keys and values across drivers, vehicles, addresses, and more. - [Versioning](/api-features/versioning.md): Learn how Samsara versions its API for backwards-incompatible changes and how to pin requests to a specific API version. - [Custom Attributes](/api-features/custom-attributes-guide.md): Define and assign custom attributes to drivers, vehicles, trailers, and equipment to categorize and filter your data. - [Technology Partner Program](/partners/technology-partner-program.md): Build integrations and applications on Samsara to reach the world's most complex operations. - [Application Process](/partners/application-process.md): Apply to be part of the Samsara Technology Partner Program in three steps. - [Partner Developer Portal](/partners/partner-developer-portal.md): Use the Partner Developer Portal to draft apps, test in a sandbox, and manage Marketplace listings. - [Sandboxes](/partners/sandboxes.md): Test your integration safely against a non-production Samsara environment that mirrors a customer dashboard. - [Create and Manage Apps](/partners/marketplace-apps.md): Build, list, and version Samsara Marketplace apps to connect your solution to the Connected Operations Cloud. - [App Certification Process](/partners/app-certification-process.md): Steps and review timing for getting your app certified and listed on the Samsara App Marketplace. - [Partner Support](/partners/partner-support.md): How to get help, file support tickets, and find self-serve resources as a Samsara technology partner. - [Samsara Integration Guide for FMC Partners](/partners/samsara-integration-guide-for-fmc-partners.md): End-to-end implementation guidance for Fleet Management Companies integrating with Samsara across telematics, safety, maintenance, and workflows. - [Data Connectors](/use-cases/data-connectors.md): Extend the capabilities of your Samsara data with an easy-to-use suite of data connectors for analytics, streaming, pipelining, and point-to-point integrations. - [Power BI Connector](/use-cases/power-bi-connector-additional-guidance.md): Common questions and additional setup guidance for the Samsara Power BI Connector, including data refresh, multi-organization, and historical data retrieval. - [Driver Behavior Guide](/use-cases/driver-behavior-guide.md): Collect safety and efficiency metrics on drivers to make informed decisions using Samsara's vehicle gateway and AI dash cam data. - [Fuel Card Integration](/use-cases/fuel-card-integration.md): Learn how to build a Fuel Card Integration for the Samsara App Marketplace. - [Human Capital Management (HCM)](/use-cases/human-capital-management-hcm.md): Create a Samsara API integration for payroll or time tracking. - [Insuretech](/use-cases/insuretech.md): Learn how to integrate Samsara data with insurtech software. - [Maintenance & Fault Monitoring](/use-cases/maintenance-fault-monitoring-guide.md): Integrate with maintenance & work order systems by monitoring fault codes, managing digital vehicle inspection reports, and scheduling planned maintenance. - [Fault Monitoring](/use-cases/fault-monitoring.md): There are two ways for your application to integrate with Samsara's fault monitoring feature:. - [Driver Vehicle Inspection Reports](/use-cases/digital-vehicle-inspection-reports.md): Driver Vehicle Inspection Reports (DVIRs) can be created and managed through the Samsara cloud dashboard, the Samsara Driver App, and the Samsara REST API. - [Planned & Preventative Maintenance](/use-cases/planned-preventative-maintenance.md): For certain maintenance and planning systems, you may want to generate work orders for planned or preventative maintenance based on vehicle usage, such as odometer or engine run... - [Tell Tale Statuses Monitoring](/use-cases/tell-tales-monitoring.md): Tell tales are vehicle dashboard indicators that provide real-time status information about various vehicle systems and conditions. Samsara specifically reports tell tales that... - [Mileage and Distance](/use-cases/mileage-and-distance.md): How to calculate mileage and distance traveled. - [Payroll](/use-cases/payroll-guide.md): Calculate payroll by tracking hours or miles driven. - [TMS Integration](/use-cases/tms-integration.md): How to integrate Samsara with a Transport Management System (TMS). - [GPS Asset Tracking](/use-cases/tms-gps-tracking.md): Monitor asset locations and telematics for vehicles and trailers. - [Routing](/use-cases/routing/routing-guide.md): Integrate route creation, assignment, and progress tracking with your TMS. - [Stop Locations](/use-cases/routing/route-locations.md): Manage the location where a route stop is planned. - [Creating Routes](/use-cases/routing/creating-routes-via-api.md): Create and assign routes and configure route start and completion settings. - [Creating Stop Tasks](/use-cases/routing/creating-route-stop-tasks-via-api.md): Define tasks for a driver to complete using Samsara's Documents feature. - [Updating Routes](/use-cases/routing/making-changes-to-a-route-via-api.md): This example will guide you through the following:. - [Track Route Progress](/use-cases/routing/capturing-live-route-progress-via-api.md): You can poll for route stop state changes using this REST API endpoint:. - [Capture Task Completion](/use-cases/routing/capturing-task-completions-via-api.md): This guide will describe how to capture route stop task completions by:. - [Y-splits (T-calls)](/use-cases/routing/y-splits-t-calls.md): Learn how to handle planned and ad hoc Y-splits (T-calls). - [Compliance](/use-cases/tms-compliance.md): Fleets rely on **Samsara’s compliance features** to ensure drivers follow Hours of Service (HOS) and Tachograph regulations. - [Driver-dispatch Messaging](/use-cases/driver-dispatch-messaging.md): Used to coordinate pickups, share updates, and clarify route instructions. - [Forms and Workflows](/use-cases/forms-and-workflows/forms-and-workflows.md): Adding forms workflows to your TMS integration. - [Migrating From Documents to Forms](/use-cases/forms-and-workflows/migrating-from-documents-to-forms.md): Starting in Summer 2024, some Samsara customers will by default have a new experience for submitting what Samsara has historically called Driver Documents. - [Addresses](/core-resources/addresses-guide.md): Create and manage known locations with circular and polygonal geofences using the Samsara Addresses API. - [Drivers](/core-resources/drivers-guide.md): Create, retrieve, update, and deactivate drivers with carrier and compliance settings using the Samsara Drivers API. - [Assets: Vehicles, Trailers, and Equipment](/core-resources/assets-vehicles-trailers-equipment.md): Manage assets including vehicles, trailers, powered equipment, unpowered equipment, and more through the unified `/assets` endpoints. - [Tachograph (EU Only)](/core-resources/tachograph-guide.md): Get driver activity and remote downloads of tachograph data for Samsara EU customers. - [Compliance and ELD](/core-resources/compliance-guide.md): Manage hours of service and records of duty status for your fleet using the Samsara Compliance API. - [Daily Duty Status Summaries](/core-resources/daily-logs.md): Get a summarized report of daily duty status activity for each driver across an arbitrary time range. - [Telematics](/core-resources/telematics.md): Get real-time or historical GPS and onboard diagnostic data for every vehicle in your organization. - [Telematics Snapshot](/core-resources/vehicle-stats-snapshot.md): Get a snapshot of GPS and onboard diagnostic data for all vehicles at a given point in time. - [Historical Report](/core-resources/telematics-history.md): Pull a historical report of GPS and onboard diagnostic data between a given start time and end time. - [Telematics Sync](/core-resources/vehicle-stats-feed.md): Synchronize GPS and onboard diagnostic data using a cursor-based feed of vehicle stat updates. - [Calculating Distance Traveled](/core-resources/calculating-distance-traveled-guide.md): Best practices and sample code for measuring distance traveled accurately using Samsara's Vehicle Stats API. - [Driver-Vehicle Assignments](/core-resources/driver-vehicle-assignments/driver-vehicle-assignments.md): Track which driver was operating which vehicle over a given time period to keep your fleet safe and compliant. - [Creating Driver-Vehicle Assignments](/core-resources/driver-vehicle-assignments/creating-driver-vehicle-assignments.md): Step-by-step guide to assigning drivers to vehicle drive-time in Samsara. - [Migrating From Driver Vehicle-Assignment or Vehicle Driver-Assignment Endpoints](/core-resources/driver-vehicle-assignments/migrating-from-driver-vehicle-assignment-or-vehicle-driver-assignment-endpoints.md): Migrate from the deprecated Driver Vehicle-Assignment and Vehicle Driver-Assignment endpoints to the consolidated Driver-Vehicle Assignment endpoint. - [Driver-Vehicle Assignment FAQs](/core-resources/driver-vehicle-assignments/driver-vehicle-assignment-faqs.md): Answers to common questions about correcting, ending, and interpreting driver-vehicle assignments in Samsara. - [Documents](/core-resources/documents/documents-guide.md): Create and manage forms that drivers fill out in the Samsara Driver App using the Documents API. - [Creating Documents](/core-resources/documents/creating-documents.md): Create documents for drivers to fill out, or submit documents on a driver's behalf, using the Documents API. - [Document Submission Webhook](/core-resources/documents/document-submission-webhook.md): Receive webhook notifications when drivers submit documents and retrieve the full document via the API. - [Document PDFs](/core-resources/documents/document-pdfs.md): Download PDF versions of driver documents using a two-step asynchronous job pattern. - [Forms](/core-resources/forms/forms.md): Digitize inspections, checklists, and custom workflows with Samsara's Connected Forms API. - [Create and Assign Forms](/core-resources/forms/creating-forms.md): Digitize forms, build workflows, and automate processes by creating and assigning Samsara form submissions. - [Form Fields](/core-resources/forms/field-types.md): Reference for every form field type, including text, person, datetime, multiple choice, table, signature, and more. - [Forms With Tables](/core-resources/forms/forms-with-tables.md): Pre-populate Samsara form submissions that include table fields with structured row and column data. - [Form Statuses](/core-resources/forms/form-statuses.md): Track progress and categorize next steps for Samsara form submissions across approval and non-approval flows. - [Working With Issues From Forms](/core-resources/forms/working-with-issues-from-forms.md): Monitor and retrieve issues submitted via Samsara forms to enable real-time workflows and proactive resolution. - [Training](/core-resources/training/training.md): Automate Samsara Training course assignments via API for onboarding, event-based, and recurring training scenarios. - [Scheduling Training](/core-resources/training/scheduling-training.md): Automate scheduled training course assignments to drivers on a regular cadence using the Samsara Training API. - [New Driver Training](/core-resources/training/new-driver-training.md): Assign onboarding training courses automatically to new drivers added to your Samsara organization. - [Event-Triggered Safety Training](/core-resources/training/safety-events-training.md): Automatically assign training courses to drivers based on safety events and safety scores. - [Event-Triggered Compliance Training](/core-resources/training/compliance-events-training.md): Automatically assign training courses to drivers based on Hours of Service violations. - [IFTA Detail CSV](/core-resources/ifta-detail-csv.md): Field reference for CSV files generated by the Samsara `/ifta-detail/csv` endpoint. - [Readings](/core-resources/readings.md): Snapshot, historical, and feed access to time-series readings for assets and sensors via the Readings API. - [Recipes](/recipes/index.md): Example scripts and implementation patterns for common Samsara API workflows. - [Write VG Install Statuses to CSV File](/recipes/write-vg-install-statuses-to-csv-file.md): Export Vehicle Gateway installation statuses to a CSV file using the Samsara REST API. - [Creating a Route](/recipes/creating-a-route.md): Create a route with assigned drivers, registered addresses, single-use stop locations, and route settings. - [Write Live Telematics Data to a CSV File](/recipes/write-live-telematics-data-to-a-csv-file.md): Stream live vehicle GPS pings with odometer decorations from the vehicle stats feed into a CSV file. - [Export Route Status Report](/recipes/export-route-status-report.md): Create a CSV report of route assignment, schedule, timeliness, and current stop status. - [Custom Duty Status Report](/recipes/custom-duty-status-report.md): Create a CSV report of distance driven and time spent in selected HOS duty status types. - [HOS Exemption Report](/recipes/hos-exemption-report.md): Generate a CSV report of HOS exemptions claimed over a date range. - [OAuth 2.0](/recipes/oauth-20.md): Implement Samsara OAuth authorization, token exchange, refresh, API calls, and revocation. - [Data Replication (Database/CSV)](/recipes/data-replication-databasecsv.md): Replicate vehicle stats and driver-vehicle assignment data into a database or CSV file. - [Trip Export Report](/recipes/trip-export-report.md): Export historical trip data for multiple vehicles to a CSV file. - [What Are Webhooks?](/webhooks/webhooks.md): Receive real-time HTTP notifications from Samsara when alerts trigger or platform events occur in your account. - [Alert Webhooks](/webhooks/webhook-reference.md): Configure Samsara alerts to send notifications to your webhook endpoints, choosing between 1.0 and 2.0 payload formats. - [Event Subscriptions](/webhooks/event-subscriptions-webhooks.md): Subscribe directly to Samsara platform events through webhooks without needing to create an Alert first. - [Webhooks 2.0 Reference](/webhooks/event-subscriptions.md): Subscribe to Samsara platform events with rich JSON payloads and a full set of event schemas. - [AlertIncident Event Schema](/webhooks/event-schemas/alertincident.md): Webhook payload schema for the AlertIncident event triggered when a configured alert fires for a fleet condition. - [AddressCreated Event Schema](/webhooks/event-schemas/addresscreated.md): Webhook payload schema for the AddressCreated event sent when a new address is created in your organization. - [AddressUpdated Event Schema](/webhooks/event-schemas/addressupdated.md): Webhook payload schema for the AddressUpdated event sent when an existing address is modified. - [AddressDeleted Event Schema](/webhooks/event-schemas/addressdeleted.md): Webhook payload schema for the AddressDeleted event sent when an address is removed from your organization. - [DocumentSubmitted Event Schema](/webhooks/event-schemas/documentsubmitted.md): Webhook payload schema for the DocumentSubmitted event sent when a driver submits a document. - [DriverCreated Event Schema](/webhooks/event-schemas/drivercreated.md): Webhook payload schema for the DriverCreated event sent when a new driver is added to your organization. - [DriverUpdated Event Schema](/webhooks/event-schemas/driverupdated.md): Webhook payload schema for the DriverUpdated event sent when an existing driver record is modified. - [DvirSubmitted Event Schema](/webhooks/event-schemas/dvirsubmitted.md): Webhook payload schema for the DvirSubmitted event sent when a driver vehicle inspection report is submitted. - [EngineFaultOn Event Schema](/webhooks/event-schemas/enginefaulton.md): Webhook payload schema for the EngineFaultOn event sent when an engine fault becomes active on a vehicle. - [EngineFaultOff Event Schema](/webhooks/event-schemas/enginefaultoff.md): Webhook payload schema for the EngineFaultOff event sent when an active engine fault clears. - [FormSubmitted Event Schema](/webhooks/event-schemas/formsubmitted.md): Webhook payload schema for the FormSubmitted event sent when a form submission is completed. - [FormUpdated Event Schema](/webhooks/event-schemas/formupdated.md): Webhook payload schema for the FormUpdated event sent when a form submission is modified. - [GatewayUnplugged Event Schema](/webhooks/event-schemas/gatewayunplugged.md): Webhook payload schema for the GatewayUnplugged event sent when a vehicle gateway loses power. - [GeofenceEntry Event Schema](/webhooks/event-schemas/geofenceentry.md): Webhook payload schema for the GeofenceEntry event sent when a tracked asset enters a geofence. - [GeofenceExit Event Schema](/webhooks/event-schemas/geofenceexit.md): Webhook payload schema for the GeofenceExit event sent when a tracked asset exits a geofence. - [IssueCreated Event Schema](/webhooks/event-schemas/issuecreated.md): Webhook payload schema for the IssueCreated event sent when a new maintenance issue is created. - [MissingDvirPastDue Event Schema](/webhooks/event-schemas/missingdvirpastdue.md): Webhook payload schema for the MissingDvirPastDue event sent when a required DVIR has not been submitted in time. - [RouteStopArrival Event Schema](/webhooks/event-schemas/routestoparrival.md): Webhook payload schema for the RouteStopArrival event sent when a driver or vehicle arrives at a route stop. - [RouteStopDeparture Event Schema](/webhooks/event-schemas/routestopdeparture.md): Webhook payload schema for the RouteStopDeparture event sent when a driver or vehicle departs a route stop. - [RouteStopEarlyLateArrival Event Schema](/webhooks/event-schemas/routestopearlylatearrival.md): Webhook payload schema for the RouteStopEarlyLateArrival event sent when a route stop arrival is earlier or later than scheduled. - [RouteStopEtaUpdated Event Schema](/webhooks/event-schemas/routestopetaupdated.md): Webhook payload schema for the RouteStopEtaUpdated event sent when the estimated arrival time for a route stop changes. - [RouteStopResequence Event Schema](/webhooks/event-schemas/routestopresequence.md): Webhook payload schema for the RouteStopResequence event sent when route stops are reordered. - [SevereSpeedingStarted Event Schema](/webhooks/event-schemas/severespeedingstarted.md): Webhook payload schema for the SevereSpeedingStarted event sent when a severe speeding incident begins. - [SevereSpeedingEnded Event Schema](/webhooks/event-schemas/severespeedingended.md): Webhook payload schema for the SevereSpeedingEnded event sent when a severe speeding incident ends. - [SpeedingEventStarted Event Schema](/webhooks/event-schemas/speedingeventstarted.md): Webhook payload schema for the SpeedingEventStarted event sent when a speeding incident begins. - [SpeedingEventEnded Event Schema](/webhooks/event-schemas/speedingeventended.md): Webhook payload schema for the SpeedingEventEnded event sent when a speeding incident ends. - [VehicleCreated Event Schema](/webhooks/event-schemas/vehiclecreated.md): Webhook payload schema for the VehicleCreated event sent when a new vehicle is added to your organization. - [VehicleUpdated Event Schema](/webhooks/event-schemas/vehicleupdated.md): Webhook payload schema for the VehicleUpdated event sent when an existing vehicle is modified. - [Webhooks 1.0 Reference](/webhooks/webhooks-v1-reference.md): Reference for Samsara's legacy 1.0 alert webhook payloads, including alert condition IDs, fields, and example notifications for each alert type. - [Webhooks for Marketplace Apps](/webhooks/webhooks-for-marketplace-apps.md): Create and manage per-customer webhook endpoints from your Marketplace app using OAuth access tokens and the Webhooks API. - [Kafka Streaming](/data-streaming/kafka-connector.md): Review the complete list of supported data entities and data streaming parameters for the Samsara Kafka Connector. - [Kafka Asset Readings](/data-streaming/kafka-asset-readings.md): Kafka message payloads for asset readings, including GPS, speed, and vehicle diagnostics. - [Kafka Events](/data-streaming/kafka-events.md): Kafka message payloads for event-based data including core resource changes, ridership events, and driver compliance snapshots. - [Streaming Data to Cloud Providers](/data-streaming/streaming-data-to-cloud-providers.md): Configure Samsara Data Connectors to stream real-time fleet data to Google Cloud Pub/Sub, Azure Event Hubs, or AWS MSK. - [Changelog](/changelog.md): Stay up to date with the latest changes to the Samsara API. ## OpenAPI Specs - [Samsara API OpenAPI specification](/openapi/samsara-api.json): Complete OpenAPI schema for the Samsara REST API.