Skip to main content

teams

Overview

Nameteams
TypeResource
Idgithub.teams.teams

Fields

NameDatatypeDescription
idinteger
namestring
descriptionstring
repositories_urlstring
permissionsobject
html_urlstring
privacystring
notification_settingstring
permissionstring
node_idstring
members_urlstring
slugstring
parentobjectGroups of organization members that gives permissions on specified repositories.
urlstring

Methods

NameAccessible byRequired ParamsDescription
listSELECTorgLists all teams in an organization that are visible to the authenticated user.
list_child_in_orgSELECTorg, team_slugLists the child teams of the team specified by {team_slug}.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/teams.
list_child_legacySELECTteam_idDeprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new List child teams endpoint.
createINSERTorg, data__nameTo create a team, the authenticated user must be a member or owner of {org}. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "Setting team creation permissions."

When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of maintainers. For more information, see "About teams".
delete_in_orgDELETEorg, team_slugTo delete a team, the authenticated user must be an organization owner or team maintainer.

If you are an organization owner, deleting a parent team will delete all of its child teams as well.

Note: You can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}.
delete_legacyEXECteam_idDeprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a team endpoint.

To delete a team, the authenticated user must be an organization owner or team maintainer.

If you are an organization owner, deleting a parent team will delete all of its child teams as well.
get_legacyEXECteam_idDeprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the Get a team by name endpoint.
update_in_orgEXECorg, team_slugTo edit a team, the authenticated user must either be an organization owner or a team maintainer.

Note: You can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}.
update_legacyEXECteam_id, data__nameDeprecation Notice: This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a team endpoint.

To edit a team, the authenticated user must either be an organization owner or a team maintainer.

Note: With nested teams, the privacy for parent teams cannot be secret.