Github API - Test Config

PUT /repos/{owner}/{repo}/collaborators/{username}
users
repos

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

Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "Enforcing repository management policies in your enterprise."

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:

Cannot assign {member} permission of {role name}

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.

Updating an existing collaborator's permission level

The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different permission parameter. The response will be a 204, with no other indication that the permission level changed.

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.
Add a repository collaborator

Arguments
key owner

owner [scalar]

The account owner of the repository. The name is not case sensitive.

API:
Github Open API
(version: 1.1.4)

key repo

repo [scalar]

The name of the repository. The name is not case sensitive.

API:
Github Open API
(version: 1.1.4)

key username

username [scalar]

The handle for the GitHub user account.

API:
Github Open API
(version: 1.1.4)

Returns
201 application/json repository-invitation

repository-invitation [object]

Repository invitations let you manage who you collaborate with.

Attributes
created_at string

expired boolean

Whether or not the invitation has expired

html_url string

id integer

Unique identifier of the repository invitation.

node_id string

permissions string

The permission associated with the invitation.

repository minimal-repository

url string

URL for the repository invitation

API:
Github Open API
(version: 1.1.4)
403 forbidden

forbidden [scalar]

Forbidden

API:
Github Open API
(version: 1.1.4)
422 validation_failed

validation_failed [scalar]

Validation failed, or the endpoint has been spammed.

API:
Github Open API
(version: 1.1.4)
API:
Github Open API
(version: 1.1.4)