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 all People Groups
      • POSTAdd People Group
      • PUTUpdate People Group
      • DELDelete People Group
Trebellar Platform
LogoLogo
API ResourcesPeople Groups

Add People Group

||View as Markdown|
POST
https://api.trebellar.app/api/v2/people/groups
POST
/api/v2/people/groups
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.peopleGroups.addPeopleGroup({
8 name: "Engineering Team",
9 status: "PEOPLE_GROUP_STATUS_ACTIVE",
10 parentId: "grp_technology_dept",
11 description: "Software development and infrastructure team",
12 properties: {
13 color: "#2196F3",
14 },
15 externalId: "DEPT_ENG",
16 });
17}
18main();
1{
2 "id": "grp_engineering_team",
3 "name": "Engineering Team",
4 "status": "PEOPLE_GROUP_STATUS_UNKNOWN",
5 "path": "/departments/technology/engineering",
6 "parentId": "grp_technology_dept",
7 "avatarUrl": "https://example.com/team-avatar.png",
8 "description": "Software development and infrastructure team",
9 "properties": {
10 "color": "#2196F3"
11 },
12 "externalId": "DEPT_ENG"
13}
Was this page helpful?
Previous

List all People Groups

Next

Update People Group

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.
namestringRequired
statusenumRequired
Allowed values:
idstringOptional
pathstringOptional
parentIdstringOptional
avatarUrlstringOptional
descriptionstringOptional
propertiesobjectOptional
Custom properties for group visualization and categorization
externalIdstringOptional

Response

Successful people-group inserted

idstring
namestring
statusenum
Allowed values:
pathstring
parentIdstring
avatarUrlstring
descriptionstring
propertiesobject
Custom properties for group visualization and categorization
externalIdstring

Errors

400
Bad Request Error
404
Not Found Error
500
Internal Server Error