GitHub Enterprise Enterprise Team Organizations API

Endpoints to manage GitHub Enterprise Team organization assignments.

Operations 6

GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations Get organization assignments #
POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add Add organization assignments #
POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove Remove organization assignments #
GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org} Get organization assignment #
PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org} Add an organization assignment #
DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org} Delete an organization assignment #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/github-enterprise:github-enterprise-enterprise-team-organizations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

github-enterprise-enterprise-team-organizations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Github Enterprise Enterprise Team Organizations API
  version: 1.1.4
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  x-github-plan: ghec
  description: 'Operations tagged enterprise-team-organizations across 2 of this provider''s published API definitions: github-enterprise-ghec-openapi.json, github-enterprise-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.github.com
tags:
- name: enterprise-team-organizations
  description: Endpoints to manage GitHub Enterprise Team organization assignments.
paths:
  /enterprises/{enterprise}/teams/{enterprise-team}/organizations:
    get:
      summary: Get organization assignments
      description: Get all organizations assigned to an enterprise team
      tags:
      - enterprise-team-organizations
      operationId: enterprise-team-organizations/get-assignments
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-teams/enterprise-team-organizations#get-organization-assignments
      parameters:
      - $ref: '#/components/parameters/enterprise'
      - $ref: '#/components/parameters/enterprise-team'
      - $ref: '#/components/parameters/per-page'
      - $ref: '#/components/parameters/page'
      responses:
        '200':
          description: An array of organizations the team is assigned to
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/organization-simple'
              examples:
                default:
                  $ref: '#/components/examples/organization-simple'
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: false
        category: enterprise-teams
        subcategory: enterprise-team-organizations
    servers:
    - url: https://api.github.com
  /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add:
    post:
      summary: Add organization assignments
      description: Assign an enterprise team to multiple organizations.
      tags:
      - enterprise-team-organizations
      operationId: enterprise-team-organizations/bulk-add
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-teams/enterprise-team-organizations#add-organization-assignments
      parameters:
      - $ref: '#/components/parameters/enterprise'
      - $ref: '#/components/parameters/enterprise-team'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - organization_slugs
              properties:
                organization_slugs:
                  type: array
                  description: Organization slug to assign the team to.
                  items:
                    type: string
                    description: Organization slug to assign the team to
            examples:
              default:
                value:
                  organization_slugs:
                  - github
      responses:
        '200':
          description: Successfully assigned the enterprise team to organizations.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/organization-simple'
              examples:
                default:
                  $ref: '#/components/examples/organization-simple-items'
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: false
        category: enterprise-teams
        subcategory: enterprise-team-organizations
    servers:
    - url: https://api.github.com
  /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove:
    post:
      summary: Remove organization assignments
      description: Unassign an enterprise team from multiple organizations.
      tags:
      - enterprise-team-organizations
      operationId: enterprise-team-organizations/bulk-remove
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-teams/enterprise-team-organizations#remove-organization-assignments
      parameters:
      - $ref: '#/components/parameters/enterprise'
      - $ref: '#/components/parameters/enterprise-team'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - organization_slugs
              properties:
                organization_slugs:
                  type: array
                  description: Organization slug to unassign the team from.
                  items:
                    type: string
                    description: Organization slug to unassign the team from
            examples:
              default:
                value:
                  organization_slugs:
                  - github
      responses:
        '204':
          description: Successfully unassigned the enterprise team from organizations.
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: false
        category: enterprise-teams
        subcategory: enterprise-team-organizations
    servers:
    - url: https://api.github.com
  /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}:
    get:
      summary: Get organization assignment
      description: Check if an enterprise team is assigned to an organization
      tags:
      - enterprise-team-organizations
      operationId: enterprise-team-organizations/get-assignment
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-teams/enterprise-team-organizations#get-organization-assignment
      parameters:
      - $ref: '#/components/parameters/enterprise'
      - $ref: '#/components/parameters/enterprise-team'
      - $ref: '#/components/parameters/org'
      responses:
        '200':
          description: The team is assigned to the organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organization-simple'
              examples:
                default:
                  $ref: '#/components/examples/organization-simple'
        '404':
          description: The team is not assigned to the organization
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: false
        category: enterprise-teams
        subcategory: enterprise-team-organizations
    put:
      summary: Add an organization assignment
      description: Assign an enterprise team to an organization.
      tags:
      - enterprise-team-organizations
      operationId: enterprise-team-organizations/add
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-teams/enterprise-team-organizations#add-an-organization-assignment
      parameters:
      - $ref: '#/components/parameters/enterprise'
      - $ref: '#/components/parameters/enterprise-team'
      - $ref: '#/components/parameters/org'
      responses:
        '201':
          description: Successfully assigned the enterprise team to the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organization-simple'
              examples:
                default:
                  $ref: '#/components/examples/organization-simple'
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: false
        category: enterprise-teams
        subcategory: enterprise-team-organizations
    delete:
      summary: Delete an organization assignment
      description: Unassign an enterprise team from an organization.
      tags:
      - enterprise-team-organizations
      operationId: enterprise-team-organizations/delete
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-teams/enterprise-team-organizations#delete-an-organization-assignment
      parameters:
      - $ref: '#/components/parameters/enterprise'
      - $ref: '#/components/parameters/enterprise-team'
      - $ref: '#/components/parameters/org'
      responses:
        '204':
          description: Successfully unassigned the enterprise team from the organization.
      x-github:
        githubCloudOnly: true
        enabledForGitHubApps: false
        category: enterprise-teams
        subcategory: enterprise-team-organizations
    servers:
    - url: https://api.github.com
components:
  examples:
    organization-simple:
      value:
        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
    organization-simple-items:
      value:
      - 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
  parameters:
    org:
      name: org
      description: The organization name. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    page:
      name: page
      description: The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 1
    enterprise:
      name: enterprise
      description: The slug version of the enterprise name.
      in: path
      required: true
      schema:
        type: string
    per-page:
      name: per_page
      description: The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
      in: query
      schema:
        type: integer
        default: 30
    enterprise-team:
      name: enterprise-team
      description: The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.
      in: path
      required: true
      schema:
        type: string
  schemas:
    organization-simple:
      title: Organization Simple
      description: A GitHub organization.
      type: object
      properties:
        login:
          type: string
          example: github
        id:
          type: integer
          example: 1
        node_id:
          type: string
          example: MDEyOk9yZ2FuaXphdGlvbjE=
        url:
          type: string
          format: uri
          example: https://api.github.com/orgs/github
        repos_url:
          type: string
          format: uri
          example: https://api.github.com/orgs/github/repos
        events_url:
          type: string
          format: uri
          example: https://api.github.com/orgs/github/events
        hooks_url:
          type: string
          example: https://api.github.com/orgs/github/hooks
        issues_url:
          type: string
          example: https://api.github.com/orgs/github/issues
        members_url:
          type: string
          example: https://api.github.com/orgs/github/members{/member}
        public_members_url:
          type: string
          example: https://api.github.com/orgs/github/public_members{/member}
        avatar_url:
          type: string
          example: https://github.com/images/error/octocat_happy.gif
        description:
          type:
          - string
          - 'null'
          example: A great organization
      required:
      - login
      - url
      - id
      - node_id
      - repos_url
      - events_url
      - hooks_url
      - issues_url
      - members_url
      - public_members_url
      - avatar_url
      - description
externalDocs:
  description: GitHub Enterprise Cloud REST API
  url: https://docs.github.com/enterprise-cloud@latest/rest/
x-refined-from:
- github-enterprise-ghec-openapi.json
- github-enterprise-openapi.yml