Docs
Skip to content
post

Create team

Endpoint

posthttps://<REGION>.cloud.appwrite.io/v1/teams

Description

Required scopes

teams.write

Authentication

Initialize the Appwrite client with 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

string
Required
string
Required
array
Status
Content type
201
application/json

Team

Name
Type
Description
string
string
string
string
integer
object
JavaScript
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
});