Skip to content

Function: createTeam() ​

ts
function createTeam(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  creatorId?: string | null;
  description: string;
  displayName: string;
  externalReference?:   | {
   [key: string]: unknown;
     id: string;
     source: string & object | "ATLASSIAN_GROUP" | "HRIS";
   }
     | null;
  members: object[];
  organizationId: string;
  state: string & object | "ACTIVE" | "ARCHIVED";
  teamId: string;
  teamType:   | string & object
     | "EXTERNAL"
     | "OPEN"
     | "MEMBER_INVITE"
     | "ORG_ADMIN_MANAGED";
  userPermissions: {
   [key: string]: unknown;
     ADD_MEMBERS: boolean;
     DELETE_TEAM: boolean;
     REMOVE_MEMBERS: boolean;
     UPDATE_TEAM: boolean;
  };
}>;

Defined in: src/teams/api/teams.ts:41

Creates a team, and adds the requesting user as the initial member.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ description: string; displayName: string; orgId: string; siteId: string | null; teamType: | string & object | "EXTERNAL" | "OPEN" | "MEMBER_INVITE" | "ORG_ADMIN_MANAGED"; }-
parameters.descriptionstring-
parameters.displayName?string-
parameters.orgId?stringThe ID of the organisation the team is to be created under.
parameters.siteId?string | nullIf the org mandates site-scoped teams, a site ID must be provided or the operation will fail. [Deprecated] Omitting siteId is deprecated. With the introduction of Units, orgId alone is no longer sufficient to resolve the scope of teams. Always provide a valid siteId to ensure this operation continues to work in the future.
parameters.teamType?| string & object | "EXTERNAL" | "OPEN" | "MEMBER_INVITE" | "ORG_ADMIN_MANAGED"-
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; creatorId?: string | null; description: string; displayName: string; externalReference?: | { [key: string]: unknown; id: string; source: string & object | "ATLASSIAN_GROUP" | "HRIS"; } | null; members: object[]; organizationId: string; state: string & object | "ACTIVE" | "ARCHIVED"; teamId: string; teamType: | string & object | "EXTERNAL" | "OPEN" | "MEMBER_INVITE" | "ORG_ADMIN_MANAGED"; userPermissions: { [key: string]: unknown; ADD_MEMBERS: boolean; DELETE_TEAM: boolean; REMOVE_MEMBERS: boolean; UPDATE_TEAM: boolean; }; }>