Search + K

Command Palette

Search for a command to run...

Sign In

Get a team by name

GET /orgs/{org}/teams/{team_slug}
Copy endpoint
https://api.github.com

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}.

Parameters

path Path Parameters

Name Type
org required

The organization name. The name is not case sensitive.

string
team_slug required

The slug of the team name.

string

Responses

200 application/json

Response

interface TeamFull {
id: number;
node_id: string;
url: string;
html_url: string;
name: string;
slug: string;
description: string | null;
privacy?: "closed" | "secret";
notification_setting?: "notifications_enabled" | "notifications_disabled";
permission: string;
members_url: string;
repositories_url: string;
parent?: TeamSimple

Groups of organization members that gives permissions on specified repositories.

interface TeamSimple {
id: number;
node_id: string;
url: string;
members_url: string;
name: string;
description: string | null;
permission: string;
privacy?: string;
notification_setting?: string;
html_url: string;
repositories_url: string;
slug: string;
ldap_dn?: string;
type: "enterprise" | "organization";
organization_id?: number;
enterprise_id?: number;
}
| null
;
members_count: number;
repos_count: number;
created_at: string;
updated_at: string;
organization: TeamOrganization

Team Organization

interface TeamOrganization {
login: string;
id: number;
node_id: string;
url: string;
repos_url: string;
events_url: string;
hooks_url: string;
issues_url: string;
members_url: string;
public_members_url: string;
avatar_url: string;
description: string | null;
name?: string;
company?: string;
blog?: string;
location?: string;
email?: string;
twitter_username?: string | null;
is_verified?: boolean;
has_organization_projects: boolean;
has_repository_projects: boolean;
public_repos: number;
public_gists: number;
followers: number;
following: number;
html_url: string;
created_at: string;
type: string;
total_private_repos?: number;
owned_private_repos?: number;
private_gists?: number | null;
disk_usage?: number | null;
collaborators?: number | null;
billing_email?: string | null;
plan?: {
name: string;
space: number;
private_repos: number;
filled_seats?: number;
seats?: number;
}
;
default_repository_permission?: string | null;
members_can_create_repositories?: boolean | null;
two_factor_requirement_enabled?: boolean | null;
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 | null;
web_commit_signoff_required?: boolean;
updated_at: string;
archived_at: string | null;
}
;
ldap_dn?: LdapDn

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

type LdapDn = string
;
type: "enterprise" | "organization";
organization_id?: number;
enterprise_id?: number;
}

Client Errors

404 application/json

Resource not found

interface BasicError {
message?: string;
documentation_url?: string;
url?: string;
status?: string;
}