Endpoints for form management and record submission
Hydrobit API (2.0.0)
Comprehensive API documentation for the Hydrobit platform.
This API enables management of forms, records, workers, projects, and related data within Hydrobit.
Download OpenAPI description
Overview
Languages
Servers
Mock server
https://docs.hydrobit.ag/_mock/spec/openapi/
Production server
https://api.hydrobit.ag/
IoT server
https://iot.hydrobit.ag/
MQTT over WebSocket endpoint
wss://iot.hydrobit.ag/
Request
Creates a new worker record with automatic ID generation and optional photo upload.
Key features:
- Worker ID is auto-generated as INITIALS + MMDD (from hire date)
- Requires JWT token authentication in the Authorization header
- Company context is inferred from the authenticated user
- Validates position, employment_type, and status against template options
- Ensures worker_id uniqueness per company (idempotent on duplicate)
- Supports photo upload via base64 data URL (JPEG, PNG, WebP up to 12MB)
- Photos are uploaded to cloud storage and URL is returned in response
Security
bearerAuth
User identifier (internal use, derived from JWT token)
Example: "user_123456789"
Hire date in YYYY-MM-DD format (used to generate worker_id)
Example: "2025-03-15"
Array of worker skills (filtered by template options)
Example: ["irrigation","pruning"]
- Mock serverhttps://docs.hydrobit.ag/_mock/spec/openapi/api/control/workers
- Production serverhttps://api.hydrobit.ag/api/control/workers
- IoT serverhttps://iot.hydrobit.ag/api/control/workers
- MQTT over WebSocket endpointwss://iot.hydrobit.ag/api/control/workers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.hydrobit.ag/_mock/spec/openapi/api/control/workers \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"auth0Id": "user_123456789",
"first_name": "John",
"last_name": "Smith",
"hire_date": "2025-03-15",
"position": "field_worker",
"employment_type": "full_time"
}'Response
application/json
{ "status": "exists", "message": "worker already exists", "data": { "workerId": "6507f1e3c9d8e2a4b1f9c3d5", "worker_id": "JS0315" } }
Request
Retrieves a paginated list of workers for the authenticated user's company.
Features:
- Requires JWT token authentication in the Authorization header
- Company context is inferred from the authenticated user
- Supports search by name or worker_id using the 'q' parameter
- Filter by status, position, or employment_type
- Pagination with customizable page size (default 25, max 100)
- Results sorted by creation date (newest first)
Security
bearerAuth
- Mock serverhttps://docs.hydrobit.ag/_mock/spec/openapi/api/control/workers
- Production serverhttps://api.hydrobit.ag/api/control/workers
- IoT serverhttps://iot.hydrobit.ag/api/control/workers
- MQTT over WebSocket endpointwss://iot.hydrobit.ag/api/control/workers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.hydrobit.ag/_mock/spec/openapi/api/control/workers?auth0Id=user_123456789&companyId=comp_12345&q=John&status=active&position=field_worker&employment_type=full_time&page=1&limit=25' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Response
application/json
{ "status": "success", "data": { "total": 42, "page": 1, "pageSize": 25, "items": [ … ] } }
Request
Retrieves detailed information about a specific worker by unique identifier or worker_id.
Features:
- Requires JWT token authentication in the Authorization header
- Company context is inferred from the authenticated user
- Can fetch by unique identifier or by worker_id (e.g., "JS0315")
- Returns full worker details including all fields
Security
bearerAuth
- Mock serverhttps://docs.hydrobit.ag/_mock/spec/openapi/api/control/workers/{worker}
- Production serverhttps://api.hydrobit.ag/api/control/workers/{worker}
- IoT serverhttps://iot.hydrobit.ag/api/control/workers/{worker}
- MQTT over WebSocket endpointwss://iot.hydrobit.ag/api/control/workers/{worker}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.hydrobit.ag/_mock/spec/openapi/api/control/workers/{worker}?auth0Id=user_123456789' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'Response
application/json
{ "status": "success", "data": { "_id": "6507f1e3c9d8e2a4b1f9c3d5", "worker_id": "JS0315", "first_name": "John", "last_name": "Smith", "name": "John Smith", "phone": "+1234567890", "email": "john.smith@example.com", "position": "field_worker", "employment_type": "full_time", "hire_date": "2025-03-15", "termination_date": null, "status": "active", "hourly_rate": 18.5, "emergency_contact_name": "Jane Smith", "emergency_contact_phone": "+1234567891", "skills": [ … ], "notes": "Experienced in avocado cultivation", "photo": "https://storage.example.com/photos/worker-photo.jpg", "companyId": "comp_12345", "companyName": "Hydrobit Client SA", "createdAt": "2025-03-15T10:30:00.000Z", "updatedAt": "2025-03-15T10:30:00.000Z" } }