{"meta":{"title":"Points de terminaison d’API REST pour les organisations de l’entreprise","intro":"Utilisez l’API REST pour créer des organisations sur votre entreprise.","product":"API REST","breadcrumbs":[{"href":"/fr/enterprise-server@3.22/rest","title":"API REST"},{"href":"/fr/enterprise-server@3.22/rest/enterprise-admin","title":"Administration d’entreprise"},{"href":"/fr/enterprise-server@3.22/rest/enterprise-admin/orgs","title":"Organisations"}],"documentType":"article"},"body":"# Points de terminaison d’API REST pour les organisations de l’entreprise\n\nUtilisez l’API REST pour créer des organisations sur votre entreprise.\n\n## À propos de l’administration de l’organisation\n\nCes points de terminaison sont uniquement disponibles pour les administrateurs de site [authentifiés](/fr/enterprise-server@3.22/rest/authentication/authenticating-to-the-rest-api). Les utilisateurs normaux recevront une réponse `404`.\n\n> \\[!NOTE]\n> Ces points de terminaison prennent uniquement en charge l’authentification à l’aide d’un personal access token (classic). Pour plus d’informations, consultez « [Gestion de vos jetons d’accès personnels](/fr/enterprise-server@3.22/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) ».\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## Create an organization\n\n```\nPOST /admin/organizations\n```\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Body parameters\n\n* **`login`** (string) (required)\n  The organization's username.\n\n* **`admin`** (string) (required)\n  The login of the user who will manage this organization.\n\n* **`profile_name`** (string)\n  The organization's display name.\n\n### HTTP response status codes\n\n* **201** - Created\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  http(s)://HOSTNAME/api/v3/admin/organizations \\\n  -d '{\n  \"login\": \"github\",\n  \"profile_name\": \"GitHub, Inc.\",\n  \"admin\": \"monalisaoctocat\"\n}'\n```\n\n**Response schema (Status: 201):**\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## Update an organization name\n\n```\nPATCH /admin/organizations/{org}\n```\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* **`login`** (string) (required)\n  The organization's new name.\n\n### HTTP response status codes\n\n* **202** - Accepted\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PATCH \\\n  http(s)://HOSTNAME/api/v3/admin/organizations/ORG \\\n  -d '{\n  \"login\": \"the-new-octocats\"\n}'\n```\n\n**Response schema (Status: 202):**\n\n* `message`: string\n* `url`: string"}