Set interaction restrictions for your public repositories
PUT
/user/interaction-limits
Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user.
Request Body required
Section titled “ Request Body required ” Media type application/json
Interaction Restrictions
Limit interactions to a specific type of user for a specified duration
object
limit
required
The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.
string
expiry
The duration of the interaction restriction. Default: one_day.
string
Examples
Example default
{ "limit": "collaborators_only", "expiry": "one_month"}Responses
Section titled “ Responses ”Response
Media type application/json
Interaction Limits
Interaction limit settings.
object
limit
required
The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.
string
origin
required
string
expires_at
required
string format: date-time
Examples
Example default
{ "limit": "collaborators_only", "origin": "user", "expires_at": "2018-08-17T04:18:39Z"}Validation failed, or the endpoint has been spammed.
Media type application/json
Validation Error
Validation Error
object
message
required
string
documentation_url
required
string
errors
Array<object>
object
resource
string
field
string
message
string
code
required
string
index
integer
value
One of:
string
integer
Array<string>
Example generated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}