Skip to main content

Add Team

Adds a new Team (group of Members / users) to SmartSuite.

Add Team

Adds a new Team to the Team table in the System solution.

add_team(tableId: ID, team: Team): Promise<Team>;
Parameter NameTypeDescription
tableIdstringId of the Team table in the System solution.
teamTeam objectObject that specifies parameters for the new team.

Team object

interface Team {
id: ID;
name: string;
color: ColorPickerFieldValue;
status: StatusFieldValue | StatusAsStringValue;
type: string;
owners: AssignedToFieldValue;
members: AssignedToFieldValue;
created_on?: string;
updated_on?: string;
sys_title?: string;
sys_target?: ID;
}
Add Team

<!--add_team(tableId: ID, team: Team): Promise<Team>;-->

<script>

window.SmartSuite.add_team('6613e6ec7241809b1756db91', {
'id': null,
'name': 'my team',
'type': '2',
'status': { 'value': '1', 'updated_on': null },
'color': [{ 'value': '#0C41F3', 'name': '' }],
'owners': ['63ad7f899460cfac02cdff5e'],
'members': ['63ad7f899460cfac02cdff5e', '64a7cbdde794d10723dfdd11'],
'first_created': null,
'last_updated': null,
'comments_count': 0,
'followed_by': [],
}).then((res) => {
console.log('result =>>>', res);
});

</script>

Response

200 Response
{
"name": "Scripting team",
"color": [
{
"value": "#0C41F3"
}
],
"type": "2",
"status": {
"value": "1",
"updated_on": "2024-12-19T21:18:03.511081Z"
},
"owners": [
"63a1f65723aaf6bcb564b1f1"
],
"members": [
"63a1f65723aaf6bcb564b1f1"
],
"first_created": {
"on": "2024-12-19T21:18:03.506684Z",
"by": "63a1f65723aaf6bcb564b1f1"
},
"last_updated": {
"on": "2024-12-19T21:18:03.506820Z",
"by": "63a1f65723aaf6bcb564b1f1"
},
"external_id": "",
"provisioning": "",
"followed_by": [],
"id": "67648d8bf86bf7df09bd5870",
"application_slug": "teams",
"application_id": "63a1f65623aaf6bcb564b00b",
"title": null,
"comments_count": null,
"autonumber": null,
"ranking": {
"default": "aamevqxlwi"
},
"deleted_date": {
"date": null,
"include_time": false
},
"deleted_by": null
}