Growbud Logo
Greenhouse

Growbud API Reference

Complete documentation for integrating Growbud sensor data

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

Loading API documentation...

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 / OperationCost (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:

HeaderDescription
X-API-Balance-USDYour remaining API credit balance
X-API-Cost-USDCost of the current request
X-Rate-Limit-RemainingRequests remaining in current window
X-Rate-Limit-ResetUnix timestamp when rate limit resets

Error Handling

The API uses standard HTTP status codes and returns detailed error messages in JSON format:

401 UnauthorizedInvalid or missing token
402 Payment RequiredInsufficient API credits
429 Too Many RequestsRate limit exceeded
500 Internal Server ErrorServer error, please retry

Ready to integrate with Growbud?

Start with our quickstart guide or dive into the full documentation.