PUT/user/interaction-limits

Set interaction restrictions for your public repositories

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.

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

2 body fields
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.

Was this helpful?