Skip to main content

collaborators

Overview

Namecollaborators
TypeResource
Idgithub.repos.collaborators

Fields

NameDatatype
idinteger
namestring
emailstring
html_urlstring
loginstring
avatar_urlstring
typestring
subscriptions_urlstring
gists_urlstring
followers_urlstring
organizations_urlstring
gravatar_idstring
events_urlstring
permissionsobject
site_adminboolean
repos_urlstring
following_urlstring
role_namestring
urlstring
starred_urlstring
node_idstring
received_events_urlstring

Methods

NameAccessible byRequired ParamsDescription
list_collaboratorsSELECTowner, repoFor organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.

Team members will include the members of child teams.

You must authenticate using an access token with the read:org and repo scopes with push access to use this
endpoint. GitHub Apps must have the members organization permission and metadata repository permission to use this
endpoint.
add_collaboratorINSERTowner, repo, usernameThis endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.

For more information on permission levels, see "Repository permission levels for an organization". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with:

<br />Cannot assign &#123;member&#125; permission of &#123;role name&#125;<br />

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

The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the repository invitations API endpoints.

Rate limits

You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository.
remove_collaboratorDELETEowner, repo, username
check_collaboratorEXECowner, repo, usernameFor organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners.

Team members will include the members of child teams.

You must authenticate using an access token with the read:org and repo scopes with push access to use this
endpoint. GitHub Apps must have the members organization permission and metadata repository permission to use this
endpoint.