Sample - GitHub REST API
PUT/orgs/{org}/interaction-limits

Set interaction restrictions for an organization

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.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 2 body fields
orgstringrequired
The organization name. The name is not case sensitive.
limitstringrequired
The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.
Allowed:existing_userscontributors_onlycollaborators_only
expirystringoptional
The duration of the interaction restriction. Default: `one_day`.
Allowed:one_daythree_daysone_weekone_monthsix_months

2 status codes
200Response
limitstringrequired
The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.
Allowed:existing_userscontributors_onlycollaborators_only
originstringrequired
expires_atstringrequired
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional

Error handling

A 422 is returned: Validation failed, or the endpoint has been spammed.