{"meta":{"title":"REST API endpoints for enterprise organizations","intro":"Use the REST API to create organizations on your enterprise.","product":"REST API","breadcrumbs":[{"href":"/en/enterprise-server@3.22/rest","title":"REST API"},{"href":"/en/enterprise-server@3.22/rest/enterprise-admin","title":"Enterprise administration"},{"href":"/en/enterprise-server@3.22/rest/enterprise-admin/orgs","title":"Organizations"}],"documentType":"article"},"body":"# REST API endpoints for enterprise organizations\n\nUse the REST API to create organizations on your enterprise.\n\n## About organization administration\n\nThese endpoints are only available to [authenticated](/en/enterprise-server@3.22/rest/authentication/authenticating-to-the-rest-api) site administrators. Normal users will receive a `404` response.\n\n> \\[!NOTE]\n> These endpoints only support authentication using a personal access token (classic). For more information, see [Managing your personal access tokens](/en/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"}