> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List GitHub organizations

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Lists the GitHub accounts you can create the app's repository in. Your personal account comes first, then your organizations alphabetically.

Only accounts with the Base44 GitHub App installed appear, so install it on the account you want before you call this. Your own GitHub account also has to be connected to Base44, which you do in the Base44 online app editor rather than through this API.

When the app's workspace limits GitHub repositories to approved organizations, this returns only the approved ones, and otherwise it returns all of them. Call [Get GitHub organization policy](/api-reference/get-github-organization-policy) to see whether that limit is on.

If you're a workspace owner or admin, this list is filtered by the limit even though you aren't bound by it, so it can leave out an organization you're allowed to connect under.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json get /api/apps/{app_id}/github/organizations
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - ApiKeyAuth: []
paths:
  /api/apps/{app_id}/github/organizations:
    get:
      summary: List GitHub organizations
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Lists the GitHub accounts you can create the app's repository in. Your
        personal account comes first, then your organizations alphabetically.


        Only accounts with the Base44 GitHub App installed appear, so install it
        on the account you want before you call this. Your own GitHub account
        also has to be connected to Base44, which you do in the Base44 online
        app editor rather than through this API.


        When the app's workspace limits GitHub repositories to approved
        organizations, this returns only the approved ones, and otherwise it
        returns all of them. Call [Get GitHub organization
        policy](/api-reference/get-github-organization-policy) to see whether
        that limit is on.


        If you're a workspace owner or admin, this list is filtered by the limit
        even though you aren't bound by it, so it can leave out an organization
        you're allowed to connect under.
      operationId: get_organizations_api_apps__app_id__github_organizations_get
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              ID of the app whose workspace decides which GitHub organizations
              you can use.
            title: App Id
          description: >-
            ID of the app whose workspace decides which GitHub organizations you
            can use.
          example: 6820f3a4e7b91d003c45a1f2
      responses:
        '200':
          description: The GitHub accounts you can create the app's repository in.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GitHubOrganization'
                title: GitHubOrganizations
        '400':
          description: Your GitHub account isn't connected to Base44.
        '401':
          description: Missing or invalid credentials.
        '402':
          description: Your workspace plan doesn't include the GitHub integration.
        '403':
          description: >-
            You don't have access to this app, or you used a workspace API key.
            These endpoints take a personal API key.
        '404':
          description: App not found.
components:
  schemas:
    GitHubOrganization:
      properties:
        id:
          type: integer
          title: Id
          description: GitHub's numeric ID for the account.
          example: 1024547
        login:
          type: string
          title: Login
          description: >-
            GitHub username or organization name. Pass it as `org_name` to
            [Connect a GitHub
            repository](/api-reference/connect-a-github-repository).
          example: base44
        avatar_url:
          type: string
          title: Avatar Url
          description: URL of the account's GitHub profile picture.
          example: https://avatars.githubusercontent.com/u/1024547?v=4
        installation_id:
          type: string
          title: Installation Id
          description: >-
            ID of the Base44 GitHub App installation on this account. Pass it as
            `installation_id` to [Connect a GitHub
            repository](/api-reference/connect-a-github-repository).
          example: '58231904'
        type:
          type: string
          enum:
            - User
            - Organization
          title: Type
          description: >-
            Either `User` for your personal account or `Organization` for an
            organization.
          example: Organization
        repository_selection:
          type: string
          enum:
            - all
            - selected
          title: Repository Selection
          description: >-
            Whether the Base44 GitHub App can reach all repositories in this
            account or only chosen ones. Either `all` or `selected`. You can't
            create a new repository under an account set to `selected`, so
            switch that account to all repositories in GitHub first, under
            Settings > Applications > Base44 > Repository access.
          default: all
          example: all
      type: object
      required:
        - id
        - login
        - avatar_url
        - installation_id
        - type
      title: GitHubOrganization
      description: >-
        A GitHub account, personal or organization, with the Base44 GitHub App
        installed.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: Personal API key.

````