For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Trebellar Platform
DocsGuidesAPI Reference
DocsGuidesAPI Reference
  • API Reference
    • Introduction
  • API Resources
      • GETList Assets with Filtering
      • POSTCreate New Asset
      • GETGet Asset by ID
      • POSTBulk Asset Operations
      • POSTBulk Seat Assignments by People Group
      • GETList Asset Tags
      • POSTAdd Asset Tag
      • PUTUpdate Asset Tag
      • DELDelete Asset Tag
      • POSTBind Asset Tags
      • POSTUnbind Asset Tags
      • GETList all Location Definitions
      • POSTAdd Location Definitions
      • PUTUpdate Location Definitions
      • DELDelete Location Definitions
Trebellar Platform
LogoLogo
API ResourcesAssets

Create New Asset

||View as Markdown|
POST
https://api.trebellar.app/api/v2/assets
POST
/api/v2/assets
1import { TrebellarApiClient } from "@trebellar/api-sdk";
2
3async function main() {
4 const client = new TrebellarApiClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.assets.addSingle({});
8}
9main();
1{
2 "success": true,
3 "asset": {
4 "id": "st_sf_tower_01",
5 "label": "San Francisco Tower - Floor 42",
6 "parentId": "string",
7 "parentIdPath": [
8 "string"
9 ],
10 "location": {
11 "type": "Point",
12 "coordinates": [
13 -122.4194,
14 37.7749
15 ]
16 },
17 "dynamicProperties": {},
18 "assetTags": [
19 "string"
20 ],
21 "type": "string",
22 "staticProperties": {
23 "address": "123 Main St, San Francisco, CA 94105",
24 "coordinates": {
25 "lat": 37.7749,
26 "lon": -122.4194
27 },
28 "rentableSqft": 50000,
29 "businessHoursStart": "08:00",
30 "businessHoursEnd": "18:00",
31 "businessDays": [
32 "monday",
33 "tuesday",
34 "wednesday",
35 "thursday",
36 "friday"
37 ],
38 "status": "active",
39 "timezone": "America/Los_Angeles"
40 },
41 "children": [
42 null
43 ]
44 }
45}

Create a single new asset within the hierarchical structure. The asset will be automatically assigned a unique ID and can include children assets for bulk creation. When creating hierarchical assets, ensure parent assets exist or are created first. Supports all asset types: structures, floors, spaces, desks, and sensors.

Was this page helpful?
Previous

List Assets with Filtering

Next

Get Asset by ID

Built with

Authentication

X-Trebellar-Api-Keystring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
assetobjectRequired

Response

Asset and any child assets created successfully with assigned IDs
successboolean
assetobject
Hierarchical asset schema with type discrimination

Errors

400
Bad Request Error
500
Internal Server Error