Team Object
The Team object represents a team within an organization.integer
required
The unique identifier of the team
string
required
The name of the team
string
The description of the team
object
The organization that the team belongs to
boolean
Whether the team has access to all repositories in the organization
string
Team permission level:
none, read, write, admin, or ownerobject
Fine-grained permissions for different repository units (e.g.,
repo.code, repo.issues, repo.wiki)boolean
Whether the team can create repositories in the organization
List Organization Teams
GET /orgs/{org}/teams
List all teams in an organization
Path Parameters
string
required
The name of the organization
Query Parameters
integer
Page number of results to return (1-based)
integer
Page size of results
Example Request
Response
Get a Team
GET /teams/{id}
Get details about a specific team by ID
Path Parameters
integer
required
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
string
required
The name of the organization
Request Body
string
required
The name of the team (max 255 characters)
string
The description of the team (max 255 characters)
boolean
default:"false"
Whether the team has access to all repositories in the organization
string
default:"read"
Team permission level:
read, write, or adminobject
Fine-grained permissions for repository units. Example:
{"repo.code": "read", "repo.issues": "write"}boolean
default:"false"
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
integer
required
The ID of the team to update
Request Body
string
The name of the team
string
The description of the team
boolean
Whether the team has access to all repositories
string
Team permission level:
read, write, or adminobject
Fine-grained permissions for repository units
boolean
Whether the team can create repositories
Example Request
Delete a Team
DELETE /teams/{id}
Delete a team from an organization
Path Parameters
integer
required
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
integer
required
The ID of the team
Query Parameters
integer
Page number of results to return (1-based)
integer
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
integer
required
The ID of the team
string
required
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
integer
required
The ID of the team
string
required
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
integer
required
The ID of the team
string
required
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
integer
required
The ID of the team
Query Parameters
integer
Page number of results to return (1-based)
integer
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
integer
required
The ID of the team
string
required
The organization that owns the repository
string
required
The name of the repository
Example Request
Add Team Repository
PUT /teams/{id}/repos/{org}/{repo}
Add a repository to a team
Path Parameters
integer
required
The ID of the team
string
required
The organization that owns the repository
string
required
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
integer
required
The ID of the team
string
required
The organization that owns the repository
string
required
The name of the repository to remove
Example Request
Search Teams
GET /orgs/{org}/teams/search
Search for teams within an organization
Path Parameters
string
required
The name of the organization
Query Parameters
string
Keywords to search for
boolean
default:"true"
Include search within team descriptions
integer
Page number of results to return (1-based)
integer
Page size of results
Example Request
Response
List User Teams
GET /user/teams
List all teams that the authenticated user belongs to
Query Parameters
integer
Page number of results to return (1-based)
integer
Page size of results
Example Request
Activity Feeds
GET /teams/{id}/activities/feeds
List a team’s activity feeds
Path Parameters
integer
required
The ID of the team
Query Parameters
string
The date of the activities to be found (format: YYYY-MM-DD)
integer
Page number of results to return (1-based)
integer
Page size of results