Skip to main documentation content
API Reference

API Overview & Authentication

Learn how to obtain API keys, format JWT Bearer tokens, and understand standard HTTP status codes.

Updated Aug 30, 2026
4 min read
3100 views
#API#REST#Authentication#JWT

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

EnvironmentBase URL
Productionhttps://api.nexflux.io/api/v1
Sandbox / Staginghttps://staging-api.nexflux.io/api/v1
Local Developmenthttp://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

  1. Go to Dashboard → Settings → API Keys.
  2. Click Generate New Key.
  3. 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.

Was this page helpful?

Feedback on "API Overview & Authentication" helps us improve.