Skip to content

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.

API method documentation

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
Allowed values: existing_users contributors_only collaborators_only
expiry

The duration of the interaction restriction. Default: one_day.

string
Allowed values: one_day three_days one_week one_month six_months
Examples
Example default
{
"limit": "collaborators_only",
"expiry": "one_month"
}

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
Allowed values: existing_users contributors_only collaborators_only
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
nullable
Example generated
{
"message": "example",
"documentation_url": "example",
"errors": [
{
"resource": "example",
"field": "example",
"message": "example",
"code": "example",
"index": 1,
"value": [
"example"
]
}
]
}