Team Object
The Team object represents a team within an organization.The unique identifier of the team
The name of the team
The description of the team
The organization that the team belongs to
Whether the team has access to all repositories in the organization
Team permission level:
none, read, write, admin, or ownerFine-grained permissions for different repository units (e.g.,
repo.code, repo.issues, repo.wiki)Whether the team can create repositories in the organization
List Organization Teams
GET /orgs/{org}/teams
List all teams in an organization
Path Parameters
The name of the organization
Query Parameters
Page number of results to return (1-based)
Page size of results
Example Request
Response
Get a Team
GET /teams/{id}
Get details about a specific team by ID
Path Parameters
The ID of the team to retrieve
Example Request
Response
Create a Team
POST /orgs/{org}/teams
Create a new team in an organization
Path Parameters
The name of the organization
Request Body
The name of the team (max 255 characters)
The description of the team (max 255 characters)
Whether the team has access to all repositories in the organization
Team permission level:
read, write, or adminFine-grained permissions for repository units. Example:
{"repo.code": "read", "repo.issues": "write"}Whether the team can create repositories in the organization
Example Request
Response
Update a Team
PATCH /teams/{id}
Update an existing team’s information
Path Parameters
The ID of the team to update
Request Body
The name of the team
The description of the team
Whether the team has access to all repositories
Team permission level:
read, write, or adminFine-grained permissions for repository units
Whether the team can create repositories
Example Request
Delete a Team
DELETE /teams/{id}
Delete a team from an organization
Path Parameters
The ID of the team to delete
Example Request
Team Members
List Members
Get all members of a team
Get Member
Check if a user is a team member
Add Member
Add a user to a team
Remove Member
Remove a user from a team
List Team Members
GET /teams/{id}/members
List all members of a team
Path Parameters
The ID of the team
Query Parameters
Page number of results to return (1-based)
Page size of results
Example Request
Get Team Member
GET /teams/{id}/members/{username}
Check if a specific user is a member of the team
Path Parameters
The ID of the team
The username of the user to check
Example Request
Add Team Member
PUT /teams/{id}/members/{username}
Add a user to a team
Path Parameters
The ID of the team
The username of the user to add
Example Request
Remove Team Member
DELETE /teams/{id}/members/{username}
Remove a user from a team
Path Parameters
The ID of the team
The username of the user to remove
Example Request
Team Repositories
List Repositories
Get all repositories assigned to a team
Get Repository
Check if a repository is assigned to the team
Add Repository
Assign a repository to a team
Remove Repository
Remove a repository from a team
List Team Repositories
GET /teams/{id}/repos
List all repositories that a team has access to
Path Parameters
The ID of the team
Query Parameters
Page number of results to return (1-based)
Page size of results
Example Request
Get Team Repository
GET /teams/{id}/repos/{org}/{repo}
Check if a specific repository is assigned to the team
Path Parameters
The ID of the team
The organization that owns the repository
The name of the repository
Example Request
Add Team Repository
PUT /teams/{id}/repos/{org}/{repo}
Add a repository to a team
Path Parameters
The ID of the team
The organization that owns the repository
The name of the repository to add
Example Request
Remove Team Repository
DELETE /teams/{id}/repos/{org}/{repo}
Remove a repository from a team (does not delete the repository)
Path Parameters
The ID of the team
The organization that owns the repository
The name of the repository to remove
Example Request
Search Teams
GET /orgs/{org}/teams/search
Search for teams within an organization
Path Parameters
The name of the organization
Query Parameters
Keywords to search for
Include search within team descriptions
Page number of results to return (1-based)
Page size of results
Example Request
Response
List User Teams
GET /user/teams
List all teams that the authenticated user belongs to
Query Parameters
Page number of results to return (1-based)
Page size of results
Example Request
Activity Feeds
GET /teams/{id}/activities/feeds
List a team’s activity feeds
Path Parameters
The ID of the team
Query Parameters
The date of the activities to be found (format: YYYY-MM-DD)
Page number of results to return (1-based)
Page size of results