Skip to main content
SensorZone provides a comprehensive REST API for programmatic access to your safety data. The API is organized into two versions, each optimized for different use cases.

Base URL

https://platform.sensorzone.io
All API paths are relative to this base URL (e.g., /api/v1/insights becomes https://platform.sensorzone.io/api/v1/insights).

API versions


V1 API

The V1 API provides access to core SensorZone data and is the primary integration point for most use cases.

Authentication

Most V1 endpoints use session-based authentication. Log in via POST /api/v1/session with email and password to receive a session cookie. The Tester endpoints use Bearer token authentication with device-specific API tokens:
curl -H "Authorization: Bearer <your-api-token>" \
  https://platform.sensorzone.io/api/v1/tester/people_assets
API tokens are generated from the Tester device’s edit page in the admin UI. Each token scopes all operations to that device’s brand.

Available resources

ResourceDescription
InsightsIncursion data and analytics — totals, trends, and breakdowns by site/machine/person
EntitiesPeople and machines list with incursion summaries and activity status
IncursionsIndividual proximity event records with timestamps and acknowledgement data
ProjectsProject management — create, update, and list projects
ReportsReport generation and retrieval — create safety reports and download results
AlertsAlert configuration — set up email notifications for safety thresholds
WorksitesSite management — boundaries, assignments, and geospatial data
Base StationsMachine data — detail views, video clips, messages, and device status
TagsPeople/tag data — detail views, incursion history, and testing records
NotesEntity notes — add and retrieve notes for people and machines
TesterTester device endpoints — manage people assets, tag assignments, and visitor sessions

V2 API

The V2 API provides access to advanced analytics features and uses modern authentication patterns.

Authentication

The V2 API uses JWT tokens passed via the Authorization header:
curl -H "Authorization: Bearer <jwt-token>" \
  https://platform.sensorzone.io/api/v2/insights/charts/machine_runtime
Obtain a JWT token by authenticating via POST /api/v2/login with email and password. The response includes an AccessToken header containing the JWT and an AccessTokenExpiry header with the UNIX timestamp for token expiry. A RefreshToken is also provided for session persistence.

Available resources

ResourceDescription
SessionAuthentication — login, logout, and session validation
InsightsChart data — machine runtime, acknowledged incursions, zone time, and trend visualizations
Advanced InsightsPivot tables, data exports, outlier analysis, and AI-powered site reports
ReportsJSON:API formatted report management
Projects & WorksitesResource management with JSON:API compliance
User PreferencesSaved views, locale settings, and dimension configuration
Base StationMachine-specific data including GPS tracks and event details

Rate limiting

API requests are rate-limited per user/token. If you receive a 429 Too Many Requests response, back off and retry after the interval specified in the Retry-After header.

Error handling

The API uses standard HTTP status codes:
CodeMeaning
200Success
201Created
400Bad request — check your parameters
401Unauthorized — invalid or missing credentials
403Forbidden — insufficient permissions
404Not found
422Unprocessable entity — validation failed
429Rate limited — slow down
500Server error — contact support if persistent

Tester Device API quick reference

For field devices that manage tag assignments and visitor sessions:
MethodEndpointDescription
GET/api/v1/tester/people_assetsList people assets (filterable by kind: staff or visitor)
POST/api/v1/tester/people_assetsCreate a person asset
POST/api/v1/tester/tag_assignmentsAssign a tag to a person
DELETE/api/v1/tester/tag_assignments/:idRemove a tag assignment
Browse the V1 API and V2 API sections in the sidebar for interactive documentation of every endpoint, including request parameters, response schemas, and example payloads.