Add or update interaction restrictions for a repository

Note: The Interactions API is currently in public preview. See the blog post preview for more details. To access the API during the preview period, you must provide a custom media type in the Accept header:

application/vnd.github.sombra-preview

Warning: The API may change without advance notice during the preview period. Preview features are not supported for production use. If you experience any issues, contact GitHub Support or GitHub Premium Support.

Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions.

PUT /repos/:owner/:repo/interaction-limits

Parameters

Name Type Description
limit string Required. Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: existing_users, contributors_only, or collaborators_only.

Example

{
  "limit": "collaborators_only"
}

Response

Status: 200 OK
{
  "limit": "collaborators_only",
  "origin": "repository",
  "expires_at": "2018-08-17T04:18:39Z"
}