REST API endpoints for organization interactions

Use the REST API to temporarily restrict which type of user can comment, open issues, or create pull requests in the organization's public repositories.

About organization interactions

Organization owners can temporarily restrict which type of user can comment, open issues, or create pull requests in the organization's public repositories. When restrictions are enabled, only the specified type of GitHub user will be able to participate in interactions. Restrictions automatically expire after a defined duration. Here's more about the types of GitHub users:

Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. To set different interaction limits for individual repositories owned by the organization, use the Repository interactions endpoints instead.

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

Get interaction restrictions for an organization

GET /orgs/{org}/interaction-limits

Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/orgs/ORG/interaction-limits

Response schema (Status: 200):

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.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PUT \
  https://api.github.com/orgs/ORG/interaction-limits \
  -d '{
  "limit": "collaborators_only",
  "expiry": "one_month"
}'

Response schema (Status: 200):

Remove interaction restrictions for an organization

DELETE /orgs/{org}/interaction-limits

Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/orgs/ORG/interaction-limits

Response schema (Status: 204):

Get pull request creation cap for an org

GET /orgs/{org}/interaction-limits/pulls/creation-cap

Gets the pull request creation cap configuration for an organization.
The cap limits the total number of open pull requests a user can have across all public
repositories in the organization at one time.
Only users with admin access to the organization can view the cap configuration.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/orgs/ORG/interaction-limits/pulls/creation-cap

Response schema (Status: 200):

Update pull request creation cap for an org

PATCH /orgs/{org}/interaction-limits/pulls/creation-cap

Updates the pull request creation cap for an organization. The cap limits the total number
of open pull requests a user can have across all public repositories in the organization
at one time.
Only users with admin access to the organization can configure the cap.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example request body

Request:

curl -L \
  -X PATCH \
  https://api.github.com/orgs/ORG/interaction-limits/pulls/creation-cap \
  -d '{
  "enabled": true,
  "max_open_pull_requests": 1,
  "include_drafts": true
}'

Response schema (Status: 200):

Same response schema as Get pull request creation cap for an org.