Organization Administration
The Organization Administration API allows you to create organizations on a GitHub Enterprise Server appliance. It is only available to authenticated site administrators. Normal users will receive a 404 response if they try to access it.
Prefix all the endpoints for this API with the following URL:
http(s)://hostname/api/v3
Create an organization
POST /admin/organizations
Parameters
| Name | Type | Description |
|---|---|---|
login |
string |
Required. The organization's username. |
admin |
string |
Required. The login of the user who will manage this organization. |
profile_name |
string |
The organization's display name. |
Example
{
"login": "github",
"profile_name": "GitHub, Inc.",
"admin": "monalisaoctocat"
}
Response
Status: 201 Created
{
"login": "github",
"id": 1,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization"
}
Rename an organization
PATCH /admin/organizations/:org
Parameters
| Name | Type | Description |
|---|---|---|
login |
string |
Required. The organization's new name. |
Example
{
"login": "the-new-octocats"
}
Response
Status: 202 Accepted
{
"message": "Job queued to rename organization. It may take a few minutes to complete.",
"url": "https://<hostname>/api/v3/organizations/1"
}