Skip to main content
POST
Create a building
This call creates a real building in your organization. The API has no endpoint to delete a building, and the name stays taken until someone removes the building in KODE OS. Test with a clearly named building, such as API test building, and ask your KODE project team to remove it when you are done.
A new building has every product turned off. Until the api product is enabled for it, calls that name the building return 403, including Get a building, Create a KODE API connector, and Update a building. The API cannot enable products. Your KODE project team enables the api product for a new building by hand, so ask them before you call the building, and allow for that step if you automate building creation.

Required fields

Optional fields

What the API sets for you

  • The API looks up the address to find the building location. The response carries the location, the state and country codes, and the time zone tz. If the address cannot be located, the request fails with 400. Check address1, city, zip, and country.
  • published is false. Use Set the status of a building to change it.
  • products lists the products with enabled set to false, and the counts and stats start at 0.
Send baseTemp in °F whatever unit you use in KODE OS.

Authorizations

Authorization
string
header
required

Paste an access token from Create an access token. Tokens expire, so request a new one if you receive 401.

Body

application/json
name
string
required
Maximum string length: 50
Pattern: \S
primaryFunction
string
required
Pattern: \S
address
object
required
baseTemp
number<double>
required
yearBuild
integer<int32>
Required range: 1600 <= x <= 2100
area
integer<int32>
Required range: x >= 0
region
string
Maximum string length: 255
brand
string
Maximum string length: 255
zone
string
Maximum string length: 255
district
string
Maximum string length: 255
identifier
string
Maximum string length: 255
phoneNumber
string
site
object

Response

The created building.

_id
string
organizationId
string
createdAt
string
read-only

Date and time in UTC, with a numeric offset and no colon, for example 2026-10-28T13:51:31+0000.

Example:

"2026-10-28T13:51:31+0000"

updatedAt
string
read-only

Date and time in UTC, with a numeric offset and no colon, for example 2026-10-28T13:51:31+0000.

Example:

"2026-10-28T13:51:31+0000"

name
string
identifier
string
area
object
yearBuild
integer<int32>
primaryFunction
string
tags
string[]
address
object
picture
string
tz
string
areasCount
integer<int32>
devicesCount
integer<int32>
connectorsCount
integer<int32>
systemsCount
integer<int32>
pointsCount
integer<int32>
stats
object
baseTemp
number<double>
published
boolean
ossEnabled
boolean
climateZone
object
region
string
brand
string
zone
string
district
string
phoneNumber
string
site
object
products
object[]