Skip to content

Get a team by name

GET
/orgs/{org}/teams/{team_slug}

Gets a team using the team’s slug. To create the slug, GitHub replaces special characters in the name string, changes all words to lowercase, and replaces spaces with a - separator. For example, "My TEam Näme" would become my-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}.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

team_slug
required
string

The slug of the team name.

Response

Media type application/json
Full Team

Groups of organization members that gives permissions on specified repositories.

object
id
required

Unique identifier of the team

integer
node_id
required
string
url
required

URL for the team

string format: uri
html_url
required
string format: uri
name
required

Name of the team

string
slug
required
string
description
required
string
nullable
privacy

The level of privacy this team should have

string
Allowed values: closed secret
notification_setting

The notification setting the team has set

string
Allowed values: notifications_enabled notifications_disabled
permission
required

Permission that the team will have for its repositories

string
members_url
required
string
repositories_url
required
string format: uri
parent
Team Simple

Groups of organization members that gives permissions on specified repositories.

object
id
required

Unique identifier of the team

integer
node_id
required
string
url
required

URL for the team

string format: uri
members_url
required
string
name
required

Name of the team

string
description
required

Description of the team

string
nullable
permission
required

Permission that the team will have for its repositories

string
privacy

The level of privacy this team should have

string
notification_setting

The notification setting the team has set

string
html_url
required
string format: uri
repositories_url
required
string format: uri
slug
required
string
ldap_dn

Distinguished Name (DN) that team maps to within LDAP environment

string
type
required

The ownership type of the team

string
Allowed values: enterprise organization
organization_id

Unique identifier of the organization to which this team belongs

integer
enterprise_id

Unique identifier of the enterprise to which this team belongs

integer
members_count
required
integer
repos_count
required
integer
created_at
required
string format: date-time
updated_at
required
string format: date-time
organization
required
Team Organization

Team Organization

object
login
required
string
id
required
integer
node_id
required
string
url
required
string format: uri
repos_url
required
string format: uri
events_url
required
string format: uri
hooks_url
required
string
issues_url
required
string
members_url
required
string
public_members_url
required
string
avatar_url
required
string
description
required
string
nullable
name
string
company
string
blog
string format: uri
location
string
email
string format: email
twitter_username
string
nullable
is_verified
boolean
has_organization_projects
required
boolean
has_repository_projects
required
boolean
public_repos
required
integer
public_gists
required
integer
followers
required
integer
following
required
integer
html_url
required
string format: uri
created_at
required
string format: date-time
type
required
string
total_private_repos
integer
owned_private_repos
integer
private_gists
integer
nullable
disk_usage
integer
nullable
collaborators
integer
nullable
billing_email
string format: email
nullable
plan
object
name
required
string
space
required
integer
private_repos
required
integer
filled_seats
integer
seats
integer
default_repository_permission
string
nullable
members_can_create_repositories
boolean
nullable
two_factor_requirement_enabled
boolean
nullable
members_allowed_repository_creation_type
string
members_can_create_public_repositories
boolean
members_can_create_private_repositories
boolean
members_can_create_internal_repositories
boolean
members_can_create_pages
boolean
members_can_create_public_pages
boolean
members_can_create_private_pages
boolean
members_can_fork_private_repositories
boolean
nullable
web_commit_signoff_required
boolean
updated_at
required
string format: date-time
archived_at
required
string format: date-time
nullable
ldap_dn

The distinguished name (DN) of the LDAP entry to map to a team.

string
type
required

The ownership type of the team

string
Allowed values: enterprise organization
organization_id

Unique identifier of the organization to which this team belongs

integer
enterprise_id

Unique identifier of the enterprise to which this team belongs

integer
Examples
Example default
{
"id": 1,
"node_id": "MDQ6VGVhbTE=",
"url": "https://api.github.com/teams/1",
"html_url": "https://github.com/orgs/github/teams/justice-league",
"name": "Justice League",
"slug": "justice-league",
"description": "A great team.",
"privacy": "closed",
"notification_setting": "notifications_enabled",
"permission": "admin",
"members_url": "https://api.github.com/teams/1/members{/member}",
"repositories_url": "https://api.github.com/teams/1/repos",
"parent": null,
"members_count": 3,
"repos_count": 10,
"created_at": "2017-07-14T16:53:42Z",
"updated_at": "2017-08-17T12:37:15Z",
"organization": {
"login": "github",
"id": 1,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"is_verified": true,
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
}
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}