Create a site
POST
Creates a new site. Requires an API key with the write action.
Loading code example
Loading code example
Authorizations
apiKeystringheaderrequired
API key passed in the header.
Body
The site to create.
siteNamestringrequiredHuman-readable name for the site.
Length:
>= 1, <= 200longitudenumber | string<double>requiredLongitude of the site's location.
Required range:
x >= -180, x <= 180Pattern:
^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$latitudenumber | string<double>requiredLatitude of the site's location.
Required range:
x >= -90, x <= 90Pattern:
^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?$addressstringrequiredStreet address of the site.
Length:
>= 0, <= 500attributesobjectArbitrary user-defined key/value metadata for the site.
preferredDisplayMetricsnull | arrayOptional metric ids to surface by default for devices at this site.
Response
application/json
Created; the body is the new site id and the Location header points to it.