Moisture API Documentation

Authentication

All API requests require a valid API key as a query parameter:
?api_key=YOUR_API_KEY_HERE

Device Registration

You must register your device(s) before accessing their data.
Go to your dashboard and use the "Register Device" button.
Enter your device's 16-character EUI (hex, case-insensitive).
Limit: Up to 10 devices per user (default).

Endpoints

Query Moisture Data

GET /moisture/api/moisture.php?api_key=YOUR_API_KEY&dev_eui=YOUR_DEVICE_EUI&hours=24
GET /moisture/api/moisture.php?api_key=YOUR_API_KEY&dev_eui=YOUR_DEVICE_EUI&count=10
        
Parameter Type Required? Description
api_key string Yes Your API key (from dashboard)
dev_eui string Yes Your registered device EUI (16 hex chars)
hours integer One of
hours or count required
Number of hours to look back (max: 168).
Returns all readings in this time window (up to 500 results).
count integer One of
hours or count required
Number of most recent readings to return (max: 500).
Examples: Sample response:
[
  {
    "dev_eui": "ce9c49e5db72508d",
    "timestamp": "2025-08-07 07:11:25",
    "raw_value": "14543",
    "percent": "1.04932"
  },
  ...
]
Notes:

Register a Device

Go to your dashboard and click "Register Device".
Each device must have a unique 16-character EUI (hex).

You can also delete a device registration from the dashboard at any time.

Generate/Revoke API Key

Use your dashboard to generate new API keys.
You can have up to 25 active API keys at any time.
You can generate at most 5 new keys per hour (even if you revoke old keys).
Revoked keys still count towards the hourly generation limit.
Your API key is shown only once after creation—copy and store it securely!

Integrations

You can forward your device’s data automatically to external IoT platforms like ThingSpeak.
Set up and manage integrations from your dashboard integration page.

For detailed setup steps, see the ThingSpeak Integration Guide →

Errors & Status Codes

Rate Limits

Note: Rate limits reset every hour, at the top of the hour.

Example Usage

curl "https://api.serverteam.club/moisture/api/moisture.php?api_key=YOUR_API_KEY&dev_eui=YOUR_DEVICE_EUI&hours=24"
curl "https://api.serverteam.club/moisture/api/moisture.php?api_key=YOUR_API_KEY&dev_eui=YOUR_DEVICE_EUI&count=10"
    

Support

For help or to report issues, contact the server team.