{"meta":{"title":"Points de terminaison d’API REST pour les organisations d’équipe d’entreprise","intro":"Utilisez l’API REST pour créer et gérer des affectations d’organisation pour les équipes d’entreprise dans votre GitHub enterprise.","product":"API REST","breadcrumbs":[{"href":"/fr/rest","title":"API REST"},{"href":"/fr/rest/enterprise-teams","title":"Équipes d’entreprise"},{"href":"/fr/rest/enterprise-teams/enterprise-team-organizations","title":"Organisations d’équipe d’entreprise"}],"documentType":"article"},"body":"# Points de terminaison d’API REST pour les organisations d’équipe d’entreprise\n\nUtilisez l’API REST pour créer et gérer des affectations d’organisation pour les équipes d’entreprise dans votre GitHub enterprise.\n\n## À propos des organisations d’équipe d’entreprise\n\nCes endpoints sont uniquement disponibles pour les membres authentifiés de l’entreprise de l’équipe Enterprise, dotés de l’autorisation classique personal access tokens avec le `read:enterprise`[scope](/fr/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps) pour les API `GET` et `admin:enterprise` pour les autres API.\n\nCes points de terminaison ne sont pas compatibles avec fine-grained personal access tokens ou les jetons d’accès aux applications GitHub.\n\nGitHub génère le `slug` de l’équipe d’entreprise à partir de l’équipe `name` et ajoute le préfixe `ent:`.\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 organization assignments\n\n```\nGET /enterprises/{enterprise}/teams/{enterprise-team}/organizations\n```\n\nGet all organizations assigned to an enterprise team\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* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n* **200** - An array of organizations the team is assigned to\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations\n```\n\n**Response schema (Status: 200):**\n\nArray of `Organization Simple`:\n\n* `login`: required, string\n* `id`: required, integer\n* `node_id`: required, string\n* `url`: required, string, format: uri\n* `repos_url`: required, string, format: uri\n* `events_url`: required, string, format: uri\n* `hooks_url`: required, string\n* `issues_url`: required, string\n* `members_url`: required, string\n* `public_members_url`: required, string\n* `avatar_url`: required, string\n* `description`: required, string or null\n\n## Add organization assignments\n\n```\nPOST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add\n```\n\nAssign an enterprise team to multiple organizations.\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* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n#### Body parameters\n\n* **`organization_slugs`** (array of strings) (required)\n  Organization slug to assign the team to.\n\n### HTTP response status codes\n\n* **200** - Successfully assigned the enterprise team to organizations.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/add \\\n  -d '{\n  \"organization_slugs\": [\n    \"github\"\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Get organization assignments](#get-organization-assignments).\n\n## Remove organization assignments\n\n```\nPOST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove\n```\n\nUnassign an enterprise team from multiple organizations.\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* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n#### Body parameters\n\n* **`organization_slugs`** (array of strings) (required)\n  Organization slug to unassign the team from.\n\n### HTTP response status codes\n\n* **204** - Successfully unassigned the enterprise team from organizations.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/remove \\\n  -d '{\n  \"organization_slugs\": [\n    \"github\"\n  ]\n}'\n```\n\n**Response schema (Status: 204):**\n\n## Get organization assignment\n\n```\nGET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}\n```\n\nCheck if an enterprise team is assigned to an 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* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **200** - The team is assigned to the organization\n\n* **404** - The team is not assigned to the organization\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/ORG\n```\n\n**Response schema (Status: 200):**\n\n* `login`: required, string\n* `id`: required, integer\n* `node_id`: required, string\n* `url`: required, string, format: uri\n* `repos_url`: required, string, format: uri\n* `events_url`: required, string, format: uri\n* `hooks_url`: required, string\n* `issues_url`: required, string\n* `members_url`: required, string\n* `public_members_url`: required, string\n* `avatar_url`: required, string\n* `description`: required, string or null\n\n## Add an organization assignment\n\n```\nPUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}\n```\n\nAssign an enterprise team to an 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* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **201** - Successfully assigned the enterprise team to the organization.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/ORG\n```\n\n**Response schema (Status: 201):**\n\nSame response schema as [Get organization assignment](#get-organization-assignment).\n\n## Delete an organization assignment\n\n```\nDELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}\n```\n\nUnassign an enterprise team from an 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* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **204** - Successfully unassigned the enterprise team from the organization.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/ORG\n```\n\n**Response schema (Status: 204):**"}