OpenAPI 3.0 · REST · OAuth 2.0 Bearer
AURRA API Reference Guide
Complete endpoint documentation for the AURRA Smart Thermostat API. Every endpoint includes parameter schemas, example requests, response shapes, and Python + JavaScript code samples.
v1.0.0 api.aurrahome.com/v1 12 Endpoints 4 Scopes
12
Endpoints
500
req/min
4
Scopes
JWT
Auth Type
Authentication
POST /auth/token
Exchange client credentials for a short-lived RS256-signed Bearer token. Required before any other API call. Tokens expire after 3,600 seconds.
Warning
Never expose client_secret in client-side code. Store credentials in environment variables or a secrets management service.
ParameterTypeReq.Description
client_idstringRequiredApplication client ID from the AURRA Developer Portal
client_secretstringRequiredApplication client secret — never expose on client side
grant_typestringRequiredMust be the literal value client_credentials
HTTP
POST https://api.aurrahome.com/v1/auth/token
Content-Type: application/json

{
  "client_id":     "acc_a1b2c3d4",
  "client_secret": "sk_live_••••••••••••",
  "grant_type":    "client_credentials"
}
200 OK
JSON
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "token_type":   "Bearer",
  "expires_in":   3600
}
401 Unauthorized
JSON
{ "error": { "code": "INVALID_CREDENTIALS", "message": "Bad client_id or client_secret" } }
Python
import requests
r = requests.post("https://api.aurrahome.com/v1/auth/token",
    json={"client_id":CLIENT_ID,"client_secret":CLIENT_SECRET,"grant_type":"client_credentials"})
TOKEN = r.json()["access_token"]
HEADERS = {"Authorization": f"Bearer {TOKEN}"}
JavaScript
const {access_token} = await fetch("https://api.aurrahome.com/v1/auth/token",{
  method:"POST",headers:{"Content-Type":"application/json"},
  body:JSON.stringify({client_id:CLIENT_ID,client_secret:CLIENT_SECRET,grant_type:"client_credentials"})
}).then(r=>r.json());
Thermostat Control
GET /thermostat/{device_id}/status
Returns the current operational state of the specified thermostat including live temperature, humidity, active mode, and Eco Mode status.
FieldTypeReq.Description
device_idstring (path)RequiredUnique thermostat identifier (e.g., aurra_001)

Response fields: temperature (integer °F), humidity (integer 0–100%), mode (heat|cool|auto|off), eco_mode (boolean), status (active|idle|offline)

200 OK
JSON
{ "temperature":73, "humidity":42, "mode":"heat", "eco_mode":false, "status":"active" }
Python
s = requests.get(f"{BASE}/thermostat/aurra_001/status",headers=HEADERS).json()
print(f"{s['temperature']}°F | {s['mode']} | eco={s['eco_mode']}")
JavaScript
const s = await fetch(`${BASE}/thermostat/aurra_001/status`,
  {headers:{Authorization:`Bearer ${TOKEN}`}}).then(r=>r.json());
console.log(`${s.temperature}°F  ${s.mode}  eco:${s.eco_mode}`);
FieldTypeReq.Description
temperatureintegerRequiredTarget setpoint in °F. Valid range: 40–90
modestringRequiredheat | cool | auto | off
JSON Body
{ "temperature": 72, "mode": "cool" }
200 OK
JSON Response
{ "success": true, "applied_at": "2025-04-22T15:30:00Z" }
Python
requests.post(f"{BASE}/thermostat/aurra_001/setpoint",
    json={"temperature":72,"mode":"cool"},headers=HEADERS)
JSON Body
{
  "name": "Workday Routine",
  "blocks": [
    { "label":"Morning","start":"04:00","end":"08:00","heat":70,"cool":74,"days":["mon","tue","wed","thu","fri"] },
    { "label":"Day",    "start":"08:00","end":"16:30","heat":65,"cool":78,"days":["mon","tue","wed","thu","fri"] },
    { "label":"Evening","start":"16:30","end":"22:00","heat":72,"cool":73,"days":["mon","tue","wed","thu","fri"] },
    { "label":"Night",  "start":"22:00","end":"04:00","heat":68,"cool":76,"days":["mon","tue","wed","thu","fri"] }
  ]
}
FieldTypeReq.Description
namestringRequiredSchedule name (max 64 chars)
blocks[].labelstringRequiredBlock label, e.g. Morning, Day, Evening, Night
blocks[].startstring HH:MMRequiredStart time in 24-hour format
blocks[].endstring HH:MMRequiredEnd time in 24-hour format
blocks[].heatintegerRequiredHeating setpoint in °F
blocks[].coolintegerRequiredCooling setpoint in °F
blocks[].daysarrayRequiredDay codes: mon tue wed thu fri sat sun

No request body required. Returns { "synced": true, "synced_at": "..." } on success.

