---
title: "Create Building"
method: POST
path: "/buildings"
tags: ["buildings"]
---

# Create Building

`POST /buildings`

## Request

- Base URL: `https://api.sb.ecobee.com/api/v2`
- URL: `https://api.sb.ecobee.com/api/v2/buildings`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://api.sb.ecobee.com/api/v2/token` scopes: `create:building`, `read:building`

Create a new building

## Request body

- object
  - `addressDetails` AddressDetails, required
    - `address` string, required: The building's street address
    - `city` string, required: City where the building is located
    - `country` string, ^[A-Z]{2}$, required: This should be the ISO 3166-1 alpha-2 country code. It must be uppercase.
    - `latitude` number, float, required: Latitude coordinate for the building
    - `longitude` number, float, required: Longitude coordinate for the building
    - `postalCode` string, required: Postal information for the building
    - `state` string, required: The state or province where the building is located. We recommend the 2 character short form for this field, eg, CA or NY, when possible to be consistent with the SmartBuildings application format.
    - `timeZone` string, required: The time zone where the building is located. This should be the tz/zoneinfo string as defined in the IANA time zone database. See https://www.iana.org/time-zones or https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
  - `name` string, required: The display name for the building. Must be unique within the company.
  - `size` 0 | 1 | 5000 | 10000 | 20000, required: The values for building size are square foot ranges where 1 = 1-4999, 5000 = 5000-9999, 10000 = 10000-19999, 20000 = 20000+, 0 = unknown

## Response `201`

Success

- Building
  - `status` 'success'
  - `data` object
    - `address` string, required: The building's street address
    - `city` string, required: City where the building is located
    - `country` string, ^[A-Z]{2}$, required: This should be the ISO 3166-1 alpha-2 country code. It must be uppercase.
    - `latitude` number, float, required: Latitude coordinate for the building
    - `longitude` number, float, required: Longitude coordinate for the building
    - `postalCode` string, required: Postal information for the building
    - `state` string, required: The state or province where the building is located. We recommend the 2 character short form for this field, eg, CA or NY, when possible to be consistent with the SmartBuildings application format.
    - `timeZone` string, required: The time zone where the building is located. This should be the tz/zoneinfo string as defined in the IANA time zone database. See https://www.iana.org/time-zones or https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
    - `id` string
    - `name` string
    - `size` 0 | 1 | 5000 | 10000 | 20000: The values for building size are square foot ranges where 1 = 1-4999, 5000 = 5000-9999, 10000 = 10000-19999, 20000 = 20000+, 0 = unknown

## Other responses

- `400`: Bad Request
- `401`: Not authenticated
- `403`: Not authorized
- `422`: Validation Failed
- `429`: Too Many Requests
- `500`: Internal Server Error
- `default`: Unexpected error

---

[API](https://skmtc.dev/ecobee/apis/ecobee-smartbuildings-public-api.md) - [All operations](https://skmtc.dev/ecobee/apis/ecobee-smartbuildings-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ecobee/apis/ecobee-smartbuildings-public-api/revisions/d78d4fd5e1c6?raw)
