Skip to main content
The REST API is now versioned. For more information, see "About API versioning."

REST API endpoints for team members

Use the REST API to create and manage membership of teams in your GitHub organization.

About team members

These endpoints are only available to authenticated members of the team's organization. OAuth access tokens require the read:org scope. GitHub generates the team's slug from the team name.

Where pull and push permissions are accepted, these will map to the Read and Write roles for an organization repository. For more information about repository roles, see Repository roles for an organization.

Note

When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API to make changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see Managing team synchronization for your organization.

List pending team invitations

The return hash contains a role field which refers to the Organization Invitation role and will be one of the following values: direct_member, admin, billing_manager, hiring_manager, or reinstate. If the invitee is not a GitHub Enterprise Cloud member, the login field in the return hash will be null.