Skip to main content

teams

Overview

Nameteams
TypeResource
Idgithub.teams.teams

Fields

NameDatatypeDescription
idintegerUnique identifier of the team
namestringName of the team
descriptionstring
updated_atstring
organizationobjectOrganization Full
node_idstring
privacystringThe level of privacy this team should have
repositories_urlstring
members_urlstring
urlstringURL for the team
ldap_dnstringDistinguished Name (DN) that team maps to within LDAP environment
html_urlstring
permissionstringPermission that the team will have for its repositories
members_countinteger
created_atstring
repos_countinteger
parentobjectGroups of organization members that gives permissions on specified repositories.
slugstring

Methods

NameAccessible byRequired ParamsDescription
get_by_nameSELECTorg, team_slugGets a team using the team's slug. GitHub generates the slug from the team name.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}.
listSELECTorgLists all teams in an organization that are visible to the authenticated user.
list_for_authenticated_userSELECTList all of the teams across all of the organizations to which the authenticated user belongs. This method requires user, repo, or read:org scope when authenticating via OAuth.
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}.
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}.