GET/user/teams

List teams for the authenticated user

List all of the teams across all of the organizations to which the authenticated user belongs.

OAuth app tokens and personal access tokens (classic) need the user, repo, or read:org scope to use this endpoint.

When using a fine-grained personal access token, the resource owner of the token must be a single organization, and the response will only include the teams from that organization.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
per_pageintegeroptional
The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:30
pageintegeroptional
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:1

4 status codes
200Response
idintegerrequired
Unique identifier of the team
node_idstringrequired
urlstringrequired
URL for the team
html_urlstringrequired
namestringrequired
Name of the team
slugstringrequired
descriptionstringrequired
privacystringoptional
The level of privacy this team should have
Allowed:closedsecret
notification_settingstringoptional
The notification setting the team has set
Allowed:notifications_enablednotifications_disabled
permissionstringrequired
Permission that the team will have for its repositories
members_urlstringrequired
repositories_urlstringrequired
parentobjectoptional
Groups of organization members that gives permissions on specified repositories.
members_countintegerrequired
repos_countintegerrequired
created_atstringrequired
updated_atstringrequired
organizationobjectrequired
Team Organization
ldap_dnstringoptional
The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.
typestringrequired
The ownership type of the team
Allowed:enterpriseorganization
organization_idintegeroptional
Unique identifier of the organization to which this team belongs
enterprise_idintegeroptional
Unique identifier of the enterprise to which this team belongs
304Not modified
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 403 is returned: Forbidden. A 404 is returned: Resource not found.

Was this helpful?