Create team
Endpoint
posthttps://<REGION>.cloud.appwrite.io/v1/teams
Description
Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.
Required scopes
Authentication
setProject() and authenticate with either a server API key (setKey()) or a signed-in user (setSession() or setJWT()). For direct REST calls, send X-Appwrite-Project with either X-Appwrite-Key or session/JWT headers.Parameters
Team ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
Team name. Max length: 128 chars.
Array of strings. Use this param to set the roles in the team for the user who created it. The default role is owner. A role can be any string. Learn more about roles and permissions. Maximum of 100 roles are allowed, each 32 characters long.
Team
Team ID.
Team creation date in ISO 8601 format.
Team update date in ISO 8601 format.
Team name.
Total number of team members.
Team preferences as a key-value object
const sdk = require('node-appwrite');
const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with
const teams = new sdk.Teams(client);
const result = await teams.create({ teamId: '<TEAM_ID>', name: '<NAME>', roles: [], // optional});Teams
teams
memberships
Create team
Endpoint
posthttps://<REGION>.cloud.appwrite.io/v1/teams
Description
Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team.
Required scopes
Authentication
setProject() and authenticate with either a server API key (setKey()) or a signed-in user (setSession() or setJWT()). For direct REST calls, send X-Appwrite-Project with either X-Appwrite-Key or session/JWT headers.Parameters
Team ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
Team name. Max length: 128 chars.
Array of strings. Use this param to set the roles in the team for the user who created it. The default role is owner. A role can be any string. Learn more about roles and permissions. Maximum of 100 roles are allowed, each 32 characters long.
Team
Team ID.
Team creation date in ISO 8601 format.
Team update date in ISO 8601 format.
Team name.
Total number of team members.
Team preferences as a key-value object
const sdk = require('node-appwrite');
const client = new sdk.Client() .setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setSession(''); // The user session to authenticate with
const teams = new sdk.Teams(client);
const result = await teams.create({ teamId: '<TEAM_ID>', name: '<NAME>', roles: [], // optional});