
New to the API?
Start with our quickstart guide featuring step-by-step code examples in JavaScript, Python, and cURL.
Get API Credentials
Generate tokens and monitor usage in the Growbud web app.
Interactive API Documentation
Explore all available endpoints, inspect request & response schemas, and understand the complete API capabilities. This reference documentation provides detailed information about each endpoint, including parameters, response formats, and error codes.
API Explorer
Browse all endpoints and view detailed schemas for requests and responses
Authentication & API Credits
The Growbud API uses bearer token authentication. You can generate and manage API tokens through the Growbud web app. Each API call consumes credits based on the endpoint and data volume.
API Pricing
The Growbud API operates on a pay-as-you-go model. Each successful request deducts a small amount from your USD balance. All paid responses include the X-API-Balance-USD
response header so you can track the remaining balance programmatically.
Endpoint / Operation | Cost (USD) |
---|---|
/api/list-sensors | $0.0001 |
/api/thresholds (GET) | $0.0005 |
/api/latest | $0.0005 |
/api/thresholds (PUT) | $0.001 |
/api/thresholds/batch | $0.001 + $0.0005 × each update (max 50) |
/api/query | $0.0001 + $0.00001 × hours (max $0.0217) |
SMS Notification (non-subscribed users) | $0.02 |
When your API balance is exhausted, requests will return a 402 Payment Required status with the message "API balance exhausted. Please recharge your account."
API Tokens
- •Generate multiple tokens for different applications
- •Set expiration dates for security
- •Revoke tokens instantly if compromised
Credit System
- •Pay-as-you-go pricing model
- •Balance shown in response headers
- •Detailed usage analytics in web app
Note: You must first create an account in the Growbud mobile app, then login to growbud.app to access API features.
API Endpoints Overview
GET /api/balance
Check your current API credit balance in USD.
GET /api/list-sensors
Retrieve a list of all sensor serial numbers accessible to your account.
GET /api/query
Query historical sensor data with flexible time ranges and multiple format options.
GET /api/latest
Get the most recent readings from all your sensors with device status information.
Response Headers
All API responses include helpful headers with metadata about your request:
Header | Description |
---|---|
X-API-Balance-USD | Your remaining API credit balance |
X-API-Cost-USD | Cost of the current request |
X-Rate-Limit-Remaining | Requests remaining in current window |
X-Rate-Limit-Reset | Unix timestamp when rate limit resets |
Error Handling
The API uses standard HTTP status codes and returns detailed error messages in JSON format:
401 Unauthorized
Invalid or missing token402 Payment Required
Insufficient API credits429 Too Many Requests
Rate limit exceeded500 Internal Server Error
Server error, please retryReady to integrate with Growbud?
Start with our quickstart guide or dive into the full documentation.