REST API endpoints for organizations

Use the REST API to interact with organizations.

Note

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.

List organizations

GET /organizations

Lists all organizations, in the order that they were created.
Note

Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of organizations.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/organizations

Response schema (Status: 200):

Array of Organization Simple:

Get an organization

GET /orgs/{org}

Gets information about an organization.
When the value of two_factor_requirement_enabled is true, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable two-factor authentication.
To see the full details about an organization, the authenticated user must be an organization owner.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to see the full details about an organization.
To see information about an organization's GitHub plan, GitHub Apps need the Organization plan permission.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/orgs/ORG

Response schema (Status: 200):

Update an organization

PATCH /orgs/{org}

Warning

Closing down notice: GitHub will replace and discontinue members_allowed_repository_creation_type in favor of more granular permissions. The new input parameters are members_can_create_public_repositories, members_can_create_private_repositories for all organizations and members_can_create_internal_repositories for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the blog post.

Warning

Closing down notice: Code security product enablement for new repositories through the organization API is closing down. Please use code security configurations to set defaults instead. For more information on setting a default security configuration, see the changelog.

Updates the organization's profile and member privileges.
The authenticated user must be an organization owner to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org or repo scope to use this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PATCH \
  https://api.github.com/orgs/ORG \
  -d '{
  "billing_email": "mona@github.com",
  "company": "GitHub",
  "email": "mona@github.com",
  "twitter_username": "github",
  "location": "San Francisco",
  "name": "github",
  "description": "GitHub, the company.",
  "default_repository_permission": "read",
  "members_can_create_repositories": true,
  "members_allowed_repository_creation_type": "all"
}'

Response schema (Status: 200):

Same response schema as Get an organization.

Delete an organization

DELETE /orgs/{org}

Deletes an organization and all its repositories.
The organization login will be unavailable for 90 days after deletion.
Please review the Terms of Service regarding account deletion before using this endpoint:
https://docs.github.com/site-policy/github-terms/github-terms-of-service

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/orgs/ORG

Response schema (Status: 202):

object

List app installations for an organization

GET /orgs/{org}/installations

Lists all GitHub Apps in an organization. The installation count includes
all GitHub Apps installed on repositories in the organization.
The authenticated user must be an organization owner to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:read scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/orgs/ORG/installations

Response schema (Status: 200):

Get immutable releases settings for an organization

GET /orgs/{org}/settings/immutable-releases

Gets the immutable releases policy for repositories in an organization.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/orgs/ORG/settings/immutable-releases

Response schema (Status: 200):

Set immutable releases settings for an organization

PUT /orgs/{org}/settings/immutable-releases

Sets the immutable releases policy for repositories in an organization.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PUT \
  https://api.github.com/orgs/ORG/settings/immutable-releases \
  -d '{
  "enforced_repositories": "all"
}'

Response schema (Status: 204):

List selected repositories for immutable releases enforcement

GET /orgs/{org}/settings/immutable-releases/repositories

List all of the repositories that have been selected for immutable releases enforcement in an organization.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/orgs/ORG/settings/immutable-releases/repositories

Response schema (Status: 200):

Set selected repositories for immutable releases enforcement

PUT /orgs/{org}/settings/immutable-releases/repositories

Replaces all repositories that have been selected for immutable releases enforcement in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PUT \
  https://api.github.com/orgs/ORG/settings/immutable-releases/repositories \
  -d '{
  "selected_repository_ids": [
    64780797
  ]
}'

Response schema (Status: 204):

Enable a selected repository for immutable releases in an organization

PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}

Adds a repository to the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PUT \
  https://api.github.com/orgs/ORG/settings/immutable-releases/repositories/REPOSITORY_ID

Response schema (Status: 204):

Disable a selected repository for immutable releases in an organization

DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}

Removes a repository from the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X DELETE \
  https://api.github.com/orgs/ORG/settings/immutable-releases/repositories/REPOSITORY_ID

Response schema (Status: 204):

Enable or disable a security feature for an organization

POST /orgs/{org}/{security_product}/{enablement}

Warning

Closing down notice: The ability to enable or disable a security feature for all eligible repositories in an organization is closing down. Please use code security configurations instead. For more information, see the changelog.

Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "Managing security managers in your organization."
The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org, write:org, or repo scopes to use this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/orgs/ORG/SECURITY_PRODUCT/ENABLEMENT

Response schema (Status: 204):

List organizations for the authenticated user

GET /user/orgs

List organizations for the authenticated user.
For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org scope, you can publicize your organization membership with user scope, etc.). Therefore, this API requires at least user or read:org scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden response.
Note

Requests using a fine-grained access token will receive a 200 Success response with an empty list.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/user/orgs

Response schema (Status: 200):

Same response schema as List organizations.

List organizations for a user

GET /users/{username}/orgs

List public organization memberships for the specified user.
This method only lists public memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the List organizations for the authenticated user API instead.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/users/USERNAME/orgs

Response schema (Status: 200):

Same response schema as List organizations.