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 People with Asset Filtering
      • POSTBatch Create/Update People
      • DELBatch Delete People
      • PATCHBatch Assign People to Assets
      • DELBatch Delete People-Asset Associations
      • PATCHBatch Add People to Groups
      • PATCHBatch Remove People from Groups
Trebellar Platform
LogoLogo
API ResourcesPeople

Batch Assign People to Assets

||View as Markdown|
PATCH
https://api.trebellar.app/api/v2/people/batch/assets/upsert
PATCH
/api/v2/people/batch/assets/upsert
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.people.upsertPeopleAssetBatch({
8 peopleIds: [
9 "string",
10 ],
11 assetIds: [
12 "st_sf_tower_01",
13 ],
14 });
15}
16main();
1{
2 "data": {}
3}

Create or update assignments between employees and workspace assets (desks, spaces, etc.). This is typically used for desk assignments, office allocations, or space reservations. Each person can be assigned to multiple assets, and assets can have multiple people assigned (depending on capacity).

Was this page helpful?
Previous

Batch Delete People

Next

Batch Delete People-Asset Associations

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.
peopleIdslist of stringsRequired
assetIdslist of stringsRequired

Response

All people successfully assigned to the specified assets
dataobject

Errors

400
Bad Request Error
500
Internal Server Error