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 ensure the user is signed in. The SDK sends the session header automatically after login.

Parameters

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

Team

Name
Type
Description
string
string
string
string
integer
Kotlin
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import io.appwrite.Client
import io.appwrite.services.Teams
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val client = Client(applicationContext)
.setEndpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
.setProject("5df5acd0d48c2") // Your project ID
val teams = Teams(client)
GlobalScope.launch {
val response = teams.create(
teamId = "[TEAM_ID]",
name = "[NAME]",
)
val json = response.body?.string()
}
}
}