API reference

REST + SSE, fully tenant-isolated

Every PlantHub feature is also a REST endpoint. Build your own dashboard, integrate with a smart-home controller, or just write a quick script — your tenant data is always your own.

OpenAPI (Swagger)

The full machine-readable spec is served at /swagger-ui.html on any PlantHub backend deployment. The hosted instance at https://api.planthub.online/swagger-ui.html always reflects the current production version.

Authentication

PlantHub uses AWS Cognito — an OAuth2 Resource Server with RS256-signed tokens. Log in, get an access token, and pass it as Authorization: Bearer ... on subsequent requests.

Quick example

# Log in
curl -X POST https://api.planthub.online/api/v1/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email":"you@example.com","password":"..."}'

# List your nodes
curl https://api.planthub.online/api/v1/nodes \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'

# Send a watering command
curl -X POST https://api.planthub.online/api/v1/nodes/node-abc/commands \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"actuator":"waterPump","action":"ON","durationSeconds":15}'

Endpoints at a glance

GroupMethodPath
AuthPOST/api/v1/auth/signup
AuthPOST/api/v1/auth/login
AuthPOST/api/v1/auth/refresh
AuthGET/api/v1/auth/profile
DevicesPOST/api/v1/nodes
DevicesGET/api/v1/nodes?page=0&size=20
DevicesGET/api/v1/nodes/{nodeId}
DevicesPATCH/api/v1/nodes/{nodeId}/ai
DevicesDELETE/api/v1/nodes/{nodeId}
ClaimPOST/api/v1/devices/claim
ClaimPOST/api/v1/devices/self-register
SensorsGET/api/v1/nodes/{nodeId}/latest
SensorsGET/api/v1/nodes/{nodeId}/readings?from=&to=&interval=
ActuatorsPOST/api/v1/nodes/{nodeId}/commands
RulesPOST/api/v1/rules
RulesGET/api/v1/rules?page=0&size=20
AIPOST/api/v1/nodes/{nodeId}/ai/evaluate
AIPOST/api/v1/nodes/{nodeId}/ai/chat
AIGET/api/v1/nodes/{nodeId}/ai/sessions
AlertsGET/api/v1/alerts
AlertsPOST/api/v1/alerts/{alertId}/acknowledge
WeatherGET/api/v1/weather/{nodeId}
DashboardGET/api/v1/dashboard/summary?groupBy=zone
ZonesGET/api/v1/zones

Tenant isolation

Every authenticated request resolves a TenantContext from the token. Every database query, every MQTT subscription, every AI tool call is scoped to that tenant — there is no way to read or actuate another user's devices.

Real-time updates

See Alerts & notifications for the SSE channels.

Early access

Be first
in line.

We're launching soon. Join the waitlist for early-bird pricing, first access to hardware, and input on features we build next.

30% early-bird discount First access to hardware Shape the roadmap