Skip to main content

Documentation Index

Fetch the complete documentation index at: https://stackauth-e0affa27-apps-support.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

This is a detailed reference for the Team object. If you’re looking for a more high-level overview, please refer to our guide on teams. On this page:

Team

A Team object contains basic information and functions about a team, to the extent of which a member of the team would have access to it. You can get Team objects with the user.useTeams() or user.listTeams() functions. The created team will then inherit the permissions of that user; for example, the team.update(...) function can only succeed if the user is allowed to make updates to the team.

Table of Contents

Properties

Methods

API Keys

Billing & Payments


ServerTeam

Like Team, but with server permissions. Has full read and write access to everything. Calling serverUser.getTeam(...) and serverUser.listTeams() will return ServerTeam objects if the user is a ServerUser. Alternatively, you can call stackServerApp.getTeam('team_id_123') or stackServerApp.listTeams() to query all teams of the project. ServerTeam extends the Team object, providing additional functions and properties. While the Team object’s functions may require specific user permissions, the corresponding functions in ServerTeam can be executed without these permission checks.

Table of Contents

Additional Properties

Additional Methods


Types

TeamCreateOptions

Options for creating a team via user.createTeam().
displayName
string
required
The display name for the team.
profileImageUrl
string
The profile image URL for the team.

ServerTeamCreateOptions

Extended creation options available on the server.
displayName
string
required
The display name for the team.
profileImageUrl
string
The profile image URL for the team.
creatorUserId
string
The user ID of the team creator. If not set, the team is created without a creator.

TeamUpdateOptions

Options for updating a team via team.update().
displayName
string
The display name of the team.
profileImageUrl
string | null
The profile image URL of the team.
clientMetadata
ReadonlyJson
Client metadata.

ServerTeamUpdateOptions

Extended update options available on the server via serverTeam.update().
displayName
string
The display name of the team.
profileImageUrl
string | null
The profile image URL of the team.
clientMetadata
ReadonlyJson
Client metadata.
clientReadOnlyMetadata
ReadonlyJson
Client read-only metadata.
serverMetadata
ReadonlyJson
Server-only metadata.

Invitation Types

SentTeamInvitation

Represents an invitation that was sent from a team. Returned by team.listInvitations().
id
string
The unique identifier for the invitation.
recipientEmail
string | null
The email address of the invited user, or null if not specified.
expiresAt
Date
The date and time when the invitation expires.
declare function revoke(): Promise<void>;
The revoke() method cancels the invitation.

ReceivedTeamInvitation

Represents an invitation received by a user. Returned by user.listTeamInvitations().
id
string
The unique identifier for the invitation.
teamId
string
The ID of the team that sent the invitation.
teamDisplayName
string
The display name of the inviting team.
recipientEmail
string
The email address the invitation was sent to.
expiresAt
Date
The date and time when the invitation expires.
declare function accept(): Promise<void>;
The accept() method accepts the invitation and adds the user to the team.