{"meta":{"title":"エンタープライズの組織用の REST API エンドポイント","intro":"この REST API を使って、企業の組織を作成します。","product":"REST API","breadcrumbs":[{"href":"/ja/enterprise-server@3.18/rest","title":"REST API"},{"href":"/ja/enterprise-server@3.18/rest/enterprise-admin","title":"企業管理"},{"href":"/ja/enterprise-server@3.18/rest/enterprise-admin/orgs","title":"組織"}],"documentType":"article"},"body":"# エンタープライズの組織用の REST API エンドポイント\n\nこの REST API を使って、企業の組織を作成します。\n\n## 組織の管理について\n\nこれらのエンドポイントは、[認証された](/ja/enterprise-server@3.18/rest/authentication/authenticating-to-the-rest-api)サイト管理者のみが使用できます。 通常のユーザーは `404` 応答を受け取ります。\n\n> \\[!NOTE]\n> これらのエンドポイントでは、personal access token (classic) を使う認証のみがサポートされます。 詳しくは、「[個人用アクセス トークンを管理する](/ja/enterprise-server@3.18/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: 2022-11-28`. 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"}