Skip to content

Set interaction restrictions for an organization

PUT
/orgs/{org}/interaction-limits

Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

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": "organization",
"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"
]
}
]
}