FieldTypeReq.Description
enabledbooleanRequiredtrue to enable, false to disable
heat_limitintegerOptionalMax heating setpoint in Eco Mode. Default: 62°F
cool_limitintegerOptionalMin cooling setpoint in Eco Mode. Default: 78°F
Predictive Maintenance
Diagnostics & Predictions
Submit sensor telemetry to the ML pipeline and retrieve failure predictions with confidence scores weeks before a breakdown occurs.
FieldTypeReq.Description
device_idstringRequiredTarget device identifier
timestampstringRequiredISO 8601 UTC (e.g., 2025-04-22T14:00:00Z)
amplitudefloatRequiredPeak vibration in g-force (range: 0.0–10.0)
frequencyfloatRequiredDominant frequency in Hz
duration_msintegerOptionalSample window in ms. Default: 1000
JSON Body
{
  "device_id":   "aurra_001",
  "timestamp":   "2025-04-22T14:33:00Z",
  "amplitude":   0.42,
  "frequency":   58.3,
  "duration_ms": 1000
}
// Response — 201 Created
{ "accepted": true, "reading_id": "rdg_x9k2p7" }
FieldTypeReq.Description
device_idstringRequiredTarget device identifier
runtime_minsintegerRequiredHVAC runtime in minutes for the reporting period
voltagefloatRequiredSupply voltage in volts
current_ampsfloatRequiredCurrent draw in amperes
period_startstringRequiredISO 8601 UTC start of reporting period
200 OK — Issue Detected
JSON
{
  "maintenance_needed": true,
  "prediction": {
    "issue":              "Compressor bearing degradation",
    "confidence":         0.87,
    "recommended_action": "Schedule HVAC inspection within 14 days"
  },
  "last_service": "2024-08-12"
}
200 OK — No Issues Detected
JSON
{ "maintenance_needed": false, "prediction": null, "last_service": "2025-01-08" }
Tip
Poll this endpoint no more than once per minute. For real-time alert delivery without polling, register a webhook for the predictive.alert_created event instead.
Python
pred = requests.get(f"{BASE}/predictive/hvac/aurra_001/status",headers=HEADERS).json()
if pred["maintenance_needed"]:
    print(f"ALERT: {pred['prediction']['issue']}")
    print(f"Confidence: {pred['prediction']['confidence']:.0%}")
FieldTypeReq.Description
device_idstringRequiredTarget device identifier
issuestringRequiredHuman-readable issue description (max 256 chars)
confidencefloatRequiredML confidence score 0.0–1.0. Platform default alert threshold: 0.72
actionstringRequiredRecommended remediation step for the homeowner
dispatchbooleanOptionalIf true, triggers automated technician dispatch (Enterprise tier only)
prioritystringOptionallow | medium | high | critical. Default: medium
Comfort & Energy
Optimization & Integrations
FieldTypeReq.Description
device_idstringRequiredTarget device identifier
modestringOptionalcomfort | efficiency | balanced. Default: balanced
apply_immediatebooleanOptionalApply the optimized schedule immediately without approval
200 OK
JSON
{
  "optimized_schedule": {
    "name": "AI Optimized — 2025-04-22",
    "blocks": [ ... ],
    "projected_savings": "18%"
  },
  "requires_approval": true
}
FieldTypeReq.Description
device_idstringRequiredTarget device identifier
platformstringRequiredAlexa | GoogleAssistant | HomeKit
user_tokenstringRequiredPlatform OAuth user token — distinct from your AURRA client token
Note
The user_token is the homeowner's access token from the voice platform's own OAuth flow — not your AURRA access_token.
Reference
Error Reference
All AURRA API errors follow a consistent envelope. The error.code field is machine-readable and safe to programmatically handle.
Error Envelope
{
  "error": {
    "code":    "RATE_LIMIT_EXCEEDED",
    "message": "You have exceeded 100 requests per minute.",
    "docs":    "https://docs.aurrahome.com/errors/RATE_LIMIT_EXCEEDED",
    "retry_after": 30
  }
}
HTTPError CodeMeaningResolution
400INVALID_REQUESTMissing or malformed fieldCheck request body against schema
400INVALID_TEMPERATURESetpoint outside 40–90°F rangeAdjust temperature value
401UNAUTHORIZEDMissing or expired Bearer tokenRequest a new token via /auth/token
403INSUFFICIENT_SCOPEToken missing required scopeRe-authenticate with correct scopes
404DEVICE_NOT_FOUNDdevice_id not in your accountVerify device ID spelling and ownership
429RATE_LIMIT_EXCEEDEDRequest rate above tier limitBack off; check X-RateLimit-* response headers
500INTERNAL_ERRORUnexpected platform errorRetry with exponential backoff; contact support
503SERVICE_UNAVAILABLETemporary platform maintenanceMonitor status.aurrahome.com
Reference
Quick Reference — All Endpoints
MethodEndpointAuthScope Required
POST/auth/token
GET/thermostat/{id}/status
POST/thermostat/{id}/setpointcomfort:write
POST/thermostat/{id}/schedulecomfort:write
POST/thermostat/{id}/schedule/synccomfort:write
POST/thermostat/{id}/ecocomfort:write
POST/diagnostics/vibrationdiagnostics:read
POST/diagnostics/energydiagnostics:read
GET/predictive/hvac/{id}/statusdiagnostics:read
POST/alertsalerts:write
POST/climate/optimizecomfort:write
POST/integration/voice-assistantcomfort:write