---
title: "Set interaction restrictions for your public repositories"
method: PUT
path: "/user/interaction-limits"
tags: ["interactions"]
---

# Set interaction restrictions for your public repositories

`PUT /user/interaction-limits`

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.

## 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

- `422` — Validation failed, or the endpoint has been spammed.

---

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