---
title: "Set interaction restrictions for a repository"
method: PUT
path: "/repos/{owner}/{repo}/interaction-limits"
tags: ["interactions"]
---

# Set interaction restrictions for a repository

`PUT /repos/{owner}/{repo}/interaction-limits`

Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository.

## Path parameters

- `owner` string, required
- `repo` string, required

## Request body

- InteractionLimit — Limit interactions to a specific type of user for a specified duration
  - `limit` 'existing_users' | 'contributors_only' | 'collaborators_only', required — The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.
  - `expiry` 'one_day' | 'three_days' | 'one_week' | 'one_month' | 'six_months' — The duration of the interaction restriction. Default: `one_day`.

## Response `200`

Response

- InteractionLimitResponse — Interaction limit settings.
  - `limit` 'existing_users' | 'contributors_only' | 'collaborators_only', required — The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.
  - `origin` string, required
  - `expires_at` string, date-time, required

## Other responses

- `409` — Response

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
