API
tryapis.com
Find anything
⌘ K
GitHub API Endpoints
actions
activity
apps
billing
checks
code-scanning
codes-of-conduct
emojis
enterprise-admin
gists
git
gitignore
interactions
issues
licenses
markdown
meta
migrations
oauth-authorizations
orgs
packages
projects
pulls
rate-limit
reactions
repos
scim
search
secret-scanning
teams
Get an external group

GET

List external groups in an organization

GET

List IdP groups for an organization

GET

List teams

GET

Create a team

POST

Get a team by name

GET

Update a team

PATCH

Delete a team

DELETE

List discussions

GET

Create a discussion

POST

Get a discussion

GET

Update a discussion

PATCH

Delete a discussion

DELETE

List discussion comments

GET

Create a discussion comment

POST

Get a discussion comment

GET

Update a discussion comment

PATCH

Delete a discussion comment

DELETE

Update the connection between an external group and a team

PATCH

Remove the connection between an external group and a team

DELETE

List pending team invitations

GET

List team members

GET

Get team membership for a user

GET

Add or update team membership for a user

PUT

Remove team membership for a user

DELETE

List team projects

GET

Check team permissions for a project

GET

Add or update team project permissions

PUT

Remove a project from a team

DELETE

List team repositories

GET

Check team permissions for a repository

GET

Add or update team repository permissions

PUT

Remove a repository from a team

DELETE

List IdP groups for a team

GET

Create or update IdP group connections

PATCH

List child teams

GET

Get a team (Legacy)

GET

Update a team (Legacy)

PATCH

Delete a team (Legacy)

DELETE

List discussions (Legacy)

GET

Create a discussion (Legacy)

POST

Get a discussion (Legacy)

GET

Update a discussion (Legacy)

PATCH

Delete a discussion (Legacy)

DELETE

List discussion comments (Legacy)

GET

Create a discussion comment (Legacy)

POST

Get a discussion comment (Legacy)

GET

Update a discussion comment (Legacy)

PATCH

Delete a discussion comment (Legacy)

DELETE

List pending team invitations (Legacy)

GET

List team members (Legacy)

GET

Get team member (Legacy)

GET

Add team member (Legacy)

PUT

Remove team member (Legacy)

DELETE

Get team membership for a user (Legacy)

GET

Add or update team membership for a user (Legacy)

PUT

Remove team membership for a user (Legacy)

DELETE

List team projects (Legacy)

GET

Check team permissions for a project (Legacy)

GET

Add or update team project permissions (Legacy)

PUT

Remove a project from a team (Legacy)

DELETE

List team repositories (Legacy)

GET

Check team permissions for a repository (Legacy)

GET

Add or update team repository permissions (Legacy)

PUT

Remove a repository from a team (Legacy)

DELETE

List IdP groups for a team (Legacy)

GET

Create or update IdP group connections (Legacy)

PATCH

List child teams (Legacy)

GET

List teams for the authenticated user

GET

users

PUT

https://api.github.com/orgs/org/teams/team_slug/repos/owner/repo

To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP verbs."

Note: You can also specify a team by org_id and team_id using the route PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}.

For more information about the permission levels, see "Repository permission levels for an organization".

Scopes requested: user, public_repo, repo, notifications, gist
Authorization
tryapis.com never stores your requests or responses