API Overview & Authentication
NexFlux provides a robust RESTful API and real-time MQTT / WebSocket interfaces to interact with projects, telemetry data, and remote lab rigs.
Base URLs
| Environment | Base URL |
|---|---|
| Production | https://api.nexflux.io/api/v1 |
| Sandbox / Staging | https://staging-api.nexflux.io/api/v1 |
| Local Development | http://localhost:8005/api/v1 |
Authentication Schemes
All private endpoints require a JSON Web Token (JWT) provided in the HTTP Authorization header:
http
Authorization: Bearer <your_jwt_token>
Generating an API Token
- Go to Dashboard → Settings → API Keys.
- Click Generate New Key.
- Select permissions (e.g.
devices:read,telemetry:write,projects:manage).
Sample Request
bash
curl -X GET "https://api.nexflux.io/api/v1/devices" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Sample Response (JSON)
json
{
"success": true,
"data": [
{
"id": "dev_84f9a0c2",
"name": "ESP32 Weather Station",
"type": "esp32",
"status": "online",
"last_ping": "2026-08-30T16:20:11Z"
}
]
}
Standard HTTP Status Codes
200 OK— Request completed successfully.201 Created— Resource successfully created.400 Bad Request— Invalid JSON body or missing required fields.401 Unauthorized— Missing or expired Bearer token.403 Forbidden— Insufficient role permissions.404 Not Found— Resource does not exist.429 Too Many Requests— Rate limit threshold reached.

