Getting Started with the SmartBuildings Public API
Here are a couple examples just to get you started.
We’re continuing to improve our platform, and as part of that work, we're retiring the SmartBuildings API v1.0.
Key dates:
- Deprecated: December 5, 2025
- Removal date: March 31, 2026
To keep your integration running smoothly, we recommend upgrading to SmartBuildings API v2.0 as soon as possible. You can follow our migration guide here: https://docs.sb.ecobee.com/changelog/v200#/ If you have any questions or need support during the transition, our team is here to help at [email protected].
Get a jwt token
Using the client_id and client_secret for a specific SmartBuildings account integration, create a jwt token that will be used to make all other API calls when acting on behalf of that account.
curl --request POST \
--header "Content-type: application/json" \
--url "https://api.sb.ecobee.com/token" \
--data '{ "audience": "https://api.sb.ecobee.com", "grant_type": "client_credentials", "scopes": "read:thermostat read:thermostats", "client_id": "<insert client_id>", "client_secret": "<insert client_secret>" }'const axios = require('axios');
const clientId = '<insert client_id>';
const clientSecret = '<insert client_secret>';
const data = {
audience: 'https://api.sb.ecobee.com',
grant_type: 'client_credentials',
scope: 'read:thermostat read:thermostats',
client_id: clientId,
client_secret: clientSecret
};
axios
.post('https://api.sb.ecobee.com/token', data)
.then(res => {
console.log(res.data.access_token);
})
.catch(err => {
console.log(err);
});Get a list of thermostat IDs
Using the jwt token retrieved via the /token route, act on behalf of a SmartBuildings account to retrieve the list of thermostat ids associated with their account.
curl --request GET \
--header "Authorization: Bearer <insert jwt token>" \
--url "https://api.sb.ecobee.com/api/v1/thermostaIds"const axios = require('axios');
const accessToken = '<insert access_token>';
axios({
url: 'https://api.sb.ecobee.com/api/v1/thermostatIds',
method: 'GET',
headers: {
Authorization: `Bearer ${accessToken}`
}
})
.then(res => {
console.log(res.data);
})
.catch(err => {
console.log(err);
});Updated 4 days ago
Read about the OpenAPI 3 Specification for the SmartBuildings API...