{"meta":{"title":"REST-API-Endpunkte für Interaktionen in der Organisation","intro":"Verwende die REST-API, um vorübergehend einzuschränken, welcher Benutzertyp in den öffentlichen Repositorys der Organisation Kommentare eingeben, Issues eröffnen oder Pull Requests erstellen darf.","product":"REST-API","breadcrumbs":[{"href":"/de/rest","title":"REST-API"},{"href":"/de/rest/interactions","title":"Interaktionen"},{"href":"/de/rest/interactions/orgs","title":"Organisation"}],"documentType":"article"},"body":"# REST-API-Endpunkte für Interaktionen in der Organisation\n\nVerwende die REST-API, um vorübergehend einzuschränken, welcher Benutzertyp in den öffentlichen Repositorys der Organisation Kommentare eingeben, Issues eröffnen oder Pull Requests erstellen darf.\n\n## Informationen zu Organisationsinteraktionen\n\nOrganisationsbesitzer können vorübergehend einschränken, welcher Benutzertyp in den öffentlichen Repositorys der Organisation Kommentare eingeben, Issues eröffnen oder Pull Requests erstellen darf. Wenn Einschränkungen aktiviert sind, kann nur der angegebene Typ von GitHub-Benutzerkonto an Interaktionen teilnehmen. Einschränkungen laufen nach einem definierten Zeitraum automatisch ab. Hier findest du weitere Informationen zu den Typen von GitHub-Benutzern:\n\n* **Vorhandene Benutzer**: Wenn du Interaktionen auf `existing_users` beschränkst, werden neue Benutzer, deren Konten noch keine 24 Stunden alt sind, die noch keinen Beitrag geleistet haben und die keine Mitarbeiter sind, vorübergehend eingeschränkt. in der Organisation.\n* **Nur Mitwirkende:** Wenn du Interaktionen auf `contributors_only` beschränkst, werden Benutzer, die zuvor nicht mitgewirkt haben und keine Projektmitarbeiter sind, vorübergehend eingeschränkt. in der Organisation.\n* **Nur Mitarbeiter**: Wenn du Interaktionen auf `collaborators_only` beschränkst, werden Benutzer, die keine Mitarbeiter sind, vorübergehend eingeschränkt. in der Organisation.\n\nDurch Festlegen des Interaktionslimits auf Organisationsebene werden alle Interaktionsbeschränkungen überschrieben, die für einzelne Repositorys im Besitz der Organisation festgelegt sind. Verwende stattdessen die [Repositoryinteraktionsendpunkte](/de/rest/interactions/repos), um unterschiedliche Interaktionslimits für einzelne Repositorys festzulegen, die der Organisation gehören.\n\n> \\[!NOTE]\n> 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.\n\n## Get interaction restrictions for an organization\n\n```\nGET /orgs/{org}/interaction-limits\n```\n\nShows 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/interaction-limits\n```\n\n**Response schema (Status: 200):**\n\n* any of:\n  * **Interaction Limits**\n    * `limit`: required, string, enum: `existing_users`, `contributors_only`, `collaborators_only`\n    * `origin`: required, string\n    * `expires_at`: required, string, format: date-time\n  * **object**\n\n## Set interaction restrictions for an organization\n\n```\nPUT /orgs/{org}/interaction-limits\n```\n\nTemporarily 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.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n#### Body parameters\n\n* **`limit`** (string) (required)\n  The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect.\n  Can be one of: `existing_users`, `contributors_only`, `collaborators_only`\n\n* **`expiry`** (string)\n  The duration of the interaction restriction. Default: one\\_day.\n  Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  https://api.github.com/orgs/ORG/interaction-limits \\\n  -d '{\n  \"limit\": \"collaborators_only\",\n  \"expiry\": \"one_month\"\n}'\n```\n\n**Response schema (Status: 200):**\n\n* `limit`: required, string, enum: `existing_users`, `contributors_only`, `collaborators_only`\n* `origin`: required, string\n* `expires_at`: required, string, format: date-time\n\n## Remove interaction restrictions for an organization\n\n```\nDELETE /orgs/{org}/interaction-limits\n```\n\nRemoves all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **204** - No Content\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG/interaction-limits\n```\n\n**Response schema (Status: 204):**\n\n## Get pull request creation cap for an org\n\n```\nGET /orgs/{org}/interaction-limits/pulls/creation-cap\n```\n\nGets the pull request creation cap configuration for an organization.\nThe cap limits the total number of open pull requests a user can have across all public\nrepositories in the organization at one time.\nOnly users with admin access to the organization can view the cap configuration.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n* **405** - Method Not Allowed\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/interaction-limits/pulls/creation-cap\n```\n\n**Response schema (Status: 200):**\n\n* `enabled`: required, boolean\n* `max_open_pull_requests`: required, integer, minimum: 1, maximum: 1000\n\n## Update pull request creation cap for an org\n\n```\nPATCH /orgs/{org}/interaction-limits/pulls/creation-cap\n```\n\nUpdates the pull request creation cap for an organization. The cap limits the total number\nof open pull requests a user can have across all public repositories in the organization\nat one time.\nOnly users with admin access to the organization can configure the cap.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n#### Body parameters\n\n* **`enabled`** (boolean) (required)\n  Whether the pull request creation cap is enabled\n\n* **`max_open_pull_requests`** (integer)\n  The maximum number of open pull requests a user can have at one time\n\n### HTTP response status codes\n\n* **200** - OK\n\n* **403** - Forbidden\n\n* **404** - Resource not found\n\n* **405** - Method Not Allowed\n\n* **422** - Validation failed, or the endpoint has been spammed.\n\n### Code examples\n\n#### Example request body\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PATCH \\\n  https://api.github.com/orgs/ORG/interaction-limits/pulls/creation-cap \\\n  -d '{\n  \"enabled\": true,\n  \"max_open_pull_requests\": 1\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Get pull request creation cap for an org](#get-pull-request-creation-cap-for-an-org)."}